// 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    -->
	
	
	
	 
		 // Bristol Cathedral
	var point = new GPoint(-2.600895,51.451674);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/england/bristol-cathedral.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/images/thumbnails50/bristol-cathedral.jpg'><b>Bristol Cathedral</b></a><br><br>Bristol Cathedral began life as a Norman abbey church, became an Anglican Cathedral after the Dissolution in 1539, and was almost entirely rebuilt in the neo-Gothic style in the late 19th century.</div>","Bristol Cathedral");
	
		 // Clifton Cathedral
	var point = new GPoint(-2.616291,51.459676);
	createMarker(point,"<div id=bubble><b>Clifton Cathedral</b><br><br>Bristol's Roman Catholic cathedral, featuring striking modern architecture.</div>","Clifton Cathedral");
	
		 // St Mary Redcliffe
	var point = new GPoint(-2.589523,51.448297);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/england/bristol-st-mary-redcliffe-church.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/images/thumbnails50/bristol-st-mary-redcliffe.jpg'><b>St Mary Redcliffe</b></a><br><br>St. Mary Redcliffe is a very grand Anglican parish church that is often mistaken for Bristol's cathedral. It is the second-largest parish church in England and the tallest building in Bristol. </div>","St Mary Redcliffe");
	
	
		 // Wesley's New Room
	var point = new GPoint(-2.590193,51.458125);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/england/bristol-wesleys-new-room.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/images/thumbnails50/bristol-new-room.jpg'><b>Wesley's New Room</b></a><br><br>The first Methodist chapel in the country, the New Room was built by John Wesley in 1739. The design is attractive in its simplicity and features the double pulpit from which Wesley preached. </div>","Wesley's New Room");
	
	// 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;
    }

	//]]>
