// 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    -->
	
		 
		 // Durham Castle
	var point = new GPoint(-1.576259, 54.775445);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/england/durham-castle.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/durham-castle-pictures/thumbs/courtyard-wp-c-robin-widdison-unrestr.jpg'><b>Durham Castle</b></a><br><br>Built by William the Conquerer, this was the home of the Prince-Bishops of Durham for centuries. It contains two chapels, one of which dates from 1080.</div>","Durham Castle");
		 
		 
		 // Durham Cathedral
	var point = new GPoint(-1.576538, 54.773069);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/england/durham-cathedral.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/durham-cathedral-pictures/thumbs/eos_122.jpg'><b>Durham Cathedral</b></a><br><br>Built 1093-1133, this is considered one of the finest examples of Norman architecture in England. It is home to the Shrine of St. Cuthbert and the tomb of the Venerable Bede. </div>","Durham Cathedral");
	
	 // Oriental Museum
	var point = new GPoint(-1.581323, 54.764007);
	createMarker(point,"<div id=bubble><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/images/thumbnails50/durham-oriental-museum.jpg'><b>Oriental Museum</b><br><br>The only museum in the country dedicated entirely to Oriental art and artifacts, this museum displays many religious (and non-religious) items from the Far East, Middle East, and North Africa.</div>","Oriental Museum");
	
	 // St. Nicholas Church
	var point = new GPoint(-1.575143, 54.777388);
	createMarker(point,"<div id=bubble><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/images/thumbnails50/durham-st-nic.jpg'><b>St. Nicholas Church</b><br><br>This church on Market Place was originally Norman and its north wall was part of the city wall. The church was redesigned in 1858 and modernised in 1981, and there are few traces of the original architecture remaining. </div>","St. Nicholas Church");
	
	 // St Oswald's Church
	var point = new GPoint(-1.572354, 54.771497);
	createMarker(point,"<div id=bubble><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/images/thumbnails50/durham-st-oswald.jpg'><b>St Oswald's Church</b><br><br>Named for the saintly King of Northumbria, St. Oswald's was built in 1195. It was altered by some restoration and changes in the 14th century.</div>","St Oswald's Church");
	
	
	// 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;
    }

	//]]>