// 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    -->

   	 // Eagle and Child Pub
	var point = new GPoint(-1.260413,51.757096);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/england/oxford-eagle-and-child.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/oxford-cs-lewis-photos/thumbs/4-5_125.jpg'><b>Eagle and Child Pub</b></a><br><br>Here C.S. Lewis, J.R.R. Tolkien and other like-minded friends met to discuss life, religion and their latest books over a pint. </div>","Eagle and Child Pub");
	
		 // Grave of C.S. Lewis
	var point = new GPoint(-1.1981,51.757901);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/england/oxford-c-s-lewis.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/oxford-cs-lewis-photos/thumbs/IMG_4106.JPG'><b>Grave of C.S. Lewis</b></a><br><br>The simple grave of C.S. Lewis lies in the churchyard of Holy Trinity Church, with an epitaph by his brother Warnie.</div>","Grave of C.S. Lewis");
	
		 // Holy Trinity Church
	var point = new GPoint(-1.198001,51.75774);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/england/oxford-c-s-lewis.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/oxford-cs-lewis-photos/thumbs/IMG_4130.JPG'><b>Holy Trinity Church</b></a><br><br>Lewis\' place of worship for 31 years. He sat near the back always in the same pew and left early after 8am communion. It was here that Lewis came up with the idea of the Screwtape Letters. A Narnia window (1991) is in the north aisle just opposite the Lewis Pew.</div>","Holy Trinity Church");
	
	
		 // The Kilns
	var point = new GPoint(-1.190016,51.75677);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/england/oxford-c-s-lewis.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/oxford-cs-lewis-photos/thumbs/DSC_0089.JPG'><b>The Kilns</b></a><br><br>Home of C.S. Lewis from 1930 until his death in 1963. A group of children were evacuated from London to the Kilns in 1939, inspiring the story of Narnia. Joy moved in in 1957. Lewis Close, Risinghurst, Oxford.</div>","The Kilns"); 
	
   // Magdalen College
	var point = new GPoint(-1.246798,51.752101);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/england/oxford-magdalen.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/oxford-magdalen-pictures/thumbs/5-4_056.jpg'><b>Magdalen College</b></a><br><br>Lewis taught English literature here for 29 years. It was in his college rooms that he converted to theism.</div>","Magdalen College");
	
	// Nuffield Orthopaedic Centre
	var point = new GPoint(-1.208754,51.754639);
	createMarker(point,"<div id=bubble><b>Nuffield Orthopaedic Centre</b><br><br>Joy was hospitalized for cancer here in 1957. Soon after, she married Lewis in a religious ceremony in the Mayfar Suite.</div>","Nuffield Orthopaedic Centre");
	
	// Oxford Crematorium
	var point = new GPoint(-1.190144,51.774268);
	createMarker(point,"<div id=bubble><b>Oxford Crematorium</b><br><br>Funeral, plaque (cloister 2) and ashes of Joy (between B4 Rosebed and the Magnolia trees in the garden), who died in 1960. Bayswater Rd, Headington, Oxford, Oxfordshire, OX3 9RZ</div>","Oxford Crematorium");
	
	// Oxford Registry Office
	var point = new GPoint(-1.260499,51.75771);
	createMarker(point,"<div id=bubble><b>Oxford Registry Office</b><br><br>Site of the Oxford Registry Office, where C.S. Lewis married Joy so she could continue to live in England, in April 1956. 42 St Giles, Oxford.</div>","Oxford Registry Office");
	
		// University College
	var point = new GPoint(-1.251991,51.75242);
	createMarker(point,"<div id=bubble><b>University College</b><br><br>Lewis studied here in 1917 and 1919-23, interrupted by war service. He received a First in Honor Moderations (1920), a First in Greats (1922) and a First in English (1923). In 1924-25, he served as a philosophy tutor.</div>","University College");

        // 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);

	// Lewis' First Night in Oxford
	//var point = new GPoint(long, lat);
	//createMarker(point,"<div id=bubble><b>Lewis' First Night in Oxford</b><br><br>Arrival in Oxford at age 18 in 1916. Described in Surprised by Joy. 1 Mansfield Road.</div>","");


         // put the assembled sidebar_html contents into the sidebar div
									

    document.getElementById("sidebar").innerHTML = sidebar_html;
    }

        //]]>