// 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    -->
	
		 	 
		
		 // Bahai Shrine
	var point = new GPoint(34.987335,32.815483);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/israel/haifa-bahai-shrine-and-gardens.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/israel/images/thumbnails50/6808-800.jpg'><b>Bahai Shrine</b></a><br><br>This important holy site of the Baha\'i Faith is home to the Shrine of the Bab, administrative buildings and famous terraced gardens. Pilgrims come to the shrine from all parts of the world to pay homage to the first leaders of their faith.</div>","Bahai Shrine");
	
	
		 // Elijah's Cave
	var point = new GPoint(34.964933,32.829043);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/israel/haifa-elijahs-cave.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/israel/images/thumbnails50/tomb2-c-zyzy.jpg'><b>Elijah's Cave</b></a><br><br>An important shrine to several religions, this chapel near Stella Maris includes the very cave in which the Hebrew prophet Elijah is believed to have lived and taught.</div>","Elijah's Cave");
	
		 // Stella Maris Monastery
	var point = new GPoint(34.96974,32.82587);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Stella Maris Carmelite Monastery</b></a><br><br></div>","Stella Maris Monastery");
	
	
	// 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;
    }

	//]]>
