// 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    -->
		
	
		 // Cathedral Church of St. Paul
	var point = new GPoint(-71.062333,42.355747);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Cathedral of St. Paul</b></a><br><br></div>","Cathedral Church of St. Paul");
	
		 // Christian Science Mother Church
	var point = new GPoint(-71.085062,42.34447);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/usa/boston-christian-science-mother-church.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/usa/images/boston/thumbs/mother-ext-cc-selva.jpg'><b>First Church of Christ, Scientist</b></a><br><br>The First Church of Christ, Scientist, a.k.a. the Mother Church, is the world headquarters of the Christian Science faith founded by Mary Baker Eddy. It includes two church buildings, dating from 1894 and 1906.</div>","Christian Science Mother Church");
	
		 // Old North Church
	var point = new GPoint(-71.054394,42.366345);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/usa/boston-old-north-church.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/usa/images/boston/thumbs/old-north-ext-cc-a-e-wolf.jpg'><b>Old North Church</b></a><br><br>Founded in 1723, Old North is the oldest church in Boston. It is best known for its steeple, which famously displayed the lanterns signalling the advance of the British troops - &quot;one if by land, two if by sea.&quot;</div>","Old North Church");
	
		 // Old South Church
	var point = new GPoint(-71.078142,42.350271);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Old South Church</b></a><br><br></div>","Old South Church");
	
		 // Park Street Church
	var point = new GPoint(-71.062151,42.356911);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/usa/boston-park-street-church.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/usa/images/boston/thumbs/park-st-sunset-cc-sushiesque.jpg'><b>Park Street Church</b></a><br><br>Founded in 1809 as a bastion of Trinitarian orthodoxy against the Unitarian movement, this Congregational church with a tall spire has played an important role in Boston's history and remains vibrant today.</div>","Park Street 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;
    }

	//]]>