// 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    -->
	
		 // Byodoin
	var point = new GPoint(135.807708, 34.889292);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/kyoto-byodoin.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/byodoin-phoenix-hall3-cc-mshades.jpg'><b>Byodoin</b></a><br><br>Founded in 1052, this Pure Land Temple includes a rare and beautiful Pure Land garden and the famous Phoenix Hall. A World Heritage Site.</div>","Byodoin");
		 
		 // Chionin
	var point = new GPoint(135.783664, 35.006189);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/kyoto-chionin.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/chionin-street-cc-tgamblin.jpg'><b>Chionin</b></a><br><br>The head temple of Jodo (Pure Land) Buddhism, Chionin boasts the largest gate and the heaviest temple bell in Japan. It was built to represent the Pure Land on earth. </div>","Chionin");
		 	 
		 // Fushimi Inari Taisha
	var point = new GPoint(135.773339, 34.967219);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/kyoto-fushimi-inari.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/fushimi-inari-taisha-toriis-nc.jpg'><b>Fushimi Inari Taisha</b></a><br><br>This ancient Shinto shrine dedicated to Inari, the god of rice and prosperity, features a remarkable path through thousands of red torii.</div>","Fushimi Inari Taisha");
	
		 // Ginkakuji
	var point = new GPoint(135.798081, 35.026606);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/kyoto-ginkakuji.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/Ginkakuji-4-wikicommons.jpg'><b>Ginkakuji</b></a><br><br>Originally intended to be coated in silver, this harmonious temple ended up in simple wood. It houses an image of Kannon and includes lovely gardens. </div>","Ginkakuji");
		 	 
		 // Heian Jingu
	var point = new GPoint(135.781708, 35.016453);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/kyoto-heian-jingu.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/heian-building-corner-c-galen.jpg'><b>Heian Jingu</b></a><br><br>An imperial Shinto shrine built in 1895 in honor of the founding of Kyoto.</div>","Heian Jingu");
	
		 // Kinkakuji
	var point = new GPoint(135.728453, 35.039542);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/kyoto-kinkakuji.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/kinkakuji-nc-antidote3-pbase.jpg'><b>Kinkakuji</b></a><br><br>This gold-leaf-covered temple is one of the most beautiful sights in Kyoto, nestled in the woods and reflected in the waters of its garden pond. </div>","Kinkakuji");
		 	 
		 // Kiyomizudera
	var point = new GPoint(135.785047, 34.994958);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/kyoto-kiyomizudera.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/kyomizudera-view-cc-solution-63.jpg'><b>Kiyomizudera</b></a><br><br>This popular Buddhist temple offers a healing waterfall and an incredible view over the city of Kyoto from its wooden terrace.</div>","Kiyomizudera");
					 
		 // Nanzenji
	var point = new GPoint(135.793497, 35.011297);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/kyoto-nanzenji.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/nanzenji-cc-hyperbolation.jpg'><b>Nanzenji</b></a><br><br>An important Rinzai Zen temple on the Path of Philosophy, Nanzenji has a fine Zen garden and extensive grounds.</div>","Nanzenji");
	 
		 // Ryoanji
	var point = new GPoint(135.718236, 35.034519);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/kyoto-ryoanji.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/Ryoanji-rock-garden2-DHD.jpg'><b>Ryoanji</b></a><br><br>A World Heritage Site famed for its Zen rock garden.</div>","Ryoanji");
		 	 
		 // Sanjusangendo
	var point = new GPoint(135.772081, 34.987997);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/kyoto-sanjusangendo.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/sanjusangendo-cc-royalt-flickr.jpg'><b>Sanjusangendo</b></a><br><br>Sanjusangendo houses 1,001 statues of Kannon in Japan's longest wooden building.</div>","Sanjusangendo");
		 
		 // Toji
	var point = new GPoint(135.747728, 34.981183);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/kyoto-toji.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/Toji-temple-pagoda-March-2004-wikicommons-sm.jpg'><b>Toji</b></a><br><br>A Shingon Buddhist temple in the center of the city, Toji includes a five-story pagoda that is the tallest wooden tower in Japan.</div>","Toji");
	
		 // Yasaka Shrine
	var point = new GPoint(135.779250, 34.998661);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/kyoto-yasaka-shrine.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/yasaka-lanterns-cc-laurenz.jpg'><b>Yasaka Shrine</b></a><br><br>This Shinto shrine to the god of health and prosperity was the site of the first Gion Matsuri festival. It remains the spiritual heart of Kyoto. </div>","Yasaka Shrine");
	
	

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

	//]]>
