// Java Document

 //<![CDATA[
 
 // Begin Javascript
var gmarkers = [];
var htmls = [];
function myclick(i) {
gmarkers[i].openInfoWindowHtml(htmls[i]);
}
    function onLoad() {
      // Map Overlays
      //
      
	  // This function picks up the click and opens the corresponding info window
// Creates one a small marker at the given point
function createMarker(point, attributeHTMLString, name) {
  var marker = new GMarker(point, icon);
  map.addOverlay(marker);
  GEvent.addListener(marker, "click", function() {
    marker.openInfoWindowHtml(attributeHTMLString);
  });
  // save the info we need to use later for the sidebar
  gmarkers[i] = marker;
  htmls[i] = attributeHTMLString;
  // add a line to the sidebar html
  sidebar_html += '<a href="javascript:myclick(' + i + ')">' + name + '</a><br>';
        i++;
        return marker;
}



      // Create small marker icon
var icon = new GIcon();
icon.image = "http://labs.google.com/ridefinder/images/mm_20_blue.png";
icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
icon.iconSize = new GSize(12, 20);
icon.shadowSize = new GSize(22, 20);
icon.iconAnchor = new GPoint(6, 20);
icon.infoWindowAnchor = new GPoint(5, 1);

<!--    begin pulling data    -->
		 
	
		 // Ananda Pahto
	var point = new GPoint(94.867029,21.172887);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/burma/bagan-ananda-pahto-temple.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/burma/images/thumbs/bagan-ananda-patto-cc-huggy47.jpg'><b>Ananda Pahto</b></a><br><br>The first of the great temples to be built at Bagan, Ananda Pahto is also one of the most beautiful. </div>","");
	
		 
		 // Bupaya
	var point = new GPoint(94.858103,21.175768);
	createMarker(point,"<div id=bubble><b>Bupaya Temple</b><br><br></div>","");
	
		 	 
		 // Dhammayangyi Pahto
	var point = new GPoint(94.872866,21.161922);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/burma/bagan-dhammayangyi-pahto-temple.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/burma/images/thumbs/bagan-dhammayangyi-cc-yodod.jpg'><b>Dhammayangyi Pahto</b></a><br><br>The largest temple at Bagan, Dhammayangyi is said to have been built as atonement by a wicked king.</div>","");
	
		 // Gwadapalin
	var point = new GPoint(94.855356,21.138147);
	createMarker(point,"<div id=bubble><b>Gwadapalin</b><br><br></div>","");
	
	// Htilominlo Pahto
	var point = new GPoint(94.879217,21.178569);
	createMarker(point,"<div id=bubble><b>Htilominlo Pahto</b><br><br></div>","");
		 
	// Izagawna
	var point = new GPoint(94.911575,21.171766);
	createMarker(point,"<div id=bubble><b>Izagawna</b><br><br></div>","");
		 
		 // Mahabodhi
	var point = new GPoint(94.860334,21.173127);
	createMarker(point,"<div id=bubble><b>Mahabodhi</b><br><br>Modeled after the Mahabodhi Temple at Bodh Gaya, India, the site of the enlightenment of the Buddha.</div>","");
	
		 // Manuha Paya
	var point = new GPoint(94.856987,21.153037);
	createMarker(point,"<div id=bubble><b>Manuha Paya</b><br><br></div>","");
	
	// Mingalazedi
	var point = new GPoint(94.857416,21.161201);
	createMarker(point,"<div id=bubble><b>Mingalazedi</b><br><br></div>","");
		 
		 // Nathlaung Kyaung
	var point = new GPoint(94.862738,21.168965);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/burma/bagan-nathlaung-kyaung-hindu-temple.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/burma/images/thumbs/bagan-nathlaung02-c-orientalarchitecture.jpg'><b>Nathlaung Kyaung</b></a><br><br>Dedicated to Vishnu, this square brick structure is the only surviving Hindu temple at Bagan.</div>","");
	
	 
		 // Seinnyet Ama Pahto
	var point = new GPoint(94.859047,21.141509);
	createMarker(point,"<div id=bubble><b>Seinnyet Ama Pahto</b><br><br></div>","");
	
	// Shinbinthalyaung
	var point = new GPoint(94.867544,21.15952);
	createMarker(point,"<div id=bubble><b>Shinbinthalyaung</b><br><br></div>","");
	
		 // Shwesandaw Pagoda
	var point = new GPoint(94.866085,21.163522);
	createMarker(point,"<div id=bubble><b>Shwesandaw Pagoda</b><br><br></div>","");
		 
		 // Shwegugyi
	var point = new GPoint(94.860334,21.173207);
	createMarker(point,"<div id=bubble><b>Shwegugyi</b><br><br></div>","");
	
		 // Shwezigon Paya
	var point = new GPoint(94.895439,21.195456);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/burma/bagan-shwezigon-paya-pagoda.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/burma/images/thumbs/bagan-shwezigon-cc-jpslim.jpg'><b>Shwezigon Paya</b></a><br><br>A large golden stupa that played an important role in the development of Burmese Buddhism and became the prototype for many later stupas throughout Myanmar.</div>","");
		 
		 // Sulamani Pahto
	var point = new GPoint(94.881191,21.164643);
	createMarker(point,"<div id=bubble><b>Sulamani Pahto</b><br><br></div>","");
	
	// Thabeik Hmauk
	var point = new GPoint(94.88102,21.166004);
	createMarker(point,"<div id=bubble><b>Thabeik Hmauk</b><br><br></div>","");
	
		 // Thatbyinnyu
	var point = new GPoint(94.863338,21.171126);
	createMarker(point,"<div id=bubble><b>Thatbyinnyu</b><br><br></div>","");
	
	
	
	
	// Create small marker icon
var icon = new GIcon();
icon.image = "http://labs.google.com/ridefinder/images/mm_20_white.png";
icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
icon.iconSize = new GSize(12, 20);
icon.shadowSize = new GSize(22, 20);
icon.iconAnchor = new GPoint(6, 20);
icon.infoWindowAnchor = new GPoint(5, 1);

// Airport
	var point = new GPoint(94.930544,21.182011);
	createMarker(point,"<div id=bubble><b>Airport</b><br><br></div>","");
	
	// Myinkaba Village
	var point = new GPoint(94.859734,21.154557);
	createMarker(point,"<div id=bubble><b>Myinkaba Village</b><br><br></div>","");
	
	// New Bagan
	var point = new GPoint(94.862137,21.132703);
	createMarker(point,"<div id=bubble><b>New Bagan</b><br><br>Home to popular riverside restaurants for lunch and many midrange hotels.</div>","");
		 	 	 
		 // Nyaung U Village
	var point = new GPoint(94.909859,21.189854);
	createMarker(point,"<div id=bubble><b>Nyaung U</b><br><br>The village farthest away from the temples, but with many budget accommodations.</div>","");
		 
	// Old Bagan
	var point = new GPoint(94.86042,21.170326);
	createMarker(point,"<div id=bubble><b>Old Bagan</b><br><br>A town inside the old palace walls, with many  high-end hotels on the river. This is where to stay to be closest to the temples.</div>","");
		 
		 // Old Palace Site
	var point = new GPoint(94.864368,21.173447);
	createMarker(point,"<div id=bubble><b>Old Palace Site</b><br><br>Foundations of the old royal palace at Began.</div>","");
		
	
	 // put the assembled sidebar_html contents into the sidebar div
    //document.getElementById("sidebar").innerHTML = sidebar_html;
    }

	//]]>