// 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    -->
	
		 
		 // Gangoji
	var point = new GPoint(135.831367, 34.677794);
	createMarker(point,"<div id=bubble><b>Gangoji</b><br><br></div>","Gangoji");
		 	 
		 // Horyuji
	var point = new GPoint(135.734389, 34.614588);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/nara-horyuji.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/nara-horyuji-cc-chaojikazu.jpg'><b>Horyuji</b></a><br><br>Founded in 607 AD, Horyuji is where Buddhism blossomed and spread throughout Japan. The temple boasts the oldest wooden building in the world.</div>","Horyuji");
		 
		 // Kasuga Shrine
	var point = new GPoint(135.848333, 34.681569);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/nara-kasuga-grand-shrine.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/nara-kasuga-lanterns2-cc-bisku.jpg'><b>Kasuga Shrine</b></a><br><br>This important Shinto shrine was founded in 768 and is filled with over 3,000 bronze and stone lanterns.</div>","Kasuga Shrine");
	
		 // Kofukuji
	var point = new GPoint(135.83362, 34.683326);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/nara-kofukuji.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/nara-kofukuji-five-story-pagoda-cc-mil.jpg'><b>Kofukuji</b></a><br><br>This temple has two pagodas, one of which is the second-highest in Japan. Many Buddhist statues and artworks are on display in the Treasure House.</div>","Kofukuji");
		 
		 // Nara National Museum
	var point = new GPoint(135.837653, 34.683189);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/nara-national-museum.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/nara-natl-museum-wp-jp-gfdl.jpg'><b>Nara National Museum</b></a><br><br>Opened in 1895, this museum houses many pieces of Buddhist art plus temple artifacts and archaeological finds from local tombs and sutra mounds.</div>","Nara National Museum");
	
	// Nara Station
	var point = new GPoint(135.819372, 34.680608);
	createMarker(point,"<div id=bubble><img style='border-color:#666666' border='0' hspace='5' align='left' src=''><b>Nara Station</b><br><br>Nara's Japan Rail (JR) train station.</div>","Nara Train Station");
	
	// Senjudo
	var point = new GPoint(135.835819, 34.688751);
	createMarker(point,"<div id=bubble><b>Senjudo</b><br><br></div>","Senjudo");
		 	 
		 // Shin Yakushiji
	var point = new GPoint(135.845497, 34.675614);
	createMarker(point,"<div id=bubble><b>Shin Yakushiji</b><br><br></div>","Shin Yakushiji");
	
		 // Shoso-in Treasury
	var point = new GPoint(135.838619, 34.691856);
	createMarker(point,"<div id=bubble><b>Shoso-in Treasury</b><br><br></div>","Shoso-in Treasury");
	
		 
		 // Todaiji
	var point = new GPoint(135.839853, 34.688981);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/nara-todaiji.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/nara-todaiji-diabutsu.jpg'><b>Todaiji</b></a><br><br>Founded when Nara was the capital, Todaiji was the head temple of all provincial temples in Japan. It is home to the largest Buddha statue in Japan, which weighs 250 tons.</div>","Todaiji");
	

	
	// 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;
    }

	//]]>