// 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    -->
	 
		 // Fraumünster (Church of Our Lady) 
	var point = new GPoint(8.541344,47.369648);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/switzerland/zurich-fraumunster.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/switzerland/images/thumbs/zurich-fraumunster-chagall-window-cc-raelb.jpg'><b>Fraumünster (Church of Our Lady)</b></a><br><br>Built over an abbey church founded in 835, this 13th-century church is known for its elegant spire and Marc Chagall windows.</div>","Fraumünster (Church of Our Lady) ");
		 
		 // Grossmünster (Cathedral)
	var point = new GPoint(8.544048,47.370033);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/switzerland/zurich-grossmunster.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/switzerland/images/thumbs/zurich-grossmunster-cc-dspictures1-200h.jpg'><b>Grossmünster (Cathedral)</b></a><br><br>The unique and imposing Great Minster was built in 1090 by Charlemagne as a shrine to local martyrs. Later, Zwingli preached the Reformation from its pulpit.</div>","Grossmünster (Cathedral)");
		 
		 // Schweizerisches Landesmuseum
	var point = new GPoint(8.539982,47.37918);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/switzerland/zurich-museum.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/switzerland/images/thumbs/zurich-Schweizerisches_Landesmuseum-wc-gfdl.jpg'><b>Schweizerisches Landesmuseum</b></a><br><br>Housed in a 19th-century Neo-Gothic castle, the National Museum is full of prehistoric artifacts and medieval religious art, including many altarpieces.</div>","Schweizerisches Landesmuseum");
		 
		 // St Peterskirche (St. Peter's Church)
	var point = new GPoint(8.540781,47.371058);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/switzerland/zurich-peterskirche.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/switzerland/images/thumbs/zurich-peterskirche-cc-kevin-day.jpg'><b>St Peterskirche (St. Peter's Church)</b></a><br><br>This is the oldest church in Zürich and its tower bears the largest clock face in Europe.</div>","St Peterskirche (St. Peter's Church)");
	
	
	// 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;
    }

	//]]>
