// 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(-5.991497, 37.383918);
	createMarker(point,"<div id=bubble><b>Alcazar</b><br><br></div>","Alcazar");
	
		 // Basilica de la Macarena
	var point = new GPoint(-5.989265, 37.402393);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/seville-basilica-de-la-macarena.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/seville-macarena2-pd-turismo.jpg'><b>Basilica de la Macarena</b></a><br><br>This church on the north side of the city is home to Seville's most revered image, La Macarena. She is the patron saint of matadors and taken out on procession each year.</div>","Basilica de la Macarena");
	
		 // Cathedral
	var point = new GPoint(-5.992881, 37.385802);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/seville-cathedral.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/seville-cathedral-75.jpg'><b>Seville Cathedral</b></a><br><br>Built over the square site of a mosque, this is the largest Gothic building in the world. It is an impressive architectural expression of post-Reconquest confidence.</div>","Cathedral");
		 
				 
		 // Convento de Capuchinos
	var point = new GPoint(-5.984588, 37.400906);
	createMarker(point,"<div id=bubble><b>Convento de Capuchinos</b><br><br></div>","Convento de Capuchinos");
	 
			 
		 // Convento de Santa Paula
	var point = new GPoint(-5.985489, 37.396286);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/seville-convento-de-santa-paula.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/spain/images/thumbnails50/seville-santa-paula.jpg'><b>Convento de Santa Paula</b></a><br><br>The most accessible and interesting of Seville's 17 cloistered women's convents.</div>","Convento de S Paula");
	
	 // Giralda
	var point = new GPoint(-5.992194, 37.386185);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/spain/seville-giralda.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>La Giralda</b></a><br><br>The unique bell tower of Seville Cathedral is so historic and interesting, it gets its own article. It has no stairs, but a sloping ramp big enough for horses to climb.</div>","Giralda");
	
		// Iglesia de San Luis
	var point = new GPoint(-5.988402, 37.398221);
	createMarker(point,"<div id=bubble><b>Iglesia de San Luis</b><br><br></div>","Iglesia de San Luis");
	
	 // Plaza de Espana
	var point = new GPoint(-5.986347, 37.377294);
	createMarker(point,"<div id=bubble><b>Plaza de Espana</b><br><br></div>","Plaza de Espana");
	
	// 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;
    }

	//]]>