// 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    -->
			 
	 	 
		 // Amman
	var point = new GPoint();
	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>","");
	
	
		 // Bethany (Baptism Site)
	var point = new GPoint(35.546758,31.83697);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Bethany (Baptism Site)</b></a><br><br></div>","Bethany (Baptism Site)");
	
	
		 // Jerash
	var point = new GPoint(35.891004,32.281899);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/jordan/jerash.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Jerash</b></a><br><br></div>","Jerash (Gerasa)");
	
	
		 // Kerak Castle
	var point = new GPoint(35.70133,31.180827);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Kerak Castle</b></a><br><br>Kerak is a Jordanian town south of Madaba on the old King's Highway. Perched atop a hill with a sheer drop on three sides, Kerak is dominated by the most massive and best preserved of the Crusader castles in the region. </div>","Kerak Castle");
	
		 // Madaba Map
	var point = new GPoint(35.794283,31.717663);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Madaba Map</b></a><br><br>In the late 19th century, many mosaics were uncovered throughout Madaba. The most famous of these  is the Madaba Map, a highly valuable 6th-century mosaic map of the Holy Land. It can be seen in the Greek Orthodox Monastery of St. George. </div>","Madaba Map");
	
		 // Mount Nebo
	var point = new GPoint(35.725624, 31.767717);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Mount Nebo</b></a><br><br>This mountain overlooking Madaba has long been identified as Mt. Nebo, the mountain from which Moses saw the Promised Land before he died. This has been an important place of Christian pilgrimage for over 1,600 years. Splendid Byzantine mosaics from the early church have recently been uncovered, and a simple modern church has been built over them. Just as in Moses' time, there are splendid views of the &quot;Promised Land&quot; from here.</div>","Mount Nebo");
	
	
		 // Petra
	var point = new GPoint(35.451186,30.322387);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Petra</b></a><br><br></div>","Petra");
	
	
	// Umm Qais
	var point = new GPoint(35.683333,32.65);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Umm Qais</b></a><br><br></div>","Umm Qais");
	
		
	
	 // put the assembled sidebar_html contents into the sidebar div
    //document.getElementById("sidebar").innerHTML = sidebar_html;
    }

	//]]>