﻿    if (GBrowserIsCompatible()) { 

      // A function to create the marker and set up the event window
      // Dont try to unroll this function. It has to be here for the function closure
      // Each instance of the function preserves the contends of a different instance
      // of the "marker" and "html" variables which will be needed later when the event triggers.    
      function createMarker(point,html) {
        var marker = new GMarker(point);
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
        return marker;
      }

      // Display the map, with some controls and set the initial location 
      var map = new GMap2(document.getElementById("map"));
      map.addControl(new GLargeMapControl());
      map.setCenter(new GLatLng(54.006502998949486, -2.7888885140419006), 9);
    
      // Set up markers with info windows

      //The Waterehad Hotel
      var point = new GLatLng(54.006502998949486, -2.7888885140419006);
      var marker = createMarker(point, '<div style="width:260px;"><img src="http://englishlakes.co.uk/Images/Lancaster/tinythumb.jpg" alt="Lancaster House" class="left" /><h3>Lancaster House</h3><p>Lancaster House, Green Lane, Ellel, Lancaster, Lancashire, England, UK, LA1 4GJ</p></div>')
     map.addOverlay(marker);

 
	  

      

        //  ======== Cause the overview to be positioned AFTER IE sets its initial position ======== 
//      setTimeout("positionOverview(558,254)",1);
    }
    
    // display a warning if the browser was not compatible
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }
