//<![CDATA[

var map = null;
var mgr = null;

var label_thailand = '<span style="font-family: arial; font-size: 11px; color: #666666;"><span style="color:rgb(147, 13, 104);font-weight:bold">Asia World Enterprise</span><br>4th  Floor Unit 4B,<br>Evergreen Place Bldg.,<br>318 Phayathai Rd.,<br>Ratchathewi District, <br>Bangkok 10400 Thailand<br>Tel: +66 2611 1771 </span>';
//var label_myanmar = '<span style="font-family: arial; font-size: 11px; color: #666666;"><span style="color:rgb(147, 13, 104);font-weight:bold">Focus Asia</span><br>586, Strand Road,<br>lanmadaw Township<br>Yangon,<br>Myanmar<br>Tel: + 95 1 229245</span>';
//var label_cambodia = '<span style="font-family: arial; font-size: 11px; color: #666666;"><span style="color: rgb(147, 13, 104); font-weight: bold;">Focus Asia</span><br>#27, street 351,<br>Boeng Kak 1,<br>Phnom Penh,<br>Cambodia<br>Tel: +855-(0)23-992256</span>';
//var label_laos = '<span style="font-family: arial; font-size: 11px; color: #666666;"><span style="color:rgb(147, 13, 104);font-weight:bold">Focus Asia</span><br>Ban Muang Nga Village<br>Luang Prabang<br>Laos<br>Tel: +856 71 212311</span>';
//var label_vietnam = '<span style="font-family: arial; font-size: 11px; color: #666666;"><span style="color:rgb(147, 13, 104);font-weight:bold">Focus Asia</span><br>235/3 Vo Thi Sau,<br>Q.3 Ho Chi Minh City,<br>Vietnam<br>Tel: +84 (8) 3 932 0732</span>';
var label_indonesia = '<span style="font-family: arial; font-size: 11px; color: #666666;"><span style="color:rgb(147, 13, 104);font-weight:bold">Asia World Indonesia</span><br>Panorama Building Level 3,<br>Jln. Bypass Ngurah Rai 620,<br>Denpasar 80228, Bali<br>Tel: +62 361 722 188 / +62 361 231 746</span>';
var label_hongkong = '<span style="font-family: arial; font-size: 11px; color: #666666;"><span style="color:rgb(147, 13, 104);font-weight:bold">DMC - THE Destination Management Company</span><br>1807 Dominion Centre,<br>43 - 59 Queen\'s Road East,<br>Hong Kong<br>Tel: +(852) 2547 2321</span>';
var label_malaysia = '<span style="font-family: arial; font-size: 11px; color: #666666;"><span style="color:rgb(147, 13, 104);font-weight:bold">Tour &amp; Incentive Travel</span><br>28-2-1, The Bayu,<br>Jalan Tanjung Tokong,<br>10470 Penang,<br>Malaysia<br>Tel: +(604) 899 8833</span>';
var label_singapore = '<span style="font-family: arial; font-size: 11px; color: #666666;"><span style="color:rgb(147, 13, 104);font-weight:bold">World Express</span><br>114 Middle Road # 05-01,<br>Singapore 188971<br>Tel: +(65) 6336 3877</span>';
//var label_bhutan = '<span style="font-family: arial; font-size: 11px; color: #666666;"><span style="color:rgb(147, 13, 104);font-weight:bold">Bhutan Travel Bureau (BTB)</span><br>Post Box 959,<br>Thimpu,<br>Kingdon Of Bhutan<br>Tel: +(975) 2 332 105</span>';
var label_nepal = '<span style="font-family: arial; font-size: 11px; color: #666666;"><span style="color:rgb(147, 13, 104);font-weight:bold">Explore Himalaya Travel &amp; Adventure</span><br>745 Amrit Marg,<br>Thamel<br>Kathmandu<br>Tel. : +(977) 1 441 8100</span>';
var label_india = '<span style="font-family: arial; font-size: 11px; color: #666666;"><span style="color:rgb(147, 13, 104);font-weight:bold">Kipling India</span><br>Room # 303, 3rd Floor<br>MM Plaza, Block B 1<br>Mini Market<br>New Delhi - 110058<br>Tel: +91-11-265749931, 25525312</span>';
var label_japan = '<span style="font-family: arial; font-size: 11px; color: #666666;"><span style="color:rgb(147, 13, 104);font-weight:bold">THE J TEAM</span><br>2-13-9-301 Mita<br>Minato-ku<br>Tokyo 108-0073<br>Tel. : +(81) 364 350 731</span>';
//var label_srilanka = '<span style="font-family: arial; font-size: 11px; color: #666666;"><span style="color:rgb(147, 13, 104);font-weight:bold">Lanka World Travel</span><br>6 Boyd Place<br>Colombo 3,<br>Sri Lanka<br>T: +94-11-471-4750<br></span>';

function setupMap() {
  if (GBrowserIsCompatible()) {
	map = new GMap2(document.getElementById("map"));
	map.addControl(new GSmallMapControl());
	map.addControl(new GMapTypeControl());
	map.setCenter(new GLatLng(18.479609, 108.808594), 3);
	map.setMapType(G_HYBRID_MAP);
	map.enableDoubleClickZoom();
	window.setTimeout(setupACAMarkers, 0);
  }
}

function getACAIcon() {

	var icon = new GIcon();
	icon.image = "images/Asian-Connections-icon-t.png";
	icon.iconAnchor = new GPoint(16, 16);
	icon.infoWindowAnchor = new GPoint(16, 0);
	icon.iconSize = new GSize(32, 28);
	return icon;

}

function createMarker(coords, title, body) {

	var marker = new GMarker(coords, {
					icon: getACAIcon() ,
					title: title
				});

	GEvent.addListener(marker, "click", function() {
		map.openInfoWindowHtml(coords, body, { maxWidth: 320 });
	 });

	return marker;
}

function getACAMarkers() {
	var batch = [];

	coordsThailand	= new GLatLng(13.750786,100.53054);		// THAILAND
//	coordsMyanmar	= new GLatLng(16.769112,96.166267);		// MYANMAR
//	coordsCambodia	= new GLatLng(11.588426,104.897547);	// CAMBODIA
//	coordsLaos		= new GLatLng(19.894289,102.140279);	// LAOS
//	coordsVietnam	= new GLatLng(10.790773,106.694841);	// VIETNAM
//	coordsIndonesia	= new GLatLng(-8.675003,115.207615);	// INDONESIA - OLD
	coordsIndonesia	= new GLatLng(-8.54966,115.141826);		// INDONESIA
	coordsHongKong	= new GLatLng(22.276497,114.169184);	// HONG KONG
	coordsMalaysia	= new GLatLng(5.450336,100.305605);		// MALAYSIA
	coordsSingapore	= new GLatLng(1.299344,103.853073);		// SINGAPORE
//	coordsBhutan	= new GLatLng(27.470277,89.640466);		// BHUTAN
	coordsNepal		= new GLatLng(27.7148,85.316863);		// NEPAL
	coordsIndia		= new GLatLng(28.629809,77.086601);		// INDIA
	coordsJapan		= new GLatLng(35.645335,139.736765);	// JAPAN
//	coordsSriLanka	= new GLatLng(6.913795,79.854062);		// SRI LANKA
	
	batch.push(createMarker(coordsThailand, "Thailand office - Asia World Enterprise", label_thailand));
//	batch.push(createMarker(coordsMyanmar, "Myanmar office - Focus Asia", label_myanmar));
//	batch.push(createMarker(coordsCambodia, "Cambodia office - Focus Asia", label_cambodia));
//	batch.push(createMarker(coordsLaos, "Laos office - Focus Asia", label_laos));
//	batch.push(createMarker(coordsVietnam, "Vietnam office - Focus Asia", label_vietnam));
	batch.push(createMarker(coordsIndonesia, "Indonesia office - Asia World Indonesia", label_indonesia));
	batch.push(createMarker(coordsHongKong, "Hong Kong office - DMC - THE Destination Management Company", label_hongkong));
	batch.push(createMarker(coordsMalaysia, "Malaysia office - Tour & Incentive Travel", label_malaysia));
	batch.push(createMarker(coordsSingapore, "Singapore office - World Express", label_singapore));
//	batch.push(createMarker(coordsBhutan, "Bhutan office - Bhutan Travel Bureau", label_bhutan));
	batch.push(createMarker(coordsNepal, "Nepal Office - Explore Himalaya Travel & Adventure", label_nepal));
	batch.push(createMarker(coordsIndia, "India office - Kipling India", label_india));
	batch.push(createMarker(coordsJapan, "Japan office - THE J TEAM", label_japan));
//	batch.push(createMarker(coordsSriLanka, "Sri Lanka office - Lanka World", label_srilanka));

	return batch;
}

function setupACAMarkers() {
  mgr = new MarkerManager(map);
  mgr.addMarkers(getACAMarkers(), 1);
  mgr.refresh();
}
//]]>
