// 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 of St. John the Divine 
	var point = new GPoint(-73.961656, 40.803545);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/usa/new-york-city-cathedral-of-st-john-the-divine.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/usa/images/thumbnails50/nyc-st-john-facade-light-cc-kevin813.jpg'><b>Cathedral of St. John the Divine </b></a><br><br>This Episcopal cathedral on the Upper West Side is the largest cathedral in the world, despite still being incomplete. It is known for its strong interfaith tradition.</div>","Cathedral of St. John the Divine ");
		 	 
		 // Mahayana Buddhist Temple
	var point = new GPoint(-73.9952861, 40.7166639);
	createMarker(point,"<div id=bubble><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Mahayana Buddhist Temple</b><br><br>An active Chinese Buddhist temple in Chinatown, with a giant golden Buddha and a hall decorated with prints showing events from the Buddha's life.</div>","Mahayana Buddhist Temple");
	
		 // Museum of Jewish Heritage
	var point = new GPoint(-74.018766, 40.706197);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/usa/new-york-city-museum-of-jewish-heritage.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/usa/images/thumbnails50/nyc-jewish-museum-c-brad-morrissey.jpg'><b>Museum of Jewish Heritage</b></a><br><br>Opened in 1997, this uniquely designed building in Lower Manhatten commemorates the victims of the Holocaust. It includes a kosher café.</div>","Museum of Jewish Heritage");
		 
		 // Shrine of St. Elizabeth Seton
	var point = new GPoint(-74.013788, 40.702511);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/usa/new-york-city-shrine-of-st-elizabeth-bayley-seton.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/usa/images/thumbnails50/nyc-ourladyoftherosary-setonshrine-offic.jpg'><b>Shrine of St. Elizabeth Seton</b></a><br><br>This Catholic church and shrine is dedicated the first American-born saint, an Episcopalian convert who was canonized in 1975.</div>","Shrine of St. Elizabeth Seton");
		 
		 // St. Patrick's Cathedral
	var point = new GPoint(-73.97614, 40.758652);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/usa/new-york-city-st-patrick-cathedral.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/usa/images/thumbnails50/nyc-st-patricks-cathedral-5th-ave-facade-wp-gfdl.jpg'><b>St. Patrick's Cathedral</b></a><br><br>St. Patrick's is the largest Catholic cathedral in the United States. Rooted in Irish Catholic heritage, it hosted many of the funerals for fallen police and firefighters after 9/11.</div>","St. Patrick's Cathedral");
		 
		 // Temple Emanu-El
	var point = new GPoint(-73.969654, 40.768167);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/usa/new-york-city-temple-emanu-el.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/usa/images/thumbnails50/nyc-temple-emanuel-facade-cc-rosemaniakos.jpg'><b>Temple Emanu-El</b></a><br><br>Accommodating 2,500 worshippers, Temple Emanuel-El is the largest synagogue in the world.</div>","Temple Emanu-El");
	
		 
		 // Trinity Church
	var point = new GPoint(-74.012119, 40.708084);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/usa/new-york-city-trinity-church.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/usa/images/thumbnails50/nyc-trinity-church-and-wtc-c-officsite.jpg'><b>Trinity Church</b></a><br><br>This Wall Street house of worship features neo-Gothic flying buttresses, beautiful stained-glass windows, and vaulted ceilings. It was the setting for the movie National Treasure.</div>","Trinity 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;
    }

	//]]>