// 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    -->
		 
		
		 
		 // Basilica of Our Lady of Guadalupe
	var point = new GPoint(-99.116807, 19.484374);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/mexico/mexico-city-basilica-guadalupe.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/mexico/images/thumbnails50/mexico-city-guadalupe-icon-nc.jpg'><b>Shrine of Our Lady of Guadalupe</b></a><br><br>The holiest shrine in Latin America and now the most popular Catholic shrine in the world. The basilica houses a miraculous image of the Virgin Mary, who appeared to an Aztec convert.</div>","Basilica of Guadalupe");
		
		 // Cathedral
	var point = new GPoint(-99.133083, 19.434123);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/mexico/mexico-city-cathedral.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/mexico/images/thumbnails50/mexico-city-cathedral2-sx-250h.jpg'><b>Metropolitan Cathedral</b></a><br><br>The oldest and largest cathedral in Latin America, the Catedral Metropolitana dominates Zócalo plaza.</div>","Metropolitan Cathedral");
		 	 
		 // Mormon Temple
	var point = new GPoint(-99.086672, 19.465806);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/mexico/mexico-city-mormon-temple.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/mexico/images/thumbnails50/mexico-city-mormon-cc-jesse-michael-nix.jpg'><b>Mexico City Temple</b></a><br><br>The Mexico City Mormon Temple is the largest temple of the LDS Church outside the United States. It is built in the style of ancient Mayan temple architecture.</div>","Mormon Temple");
	
	// Anthropology Museum
	var point = new GPoint(-99.185686, 19.425923);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/mexico/mexico-city-archaeological-museum.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/mexico/images/thumbnails50/aztec-sun-stone-wc-gfdl.jpg'><b>National Museum of Anthropology</b></a><br><br>Home to the famous Aztec calendar stone, this excellent museum displays a vast array of artifacts from the indigenous cultures of Mexico.</div>","Museum of Anthropology");
	
	
		 // Templo Mayor
	var point = new GPoint(-99.131393,19.43511);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/mexico/mexico-city-templo-mayor.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/mexico/images/thumbnails50/templo-mayor-cc-detritus.jpg'><b>Templo Mayor</b></a><br><br>This 14th-century Aztec temple was the center of religious life in Mexico City before the Spaniards arrived. Most of its stone was used to build the nearby cathedral.</div>","Templo Mayor");
	 	 
		 // Teotihuacán
	var point = new GPoint(-98.846708, 19.690817);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/mexico/teotihuacan.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/mexico/images/thumbnails50/teotih-pyramid-sun-cc-abourdeu.jpg'><b>Teotihuacán</b></a><br><br>Constructed around 300 AD, this astonishing collection of pyramids was believed to be where the gods created the world. The stone pyramids are built on a massive scale and laid out according to astronomical alignments. In the 14th century, it became a pilgrimage center for the Aztecs. </div>","Teotihuacán");
	
		 // Torre de Mexicana
	var point = new GPoint(-99.165548, 19.396846);
	createMarker(point,"<div id=bubble><b>Torre de Mexicana</b></a><br><br>Excellent views of the city from here.</div>","Torre de Mexicana");
		 
	 // Zocalo
	var point = new GPoint(-99.133222, 19.432621);
	createMarker(point,"<div id=bubble><b>Zocalo</b><br><br>The huge central plaza of Mexico City, dominated by the Metropolitan Cathedral.</div>","Zocalo");
	
	// 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);

	 // Palacio Nacional -99.131248, 19.432499

	
		
	
	 // put the assembled sidebar_html contents into the sidebar div
    //document.getElementById("sidebar").innerHTML = sidebar_html;
    }

	//]]>
