// 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    -->
	
	 	 	 
		 // Altar of Zeus
	var point = new GPoint(27.183094,39.130634);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/turkey/images/thumbnails50/bergama-zeus-altar-cc-slimnastics.jpg'><b></b></a><br><br>The Zeus Altar was constructed by Eumenes II (197-159 BC) as a memorial of his victory against the Galatians.   All that remains today in Pergamum are the foundations, but the site gives a sense of the altar's size and spectacular location.</div>","");
	
		 // Asklepion
	var point = new GPoint(27.16508,39.118691);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/turkey/bergama-asklepion.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/turkey/images/thumbnails50/bergama-asklepion-tunnel-c-andrys-basten.jpg'><b>Asklepion</b></a><br><br>he Asklepion in Pergamum was a famed ancient medical center dedicated to Asklepius, the god of healing. Many of the treatments employed at Pergamum, in complement with a sacred source of water that was later discovered as having radioactive properties, have been used for centuries and are once again finding modern application.</div>","");
		 
		 // Pergamum Archaeological Museum
	var point = new GPoint(27.175316,39.116568);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/turkey/bergama-archaeological-museum.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/turkey/images/thumbnails50/bergama-museum-freize-animal-sacrifice-c-osseman.jpg'><b>Pergamum Archaeological Museum</b></a><br><br></div>","");
		 
		 // Red Basilica (Kizil Avlu)
	var point = new GPoint(27.181195,39.123152);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/turkey/bergama-red-basilica.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/turkey/images/thumbnails50/bergama-red-basilica-c-osseman.jpg'><b>Red Basilica (Kizil Avlu)</b></a><br><br></div>","");
	
	
	// 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;
    }

	//]]>
