// 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    -->
	
		 
		 // Ggantija Temples 
	var point = new GPoint(14.2689,36.0472);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/malta/ggantija-temples.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Ggantija Temples</b></a><br><br>Ggantija is the site of two prehistoric temples on Gozo, the second-largest island in Malta. One of the Ggantija temples is the oldest free-standing stone structure in the world. Round in shape and containing statues of full-figured goddesses, these temples were dedicated to the Earth Mother and probably included an oracle. </div>","Ggantija Temples");
	
		 	 
		 // Hagar Qim
	var point = new GPoint(14.442236, 35.827748);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/malta/hagar-qim-temple.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Hagar Qim</b></a><br><br>The 5,000-year-old Hagar Qim temple is the best-preserved of several ancient limestone temples in Malta. The temple is laid out on a clover-leaf shape and consists of four or five apses, with a forecourt and facade. </div>","Hagar Qim");
		 
		 // Mdina - St Paul's Cathedral
	var point = new GPoint(14.404031, 35.886555);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/malta/mdina-st-paul-cathedral.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Cathedral of St. Paul, Mdina</b></a><br><br>A 17th-century cathedral built on the traditional site of the town house of the governor Publius, who received St. Paul when he was shipwrecked on Malta.</div>","Mdina - Cathedral of St. Paul");
	
		 // Mnajdra Temples
	var point = new GPoint(14.4364, 35.826765);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/malta/mnajdra-temples.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Mnajdra Temples</b></a><br><br>The Mnajdra Temples  are three conjoined Neolithic temples on the southern coast of Malta. Dating from about 3000 BC, Mnajdra is reminiscent of the even earlier complex at Ggantija on Gozo.</div>","Mnajdra Temples");
		 	 	 
		 // Mosta Rotunda
	var point = new GPoint(14.425993, 35.910117);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/malta/mosta-rotunda-church-of-st-mary.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Mosta Rotunda</b></a><br><br>This impressive 19th-century church is known for having the third-largest dome in Europe and for having miraculously survived a German bomb in 1942.</div>","Mosta Rotunda");
	
		 // Rabat - St. Paul's Catacombs - approx., need better map to check
	var point = new GPoint(14.398516, 35.881644);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/malta/rabat-st-pauls-catacombs.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Catacombs of St. Paul, Rabat</b></a><br><br>These extensive third-century catacombs are the earlier Christian archaological sites in Malta.</div>","Rabat - Catacombs of St. Paul");
	
		 // Rabat - St. Paul's Church
	var point = new GPoint(14.399203, 35.881844);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/malta/rabat-st-pauls-church.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Church and Grotto of St. Paul, Rabat</b></a><br><br></div>","Rabat - Church of St. Paul");
		 
		 // Tarxien Temples
	var point = new GPoint(14.511819, 35.869119);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/malta/tarxien-temples.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Tarxien Temples</b></a><br><br>The Tarxien temples are four megalithic temples constructed in southern Malta between 3600 and 2500 BC. They are notable for their complexity, fine construction and variety of figural carvings.</div>","Tarxien Temples");
	
	
	// 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
  
    }

	//]]>
