 /*
 * Script adapted from Google map API tutorial
 * H.Thomas February 2009
 * note: How to get the lat long coords from google maps:
 * javascript:void(prompt('',gApplication.getMap().getCenter()));
 */

function createMap(){
// Check whether the browser can handle ajax
   if (GBrowserIsCompatible()) {
   // Create reference to the map div:
      var map = new GMap2(document.getElementById("mapsearch"));
   // Shell Bay Sailing:;
      var point = new GLatLng(50.67757, -1.9519);
   // Create the marker to point to the same location:
      var marker = new GMarker(point);
   // Causes the map to centre on shell bay:
      map.setCenter(point, 14);
      map.addOverlay(marker); 
   // control for changing views:  
      map.addControl(new GSmallMapControl()); 
      map.addControl(new GMapTypeControl());
   // Add inline style: 
      var shellBayInfo = "<span style='color:#285A92;font-size:.8em;font-family:verdana'>"
   // Create text to display:
      shellBayInfo +="Shell Bay Sailing,<br />";
      shellBayInfo += "Tel: <strong>01258 880512</strong>, or <br /><strong>07853 986345</strong></span>";
      map.openInfoWindowHtml(map.getCenter(),shellBayInfo);
   }
}