// 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    -->
	
	
	
		 // Avila
	var point = new GPoint(-4.70232,40.655395);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/avila.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/avila-cathedral-cc-martius.jpg'><b>Avila</b></a><br><br>Founded in the 11th century to protect the Spanish territories from the Moors, Ávila has a magnificently-preserved city wall, a Romanesque cathedral, a number of medieval churches, and an authentic medieval atmosphere. It is also an important Catholic shrine that attracts many pilgrims.</div>","Avila");
	
		 // Barcelona
	var point = new GPoint(2.176698,41.383949);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/barcelona.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/barcelona-sagrada-cc-patrick-mayon.jpg'><b>Barcelona</b></a><br><br>Barcelona is home to a magnificent array of churches, ranging from the 10th-century Romanesque Sant Pau de Camp to the cutting-edge Art Nouveau La Sagrada Familia designed by Antoni Gaudi. In between, chronologically speaking, are several medieval churches built in the Catalan Gothic style,characterized by huge bare walls, heavy columns, large rose windows, and austere ornamentation.</div>","Barcelona");
	
		 // Burgos Cathedral
	var point = new GPoint(-3.704345,42.340719);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/burgos-cathedral.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/burgos-cathedral-facade-cc-orlok.jpg'><b>Burgos Cathedral</b></a><br><br>Begun in 1221, this lovely cathedral benefitted from creative talent imported from throughout Europe and is the third largest in Spain. El Cid is buried here.</div>","Burgos Cathedral");
	
		 // Cadiz Cathedral
	var point = new GPoint(-6.295252,36.529424);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/cadiz-cathedral.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/cadiz-cathedral-cc-logicalrealist.jpg'><b>Cadiz Cathedral</b></a><br><br>This Andalusian cathedral was built in the 18th century in the High Baroque style. It is topped by a golden-tiled dome; inside, it is decorated entirely in stone.</div>","Cadiz Cathedral");
	
		 // Cordoba
	var point = new GPoint(-4.779557,37.878927);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/cordoba.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/cordoba-mezquita-pictures/thumbs/mezquita-arches-cc-borya.jpg'><b>Cordoba</b></a><br><br>Cordoba has been an important city for thousands of years, first under Roman rule, then under the Visigoths, next under the Muslim caliphate, and finally under Catholic monarchs. This diverse history has left behind an array of splendid sacred sites reflecting these various traditions. The most notable of these is the Mezquita, a unique combination of cathedral and mosque. Cordoba is also home to a splendid synagogue carved with Andalusian-style decoration and Hebrew texts. </div>","Cordoba");
	
		 // Madrid
	var point = new GPoint(-3.714591,40.415579);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/madrid.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Madrid</b></a><br><br>This vibrant capital city\'s churches and other religious sites do not approach the grandeur of those in Barcelona or Toledo. Still, Madrid is home to numerous religious sites worth seeing, especially the huge modern Almudena Cathedral (paid for in part by Pope John Paul II) and the Egyptian temple on display not far from the Royal Palace.</div>","Madrid");
	
		 // Santiago de Compostela
	var point = new GPoint(-8.544424,42.88065);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/santiago-cathedral.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/santiago-cathedral-cc-Salvatore-Bonavita-100.jpg'><b>Santiago de Compostela</b></a><br><br>Here a magnificent Baroque cathedral shelters the relics of St. James the Apostle that have been the goal of pilgrims on the Camino de Santiago from the 11th century to the present.</div>","Santiago de Compostela");
	
		 // Segovia
	var point = new GPoint(-4.119288,40.946572);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/segovia.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>Segovia</b></a><br><br>Designated a UNESCO World Heritage Site, the old city of Segovia is spectacularly situated atop a long, narrow promontory. It contains a wealth of monuments, including a cathedral, an ancient Roman aqueduct, the fairy-tale spires of the Alcázar, half a dozen Romanesque churches and a former synagogue.</div>","Segovia");
	
		 // Seville
	var point = new GPoint(-5.992881, 37.385802);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/seville.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/seville-giralda-c-paradox.jpg'><b>Seville</b></a><br><br>The capital of the quintessentially-Spanish region of Andalusia, Seville is an enchanting place of flower-filled patios, orange trees, bullfighting, great festivals, a grand Alcazar and huge Gothic cathedral.</div>","Seville");
		 
			// Toledo
	var point = new GPoint(-4.023678, 39.857129);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/toledo.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</b></a><br><br>&quot;Holy Toledo&quot; isn't just an expression! This historic city in central Spain is packed with religious sites. A unique and richly diverse city, Toledo features Arab, Jewish, Christian, and even Roman and Visigothic elements.</div>","Toledo");
		 
		 // Valencia Cathedral
	var point = new GPoint(-0.375262, 39.475674);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/valencia-cathedral.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/valencia-cathedral-cc-spunfunkster.jpg'><b>Valencia Cathedral</b></a><br><br>Valencia Cathedral was built in the 13th century on the site of a mosque and a Temple of Diana. It incorporates a number of architectural styles and artistic treasures - including the Holy Grail!</div>","Valencia Cathedral");
	
	
	// 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;
    }

	//]]>