// 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    -->
	
	// 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);
	
	 
		 // El Cobre
	var point = new GPoint(-75.952606, 20.056012);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/cuba/el-cobre.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/cuba/images/thumbs/cobre-virgin-statue-cc-tgraham.jpg'><b>El Cobre</b></a><br><br>This copper mining town outside Santiago in southwest Cuba is home to the Virgin of Charity (La Virgen de la Caridad), a miraculous statue of the Virgin Mary. The shrine is the most important religious site on the entire island, for Catholics and non-Catholics alike. </div>","El Cobre");
		 
		 // Havana
	var point = new GPoint(-82.351949, 23.141347);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/cuba/havana.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/cuba/images/thumbs/havana-cathedral-facade-cc-richard-harwich.jpg'><b>Havana</b></a><br><br>Havana is the lively capital of Cuba, with a population of 2 million. In Havana, as throughout Cuba, most sacred sites are Spanish-inspired churches, but African and indigenous forms of devotion also continue to thrive alongside Catholicism. <br><br><a href='http://www.sacred-destinations.com/cuba/havana.htm'>Havana Main Page</a> | <a href='http://www.sacred-destinations.com/cuba/havana-map.htm'>Havana Satellite Map</a></div>","Havana");
	
	


		
	
	 // put the assembled sidebar_html contents into the sidebar div
    document.getElementById("sidebar").innerHTML = sidebar_html;
    }

	//]]>