// 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    -->
	
	 
		 	 
		
	 
		 // Cathedral
	var point = new GPoint(-4.125779,40.950227);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/segovia-cathedral.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/segovia-cathedral.jpg'><b>Segovia Cathedral</b></a><br><br>Begun in the 16th century but not finished until 1768, Segovia Cathedral is the last Gothic cathedral to be built in Spain. It is super-Gothic on the outside and comparatively bare on the inside.</div>","");
		 
			// San Clemente
	var point = new GPoint(-4.119288,40.946572);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/segovia-san-clemente.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/segovia-san-clemente.jpg'><b>San Clemente</b></a><br><br></div>","");
	
		 // San Millan
	var point = new GPoint(-4.121107,40.945648);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/segovia-san-millan.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/segovia-san-millan.jpg'><b>San Millan Church</b></a><br><br>Built between 1111 and 1124, this fine Romanesque church just outside the walls is one of the oldest churches in the city. It features a mozarab tower, open porticoes, figurative carvings and interior frescoes.</div>","");
		 
		 // Vera Cruz
	var point = new GPoint(-4.13256,40.955696);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/segovia-vera-cruz-templar-church.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/segovia-vera-cruz.jpg'><b>Vera Cruz</b></a><br><br>Consecrated in 1208, Iglesia Vera Cruz was built by the Knights Templar to house a fragment of the True Cross. It has a unique 12-sided exterior, round nave, and Romanesque carvings.</div>","");
	
	
	
	
	// 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);


		 // Aqueduct
	var point = new GPoint(-4.118119,40.947913);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/segovia-aqueduct.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/segovia-aqueduct.jpg'><b>Roman Aqueduct</b></a><br><br>The ancient aqueduct in Segovia is not a religious site, but it is such a magnificent monument that I just can't bear to leave it off my website! Built in the 1st century AD, it is one of the best-preserved in the world.</div>","");
	
	 // put the assembled sidebar_html contents into the sidebar div
    //document.getElementById("sidebar").innerHTML = sidebar_html;
    }

	//]]>