// 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    -->
	
	
	// Alcazar
	var point = new GPoint(-4.020631, 39.858084);
	createMarker(point,"<div id=bubble><b>Alcazar</b><br><br>There has long been a fortress on this stratgic site, but the current building mainly dates from a rebuild after  its 1936 destruction during the Civil War.</div>","Alcazar");
	
		 	 
		 // Mezquita del Cristo de la Luz
	var point = new GPoint(-4.024268, 39.860658);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/toledo-mezquita-del-cristo-de-la-luz.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/toledo-mezquita-cc-Harry.jpg'><b>Mezquita del Cristo de la Luz</b></a><br><br>One of the oldest Moorish monuments in Spain, this tiny 10th-century mosque was converted into a church by King Alfonso. The added apse is thought to be the first example of the Mudejar style.</div>","Mezquita del Cristo de la Luz");
	
		 // Toledo Cathedral
	var point = new GPoint(-4.023678, 39.857129);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/toledo-cathedral.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/toledo-portal-cc-greg-e.jpg'><b>Toledo Cathedral</b></a><br><br>This massive Gothic cathedral is brimming with art treasures, including several El Grecos, a 10-foot-high gilded monstrance, and carved altarpieces that stretch to the ceiling.</div>","Toledo Cathedral");
		 
		 
		 // Convento de Santo Domingo Antiguo
	var point = new GPoint(-4.029064, 39.859328);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/toledo-santo-domingo.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/toledo-santo-domingo-int-c-go-toledo.jpg'><b>Santo Domingo</b></a><br><br>A 16th-century convent church containing the earliest of El Greco's Toledo paintings, an altarpiece by the artist, and the crypt where he is buried (visible thorugh a peephole in the floor).</div>","Santo Domingo");
	
		 // Sinagoga de Santa Maria la Blanca
	var point = new GPoint(-4.03069, 39.857092);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/toledo-sinagoga-de-santa-maria-la-blanca.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/toledo-blanca-Arches-May06-c-paradox.jpg'><b>Santa Maria la Blanca</b></a><br><br>Originally a synagogue and later a church, this 13th-century Mudejar building looks more like a mosque.</div>","Santa Maria la Blanca");
	
	// San Juan de los Reyes
	var point = new GPoint(-4.03188, 39.857994);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/toledo-monasterio-de-san-juan-monastery.htm'><b> Monasterio de San Juan de los Reyes</b></a><br><br>This superb church was founded by Ferdinand and Isabella and it was where they planned to be buried until the fall of Granada. It features an outstanding two-story cloister and an airy main church.</div>","Monasterio de San Juan de los Reyes");
		 	 
		 // Iglesia de San Román (Museo Visigotico)
	var point = new GPoint(-4.027251, 39.858459);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/toledo-san-roman.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/toledo-san-roman-arches-c-paradox.jpg'><b>Iglesia de  San Román (Museo Visigotico)</b></a><br><br>This fascinating 13th-century Mudéjar church combines Moorish and Christian elements, including a horseshoe arches, early frescoes and a Renaissance dome.</div>","Iglesia de San Román");
	
		 // Iglesia de Santo Tomé
	var point = new GPoint(-4.028276, 39.856824);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/toledo-santo-tome.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/toledo-santo-tome-c-spaininfo.jpg'><b>Iglesia de Santo Tomé</b></a><br><br>Topped with a Mudéjar tower, Santo Tomé is a chapel built to house El Greco's most famous painting, The Burial of Count Orgaz, and remains devoted to that purpose.</div>","Iglesia de Santo Tomé");
	
		 // Sinagoga del Tránsito
	var point = new GPoint(-4.029686, 39.855786);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/toledo-sinagoga-del-transito.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/toledo-sinagoga-wall1-May06-c-paradox.jpg'><b>Sinagoga del Tránsito</b></a><br><br>Built in a Moorish style in 1366, this synagogue became a church after 1492 but is now being restored to its original form. Hebrew inscriptions adorn the walls.</div>","Sinagoga del Tránsito");
		 
	// 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;
    }

	//]]>