// 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    -->
	
	 
		 // Wells Cathedral
	var point = new GPoint(-2.643585, 51.210217);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/england/wells-cathedral.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/wells-cathedral-photos-exterior/WebPhotosProFiles/custom/IMG_4343.JPG'><b>Wells Cathedral</b></a><br><br>Dating from 1239, Wells Cathedral features an extra-wide west front covered in medieval sculptures and unique scissor arches supporting the tower inside.</div>","Cathedral");
		 	
		 
		 // Bishop's Palace
	var point = new GPoint(-2.643435, 51.208443);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Bishop's Palace</b></a><br><br>Romantically surrounded by a moat, the castle-like Bishop's Palace has been the home of the bishops of Bath and Wells since 1206.</div>","Bishop's Palace");
	
	 // St. Cuthbert's
	var point = new GPoint(-2.650301, 51.208308);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>St. Cuthbert's Church</b></a><br><br>There has been a church on this site since Saxon times. The present Church of St. Cuthbert is the largest parish church in Somerset (thus often mistaken for a cathedral) and dates from the 16th century. </div>","St. Cuthbert's Church");
	
	// Vicar's Close
	var point = new GPoint(-2.643521, 51.211346);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/wells-cathedral-photos-exterior/WebPhotosProFiles/custom/vicars-close-cc-Nicholas-Thompson.jpg'><b>Vicar's Close</b></a><br><br>Take a stroll back in time in Vicar's Close, the oldest complete medieval street in Europe. There are Arthurian connections here, too.</div>","Vicar's Close");
	
		 
		 // Wells Museum
	var point = new GPoint(-2.644637, 51.210903);
	createMarker(point,"<div id=bubble><b>Wells Museum</b><br><br>Housed in a Tudor building, Wells Museum contains exhibits illustrating the history, archaeology, geology and wildlife of Wells and surrounding areas.</div>","Wells Museum");
	
	
	 // put the assembled sidebar_html contents into the sidebar div
    //document.getElementById("sidebar").innerHTML = sidebar_html;
    }

	//]]>