// 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    -->
			 
	 	 
	 
		 // Great Temple
	var point = new GPoint(35.442055,30.328407);
	createMarker(point,"<div id=bubble><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/jordan/petra-pictures/thumbs/great-temple-nc.jpg'><b>Great Temple</b><br><br>This temple ruin in the city center is one of the largest structures in Petra at 7,000 square meters. It was built in the late 1st century BC and is still being excavated.</div>","Great Temple");
	
		 
		 // High Place of Sacrifice 
	var point = new GPoint(35.44669,30.322313);
	createMarker(point,"<div id=bubble><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/jordan/petra-pictures/thumbs/high-place-altar-c-mansour-mouasher-pbase.jpg'><b>High Place of Sacrifice </b><br><br>This is one of the most easily accessible high points in Petra. A platform served as a venue for religious ceremonies and an altar held sacrifices of incense, libations - and perhaps children.</div>","High Place of Sacrifice ");
		 
		 // Petra Church 
	var point = new GPoint(35.444207,30.330676);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/jordan/petra-church.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/jordan/petra-pictures/thumbs/church-mosaics2-c-worldwander.JPG'><b>Petra Church </b></a><br><br>Amidst Petra's ancient temples is a Byzantine church dating from the 5th and 6th centuries. Still being excavated, Petra Church contains some extraordinary mosaics.</div>","Petra Church ");
		 
		 // The Monastery (al-Deir) 
	var point = new GPoint(35.437753,30.348352);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/jordan/petra-monastery.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/jordan/petra-pictures/thumbs/monastery-fsp.JPG'><b>The Monastery (al-Deir)</b></a><br><br>Misleadingly named based on crosses scratched on the wall, this is a huge, rock-carved Nabatean temple built around the 1st century BC.</div>","The Monastery (al-Deir)");
		 
		 // The Treasury (al-Khazneh)
	var point = new GPoint(35.451186,30.322387);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/jordan/petra-treasury.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/jordan/petra-pictures/thumbs/treasury-cc-Aaron-Wenner.jpg'><b>The Treasury (al-Khazneh)</b></a><br><br>Believed by the Bedouin to contain a pharoah's treasure, the Treasury is a beautiful tomb or temple carved entirely out of the living rock.</div>","The Treasury (al-Khazneh)");
		 
		 // Obelisk Tomb
	var point = new GPoint(35.463138,30.321165);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/jordan/petra-siq.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/jordan/petra-pictures/thumbs/obelisk-tomb-cc-Cybjorg.jpg'><b>Obelisk Tomb</b></a><br><br>The obelisks of the Obelisk Tomb guard a rock-hewn cave containing graves; like the god-blocks, the obelisks probably represented a god and divine energy in material form. Between the four obelisks is an eroded figure in a niche.</div>","");
		 
		 // Qasr el-Bint
	var point = new GPoint(35.43991,30.329592);
	createMarker(point,"<div id=bubble><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/jordan/petra-pictures/thumbs/qasr-el-bint2-cc-sasa-mutic.jpg'><b>Qasr el-Bint</b><br><br>The &quot;Palace of the Pharaoh's Daughter&quot; (another fanciful Bedouin name) is a large, square Nabatean temple dating from the late 1st century BC in Petra's city center.</div>","Qasr el-Bint");
	
	
		
	
	 // put the assembled sidebar_html contents into the sidebar div
    //document.getElementById("sidebar").innerHTML = sidebar_html;
    }

	//]]>