// 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    -->
		 
		 // Agora
	var point = new GPoint(27.138934, 38.418654);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/turkey/izmir-agora.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/turkey/images/thumbnails50/izmir-agora-hlp.jpg'><b>Agora</b></a><br><br></div>","Agora (Ancient Smyrna)");
		 
			 // Archaeological Museum
	var point = new GPoint(27.128071, 38.414118);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/turkey/izmir-archaeological-museum.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/turkey/images/thumbnails50/izmir-museum-statue-c-osseman.jpg'><b>Archaeological Museum</b></a><br><br></div>","Archaeological Museum");
	
		 // Atatürk Monument
	var point = new GPoint(27.134546, 38.428816);
	createMarker(point,"<div id=bubble><b>Atatürk Monument</b><br><br></div>","Atatürk Monument");
		 
	 // Clock Tower
	var point = new GPoint(27.128184, 38.419225);
	createMarker(point,"<div id=bubble><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Clock Tower</b><br><br>Saat Kulesi, a late Ottoman clock tower and landmark of Izmir.</div>","Clock Tower");
		 
	 // St. John's Church
	var point = new GPoint(27.139277, 38.428631);
	createMarker(point,"<div id=bubble><b>St. John's Church</b><br><br>A Roman Catholic church, completed in 1874 with the help of donations from the Catholics of Lyon, France. It has a richly decorated interior.</div>","St. John's Church");
		 
	
	
	// 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);

 // Bus Station
	var point = new GPoint(27.126296, 38.416476);
	createMarker(point,"<div id=bubble><b>Bus Station</b><br><br>Buses leave here for nearby destinations like Bergama.</div>","Bus Station");

 // Ferry Port
	var point = new GPoint(27.12725, 38.418628);
	createMarker(point,"<div id=bubble><b>Ferry Port</b><br><br></div>","Ferry Port");
		
	
	 // put the assembled sidebar_html contents into the sidebar div
    document.getElementById("sidebar").innerHTML = sidebar_html;
    }

	//]]>