// 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    -->
	
	
	
		 // Gloucester Cathedral
	var point = new GPoint(-2.246768,51.867548);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/england/gloucester-cathedral.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/gloucester-cathedral-photos/thumbs/h-1154.jpg'><b>Gloucester Cathedral</b></a><br><br>Founded in 1100 as a Norman abbey church, this cathedral has a huge medieval stained glass window and an elegant interior. Here William I ordered the Domesday Book and Harry Potter was filmed.</div>","Gloucester Cathedral");
	 
	 // Parking for Cathedral
	var point = new GPoint(-2.252267,51.868969);
	createMarker(point,"<div id=bubble><b>Parking for Cathedral</b><br><br>Convenient car park for the cathedral, only &pound;1 an hour. Follow signs for the Cathedral Coach Park.</div>","Parking for Cathedral");
	
		 // St Nicholas Church
	var point = new GPoint(-2.249797,51.867376);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/england/gloucester-st-nicholas-church.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/gloucester-st-nicholas-photos/thumbs/h-1221.jpg'><b>St Nicholas Church</b></a><br><br>The parish church of St Nicholas, patron saint of sailors and merchants, was built in 1190 and expanded in the 15th century. Its tall tower has a truncated spire and a noticeable lean.</div>","St Nicholas Church");
	
		 // St Oswald's Priory
	var point = new GPoint(-2.247863,51.869443);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/england/gloucester-st-oswalds-priory.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/gloucester-st-oswalds-photos/thumbs/h-1230.jpg'><b>St Oswald's Priory</b></a><br><br>One wall is all that remains of the New Minster founded by St Aethelflaed in 900 AD, which contained the holy relics of St Oswald of Northumbria. It became an Augustinian priory in 1152.</div>","St Oswald\'s Priory");
	
	
	// 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;
    }

	//]]>