// 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    -->
	
	
	 // Menec alignments - west
	var point = new GPoint(-3.083167, 47.592794);
	createMarker(point,"<div id=bubble><b>Menec alignments</b><br><br></div>","Menec alignments"); 
	
	// Menec alignments - east
	var point = new GPoint(-3.077953, 47.594219);
	createMarker(point,"<div id=bubble><b>Menec alignments - east end</b><br><br></div>","Menec alignments - east");
	
	// Kermario alignments - west
	var point = new GPoint(-3.06555, 47.596802);
	createMarker(point,"<div id=bubble><b>Kermario alignments</b><br><br></div>","Kermario alignments - west"); 
	
	 // Kermario alignments - east
	var point = new GPoint(-3.056012, 47.601085);
	createMarker(point,"<div id=bubble><b>Kermario alignments - east end</b><br><br></div>","Kermario alignments - east");
	
	// Kerlescan alignments
	var point = new GPoint(-3.049124, 47.604036);
	createMarker(point,"<div id=bubble><b>Kerlescan alignments</b><br><br></div>","Kerlescan alignments"); 
	
	
	// 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;
    }

	//]]>