// 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    -->
	
	
		 
		 // Bodhi Tree
	var point = new GPoint(84.991066, 24.696033);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/india/bodhgaya-bodhi-tree.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/india/images/thumbnails-75/bodhgaya-bodhi-tree-monks-c-sacredsites2.jpg'><b>Bodhi Tree</b></a><br><br>The Bodhi Tree (Tree of Awakening, also known as the Bo Tree) is the tree under which Siddharta Gautama attained enlightenment after 49 days of meditation and became the Buddha, the &quot;Enlightened One.&quot;</div>","Bodhi Tree");
		 
	// Gaya Town
	var point = new GPoint(84.991844, 24.701954);
	createMarker(point,"<div id=bubble><b>Gaya Town</b><br><br>Population of about 30,000.</div>","Gaya Town");
	
		 // Mahabodhi Temple
	var point = new GPoint(84.991329, 24.695955);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/india/bodhgaya-mahabodhi-temple.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/india/images/thumbnails-75/bodhgaya-mahabodhi-july-2005-c-bezoire-flickr.jpg'><b>Mahabodhi Temple</b></a><br><br>This sacred stupa marks the site of the Buddha's enlightenment and is the main destination for Buddhist pilgrims. The temple dates from the 2nd century AD, and although it has been heavily restored over the years, it is one of the earliest Buddhist temples that still survives today.</div>","Mahabodhi Temple");
	
	
	// 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);


		
	
	 // put the assembled sidebar_html contents into the sidebar div
    //document.getElementById("sidebar").innerHTML = sidebar_html;
    }

	//]]>