// 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    -->
	
		 
		 // Avebury Henge
	var point = new GPoint(-1.85317, 51.429424);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/england/avebury.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/avebury-photos/WebPhotosProFiles/custom/050.jpg'><b>Avebury</b></a><br><br>Constructed around 2500 BC, Avebury is the largest prehistoric stone circle in Britain. It boasts not only ancient mysteries but a pleasant setting amidst Avebury village and green fields.</div>","Avebury");
		 
		 // Avebury Parish Church
	var point = new GPoint(-1.857907, 51.428568);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Avebury Parish Church</b></a><br><br>The Church of St. James is the main parish church of Avebury village. It has some intact Saxon features, but is mostly Norman.</div>","Avebury Church");
	
		 
		 // The Avenue
	var point = new GPoint(-1.847935, 51.422494);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>The Avenue</b></a><br><br>Also known as the West Kennet Avenue, this path lined with standing stones was constructed c2300-2000 BC as a ceremonial route linking the Avebury Circles with the Sanctuary.</div>","The Avenue");
		 
		 // The Sanctuary
	var point = new GPoint(-1.833172, 51.410731);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>The Sanctuary</b></a><br><br>Connected to Avebury Henge by the Avenue, the Sanctuary dates from c3250 BC.</div>","The Sanctuary");
	
				 
		 // Silbury Hill
	var point = new GPoint(-1.857505, 51.416258);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/england/silbury-hill.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/images/thumbnails50/silbury-hill-hdr-cc-tag.jpg'><b>Silbury Hill</b></a><br><br>Silbury Hill is a prehistoric man-made mound of stunning proportions and unknown purpose.</div>","Silbury Hill");
		 
		 // West Kennet Long Barrow
	var point = new GPoint(-1.851389, 51.408603);
	createMarker(point,"<div id=bubble><a href='http://www.sacred-destinations.com/england/west-kennet-long-barrow.htm'><img style='border-color:#666666' border='1' hspace='5' align='left' src='http://www.sacred-destinations.com/england/west-kennet-long-barrow-pictures/thumbs/eos2_218.jpg'><b>West Kennet Long Barrow</b></a><br><br>The West Kennet Long Barrow is a prehistoric burial site near Avebury in Wiltshire, England. Visitors can enter the barrow, where there are five chambers that contained human bones from between 3700 and 2000 BC.</div>","West Kennet Long Barrow");
		 
		 
		 // Windmill Hill
	var point = new GPoint(-1.875401, 51.441624);
	createMarker(point,"<div id=bubble><a href=''><img style='border-color:#666666' border='1' hspace='5' align='left' src=''><b>Windmill Hill</b></a><br><br>The earliest monument in the Avebury complex, Windmill Hill was first occupied c3700 BC. The remaining structures date from c3250 BC and are contemporary with the earliest constructions at the Sanctuary.</div>","Windmill Hill");
	
	
	// 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;
    }

	//]]>