// 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    -->
	
	
	// Meiji Shrine
	var point = new GPoint(139.699413,35.675984);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/tokyo-meiji-shrine.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/tokyo-meiji-torii.jpg'><b>Meiji Shrine</b></a><br><br>A Shinto shrine dedicated to the souls of Emperor Meiji and Empress Shoken, Meiji is surrounded by lush forests that are a haven of peace in the big city.</div>","Meiji Shrine");
	
	// Sensoji
	var point = new GPoint(139.796761,35.71475);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/tokyo-sensoji.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/tokyo-sensoji-from-hotel-cc-everjean.jpg'><b>Sensoji Temple</b></a><br><br>This ancient temple in Asakusa is home to the biggest festival in Tokyo and features a huge main gate, a five-story pagoda, and a main hall dedicated to Kannon.</div>","Sensoji Temple");
	
	// Yasakuni Shrine
	var point = new GPoint(139.743106,35.694084);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/tokyo-yasukuni-shrine.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/tokyo-yasakuni-hall2-cc-erutan.jpg'><b>Yasakuni Shrine</b></a><br><br>A Shinto shrine honoring Japanese soldiers killed in combat, Yasakuni also functions as a Japanese war museum.</div>","Yasakuni Shrine");

	// Zojoji Temple
	var point = new GPoint(139.748376,35.657479);
	createMarker(point,"<div id=bubble><b>Zojoji Temple</b><br><br>The main temple of the Chinzai sect of Shingon Buddhism, with graves of Tokugawa shoguns.</div>","Zojoji 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;
    }

	//]]>