// 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    -->
	 		 
		 // Agios Ioannis Chrysostomos Monastery
	var point = new GPoint(33.418378, 35.274247);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Agios Ioannis Chrysostomos Monastery</b></a><br><br></div>","Agios Ioannis Chrysostomos Monastery");
	 
		 // Agios Panteleimon Monastery
	var point = new GPoint(33.139547, 35.054289);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Agios Panteleimon Monastery</b></a><br><br></div>","Agios Panteleimon Monastery");
		 
		 // Aphrodite's Rock
	var point = new GPoint(32.627163, 34.663923);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/cyprus/aphrodites-rock-petra-tou-romiou.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Aphrodite's Rock</b></a><br><br></div>","Aphrodite's Rock");
	
		 // Baths of Aphrodite
	var point = new GPoint(32.335424, 35.060774);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Baths of Aphrodite</b></a><br><br></div>","Baths of Aphrodite");
	 	 	 	 
		 // Bellapais Abbey - approx, based on Google coding for Bellapais
	var point = new GPoint(33.392065, 35.306887);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/cyprus/bellapais-abbey.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Bellapais Abbey</b></a><br><br></div>","Bellapais Abbey");
	
		 // Choirokoitia
	var point = new GPoint(33.343333, 34.798056);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Choirokoitia</b></a><br><br>The Neolithic settlement of Choirokoitia was occupied from the 7th to the 4th millennium BC. One of the most important prehistoric sites in the eastern Mediterranean, its remains and the finds from the excavations there have thrown much light on the evolution of human society in this key region. </div>","Choirokoitia");
		 	 
		 // Larnaca
	var point = new GPoint(33.624001, 34.922534);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Larnaca</b></a><br><br></div>","Larnaca");
		 	 
		 // Larnaca - Ancient Kition
	var point = new GPoint(33.632959, 34.920027);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/cyprus/larnaca-ancient-kition.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Larnaca - Ancient Kition</b></a><br><br></div>","Larnaca - Ancient Kition");
	
		 // Larnaca - Ayios Lazaros
	var point = new GPoint(33.634826, 34.911515);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/cyprus/larnaca-ayios-lazaros.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Larnaca - Ayios Lazaros</b></a><br><br></div>","Larnaca - Ayios Lazaros");
	
		 // Lefkara - Church of Archangel Michael
	var point = new GPoint(34.863447, 35.054289);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Lefkara - Church of Archangel Michael</b></a><br><br>This single-aisled domed church in Kato Lefkara has wall paintings dating from the late 12th century.</div>","Lefkara - Church of Archangel Michael");
	 
		 // Lefkara - Holy Cross Church
	var point = new GPoint(33.308506, 34.865783);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b> - Holy Cross Church</b></a><br><br>A religious festival takes place here on September 13 and 14 in celebration of the Exaltation of the Holy Cross.</div>","Lefkara - Holy Cross Church");
		 	 
		 // Limassol
	var point = new GPoint(33.043098, 34.682064);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Limassol</b></a><br><br></div>","Limassol");
	
		 // Nicosia
	var point = new GPoint(33.357239, 35.156968);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Nicosia</b></a><br><br></div>","Nicosia");
	
		 // Paphos
	var point = new GPoint(32.405833, 34.798333);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Paphos</b></a><br><br></div>","Paphos");
			
		 // Salamis
	var point = new GPoint(33.878889, 35.183611);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Salamis</b></a><br><br>Summary</div>","Salamis");
	
		// Troodos Painted Churches
	var point = new GPoint(33.095833, 34.920000);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Troodos Painted Churches</b></a><br><br></div>","Troodos Painted Churches");
	
	
	
	 // put the assembled sidebar_html contents into the sidebar div
    //document.getElementById("sidebar").innerHTML = sidebar_html;
    }

	//]]>