// 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    -->
	
		 
		 // Cusco Cathedral
	var point = new GPoint(-71.977884, -13.516252);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/peru/cusco-cathedral.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/peru/images/thumbs/cusco-cath-cc-Sam-Judson.jpg'><b>Cusco Cathedral</b></a><br><br>Cusco Cathedral is a Baroque-style cathedral built on the foundations of the palace of the Inca Wirachocha in Cusco. Construction began in 1550, using many stones looted from the site of the hillside Sacsayhuaman fortress, and was completed a century later. It is considered one of the most splendid Spanish colonial churches in the Americas. </div>","Cusco Cathedral");
		 
		 // Koricancha and Santa Domingo
	var point = new GPoint(-71.975582, -13.520122);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/peru/cusco-koricancha.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/peru/images/thumbs/cusco-koricancha-inca-trapezoidal-windows-cc-drp.jpg'><b>Koricancha and Santa Domingo</b></a><br><br>The combined sacred sites of Koricancha and Santo Domingo vividly illustrate ancient Andean culture's collision with Western Europe. The extraordinarily crafted Temple of the Sun at Koricancha was the most sumptuous temple in the Inca Empire, and part of the Dominican cloister has now been removed to reveal its architecture.</div>","Koricancha and Santa Domingo");
	
		 	 
		 // La Compañía de Jesús
	var point = new GPoint(-71.978098, -13.517566);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/peru/cusco-la-compania-de-jesus-church.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/peru/images/thumbs/cusco-compania-night-cc-drp.jpg'><b>La Compañía de Jesús</b></a><br><br>The elegant Church of the Society of Jesus rivals the cathedral in grandeur. Like the cathedral, it was also built on the site of an important ancient palace, that of the Inca Huayna Cpac.</div>","La Compañía de Jesús");
		 
		 // La Merced Church and Convent
	var point = new GPoint(-71.979477, -13.518276);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/peru/cusco-la-merced-church-and-convent.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/peru/images/thumbs/la-merced-c-cuzco-info.jpg'><b>La Merced Church and Convent</b></a><br><br>Erected in 1536 and rebuilt in 1680 after the great earthquake, this Minor Basilica and convent has a beautiful facade, fine cloisters, and two famous conquistadors buried in the crypt.</div>","La Merced Church and Convent");
	
		 // Museo de Arte Religioso
	var point = new GPoint(-71.976205, -13.516174);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/peru/cusco-museum-of-religious-art.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/peru/images/thumbs/cusco-museo-de-arte-religioso-colonial-balcony-cc-drp.jpg'><b>Museo de Arte Religioso</b></a><br><br>Housed in a handsome colonial palace formerly belonging to the archbishop, the Museum of Religious Art contains a variety of colonial religious paintings.</div>","Museo de Arte Religioso");
		 
		 // Museo Inka
	var point = new GPoint(-71.978104, -13.515256);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/peru/cusco-museo-inka.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/peru/images/thumbs/cusco-muso-inka-pottery-cc-d0ug.jpg'><b>Museo Inka</b></a><br><br>The main draw of this archaeological museum is its collection of Inca mummies. The museum is housed in a splendid colonial mansion, which was built over an Inca palace.</div>","Museo Inka");
		 
		 // San Blas Church
	var point = new GPoint(-71.974413, -13.514875);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/peru/cusco-museo-inka.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/peru/images/thumbs/cusco-san-blas-tower-cc-quintanaroo.jpg'><b>San Blas Church</b></a><br><br>This simple adobe church contains an ornate 17th-century pulpit considered one of the jewels of colonial art in the Americas. It is hewn from a single tree trunk and dominated by the triumphant figure of Christ.</div>","San Blas Church");
		 
		 // Santa Catalina Convent
	var point = new GPoint(-71.977143, -13.51778);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/peru/cusco-santa-catalina-convent-and-museum.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/peru/images/thumbs/cusco-santa-catalina-cc-dccxlix.jpg'><b>Santa Catalina Convent</b></a><br><br>The <em>Monasterio y Museo de Arte de Santa Catalina</em> was built between 1601 and 1610 over the ruins of the ancient Acllawasi, the &quot;House of the Sun Virgins.&quot; It has fine frescoes and a good collection of paintings.</div>","Santa Catalina Convent");
	
	
	
	// 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;
    }

	//]]>
