// 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    -->
	
		 
		 // Kamakura
	var point = new GPoint(139.53568,35.316697);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/kamakura.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/kamakura-daibutsu-face-cc-charlton.jpg'><b>Kamakura</b></a><br><br>Kamakura is most famous for its Great Buddha, but it also has a number of interesting temples and shrines to explore: it has sometimes been called the &quot;Kyoto of Eastern Japan.&quot; Kamakura was once the capital of the country, when Minamoto Yoritomo chose the city as the seat of his new military government in 1192. </div>","");
	
		 
		 // Kyoto
	var point = new GPoint(135.747728, 34.981183);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/kyoto.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>Kyoto</b></a><br><br>Nestled in the mountains of Western Honshu, Kyoto has earned a worldwide reputation as the most beautiful city in Japan. Kyoto is known as the city of a thousand temples, but actually it has more. It is home to an astonishing 1,600 Buddhist temples, plus 400 Shinto shrines, a trio of palaces, and dozens of gardens and museums. </div>","");
	
	
		 
		 // Nara
	var point = new GPoint(135.83362,34.683326);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/nara.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>Nara</b></a><br><br>Japanese and foreigners alike flock to Nara for a glimpse of Old Japan. Many of its historic buildings and temples remain intact, and long ago many of these historical structures were enclosed in the peaceful confines of the large and spacious Nara Park. </div>","");
		 
		 // Nikko
	var point = new GPoint(139.616667,36.75);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/nikko.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/japan/images/thumbnails75/nikko-bridge-cc-royalt.jpg'><b>Nikko</b></a><br><br>Nikko has been a sacred place since the 8th century, when a Buddhist hermitage was established here. In time, it became prominent for its training centers for Buddhist priests. Today, several shrines and temples are clustered in Nikko, amid a magnificent forest of over 13,000 cedar trees, spectacular waterfalls and mountain scenery.</div>","");
	
		 
		 // Shikoku Island
	var point = new GPoint(133.417969,33.733477);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/shikoku-88-temple-pilgrimage.htm'><b>Shikoku Island</b></a><br><br>Home to a 1,647-kilometer Buddhist pilgrimage circuit. </div>","");
		 
		 // Tokyo
	var point = new GPoint(139.77356, 35.667338);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/japan/tokyo.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>Tokyo</b></a><br><br>The capital and most populous city in Japan, Tokyo is home to numerous Buddhist temples, Shinto shrines, and other sacred sites ranging from Christian churches to Confucian temples. It is also a good base for a day trip to Kamakura. </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);


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

	//]]>