// 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    -->
	 
			 
		 // French Church Romanesque
	var point = new GPoint(7.446713,46.949024);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/switzerland/bern-french-church.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Französische Kirche (French Church) </b></a><br><br>The oldest church in Bern (1270) and originally part of a Dominican monastery, this has welcomed French-speaking Protestants since 1623. It is especially notable for its rare frescoed rood screen.</div>","");
		 	 
		 // Heiliggeistkirche
	var point = new GPoint(7.440705,46.948116);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/switzerland/bern-heiliggeistkirche.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/switzerland/bern-heiliggeistkirche-pictures/thumbs/d80_a_136.jpg'><b>Heiliggeistkirche</b></a><br><br>This church near the train station is acclaimed as Switzerland's finest example of Protestant church building. Dating from the 1720s, the church has a fine Baroque interior.</div>","");
	
		 // Munster
	var point = new GPoint(7.451397,46.947325);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/switzerland/bern-cathedral.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/switzerland/images/thumbs/bern-munster.jpg'><b></b></a><br><br>The Münster (originally Cathedral of St. Vincent), is a late-Gothic church with magnificent carved portals. Its spire is the tallest in Switzerland.</div>","");
		 	 
		 // Nydegg Church
	var point = new GPoint(7.457324,46.948885);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b></b></a><br><br></div>","");
	
		 // St Peter and St Paul Catholic
	var point = new GPoint(7.45167,46.948786);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b></b></a><br><br></div>","");
	
	 // Zytglogge
	var point = new GPoint(7.447733,46.948039);
	createMarker(point,"<div id=bubble><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Title</b><br><br>Bern's famous medieval clock tower.</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;
    }

	//]]>
