// 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;
}



  

<!--    begin pulling data    -->
	
	
	
	
	// 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);

	 
			 
		 // Church of St. Catherine
	var point = new GPoint(35.207652,31.704502);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/israel/bethlehem-st-catherine.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/israel/bethlehem-st-catherine-pictures/thumbs/jerome-catherine-cc-sailorwind.jpg'><b>Church of St. Catherine</b></a><br><br>This Catholic church adjacent to the Nativity Church marks the appearance of Christ to St. Catherine of Alexandria, and may incorporate the monastery of St. Jerome.</div>","");
		 
		 // Church of the Nativity
	var point = new GPoint(35.20733,31.704274);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/israel/bethlehem-church-of-the-nativity.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/israel/bethlehem-church-of-nativity-pictures/thumbs/birthplace-cc-lolay.jpg'><b>Church of the Nativity</b></a><br><br>This is a major Christian holy site, as it marks the traditional place of Christ's birth. It is also one of the oldest surviving Christian churches.</div>","");
		 
		 // Milk Grotto
	var point = new GPoint(35.209229,31.703215);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/israel/bethlehem-milk-grotto.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/israel/images/thumbnails50/bethlehem-milk-grotto-cc-sailorwind.jpg'><b>Milk Grotto</b></a><br><br>According to tradition, Mary nursed Jesus here and spilled a drop of milk, turning the ground white. Christian and Muslim women collect stone scrapings for fertility.</div>","");
		 
		 // Rachels Tomb
	var point = new GPoint(35.202127,31.72041);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/israel/bethlehem-rachels-tomb.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/israel/rachels-tomb-pictures/thumbs/top-2000-c-rachelstomb.JPG'><b>Tomb of Rachel</b></a><br><br>The burial place of the biblical matriarch Rachel, wife of Jacob. For Jews, it is the third holiest site after the Temple Mount and the Tomb of the Patriarchs.</div>","");
	
		 
		 // Shepherds Fields
	var point = new GPoint(35.231534,31.693247);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/israel/bethlehem-shepherds-fields.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/israel/images/thumbnails50/beit-sahour-shepherds-field-looking-east-to-cc-tbass.jpg'><b>Shepherds Fields</b></a><br><br>Fertile fields identified since ancient times with the shepherds who saw the Star of Nativity. There are two rival locations, one run by the Greek Orthodox and the other by the Franciscans.</div>","");
	
	// Umar Mosque
	var point = new GPoint(35.205839,31.704639);
	createMarker(point,"<div id=bubble><b>Umar Mosque</b><br><br>This mosque was built in the 19th century and rebuilt in 1954.</div>","");
	
	 // put the assembled sidebar_html contents into the sidebar div
    //document.getElementById("sidebar").innerHTML = sidebar_html;
    }

	//]]>