// 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    -->
	
		 	
		 // Beram Church
	var point = new GPoint(13.90,45.25);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/croatia/beram-church-of-st-mary.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/croatia/images/thumbs/dance-of-death-pd.jpg'><b>Beram Church</b></a><br><br>The Church of St. Mary of the Rocks is a tiny chapel in the woods outside Beram in Istria known for the magnificent 15th-century frescoes that dance on the walls.</div>","Beram Frescoed Church");
	
		
		 // Dubrovnik
	var point = new GPoint(18.110222,42.639894);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/croatia/dubrovnik.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/croatia/images/dubrovnik/thumbs/churches-cc-lawrence-op.jpg'><b>Dubrovnik</b></a><br><br>Despite a major earthquake in 1664 and serious war damage in 1991, Dubrovnik remains a city of pristine beauty. It is home to several historic churches and monasteries and many fine examples of religious art.</div>","Dubrovnik");
	
		
		 // Kolocep Island
	var point = new GPoint(18.007236,42.672907);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/croatia/kolocep-churches.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/croatia/images/thumbs/crkvica-na-kalamoti-pre-rom-cc-oranges-and-lemons.jpg'><b>Kolocep Island</b></a><br><br>Kolocep is the nearest of the Elaphite Islands to Dubrovnik and has been a popular summer retreat for city dwellers since the 16th century. It is dotted with a number of small pre-Romanesque churches.</div>","Kolocep Island Churches");
	
		 // Lopud
	var point = new GPoint(17.941532,42.692088);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/croatia/lopud-franciscan-monastery.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/croatia/images/thumbs/lopud-monastery-view-cc-kwsdurango.jpg'><b>Franciscan Monastery, Lopud</b></a><br><br>The main architectural attraction of the village of Lopud on Lopud Island is the 15th-century Franciscan Monastery, which contains some fine Renaissance artworks.</div>","Lopud Monastery");
	
	
	
	// 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;
    }

	//]]>
