// 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    -->
	
	
		
		 // Bulguksa
	var point = new GPoint(129.332,35.79);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/south-korea/bulguksa.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/south-korea/images/thumbs/dabotap-pagoda-cc-eimoberg.jpg'><b>Bulguksa</b></a><br><br>An important example of 8th-century Silla architecture, home to no less than seven Korean national treasures.</div>","Bulguksa Temple");
	
		 // Haeinsa
	var point = new GPoint(128.1,35.8);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/south-korea/haeinsa.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/south-korea/images/thumbs/tripitaka-cc-erik-shin.jpg'><b>Haeinsa</b></a><br><br>Best known for its complete copy of the Buddhist scriptures, the 14th-century Tripitaka Koreana.</div>","Haeinsa Temple");
	
	
		 // Seokguram Grotto
	var point = new GPoint(129.349,35.7916);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/south-korea/seokguram-grotto.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/south-korea/images/thumbs/buddha-wc-gfdl.jpg'><b>Seokguram Grotto</b></a><br><br>An 8th-century Buddhist cave temple in the hills above Bulguksa, this is the only structure surviving fully intact from the Silla era. </div>","Seokguram Grotto");
	
	// Seoul
	var point = new GPoint(126.987534,37.535866);
	createMarker(point,"<div id=bubble><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/south-korea/images/thumbs/seoul-cityscape-wp-gfdl.jpg'><b>Seoul</b><br><br>South Korea's capital city is home to numerous temples, shrines and churches.</div>","Seoul");
	
	// 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;
    }

	//]]>