// 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    -->
	
	
	 
		 
		 // Havana Cathedral
	var point = new GPoint(-82.351949, 23.141347);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/cuba/havana-cathedral.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 Cathedral</b></a><br><br>Renowned for its beauty, the 18th-century Havana Cathedral (Catedral de la Habana) has been called &quot;music cast into stone.&quot; </div>","Havana Cathedral");
		 
		 // Iglesia del Espiritu Santo
	var point = new GPoint(-82.350463, 23.132452);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/cuba/havana-iglesia-del-espiritu-santo.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/cuba/images/thumbs/havana-iglesia-espiritu-santo-c-paseoporlahabana.jpg'><b>Iglesia del Espiritu Santo</b></a><br><br>The Iglesia del Espiritu Santo (Church of the Holy Spirit) is Havana's oldest church. It contains several notable paintings and a crypt with catacombs. </div>","Iglesia del Espiritu Santo");
		 
		 //   Iglesia y Convento de la Merced  
	var point = new GPoint(-82.350415, 23.131441);
	createMarker(point,"<div id=bubble><b>Iglesia y Convento de la Merced </b><br><br>Constructed over a long period from 1755 to the 19th century, this church shows a progression of architectural styles, particularly in the facade.</div>","Iglesia y Convento de la Merced");
		 
		 // Nuestra Senora de Belen
	var point = new GPoint(-82.353323, 23.132921);
	createMarker(point,"<div id=bubble><b>Antigua Iglesia y Convento de Nuestra Senora de Belen</b><br><br>The first baroque church in Havana, this 1718 church was originally built as a convalescent hospital. It has a niche over the main door with an illuminated nativity scene under a fluted conch shell. The Arco de Belen has long been identified with the Jewish community of the neighborhood.</div>","Nuestra Senora de Belen");
	
	
		  // Iglesia del Sagrado Corozon de Jesus
	var point = new GPoint(-82.368981, 23.131624);
	createMarker(point,"<div id=bubble><b>Iglesia del Sagrado Corozon de Jesus</b><br><br></div>","Sagrado Corozon de Jesus");
	
		 //  Iglesia y Convento Menor de San Francisco de Ais  
	var point = new GPoint(-82.348623, 23.137015);
	createMarker(point,"<div id=bubble><b>Iglesia y Convento Menor de San Francisco de Asis  </b><br><br>Built in the 16th century, this church dedicated to St. Francis was restored in 1730 in a baroque style, resulting in a richly adorned facade with fluted conchlike tympanums over the doors and windows. Just inside the door are tombs beneath a glass floor panel. Its tower is the tallest in Havana and can be climbed. The church is now a museum and concert hall.</div>","San Francisco de Asis");
		 
		
	// 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;
    }

	//]]>