function GMload() {
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("map"));
map.setCenter(new GLatLng(51.51803669675129, -0.1467597484588623), 15);

// 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,options,html) {
  var marker = new GMarker(point,options);
  GEvent.addListener(marker, "click", function() {
    marker.openInfoWindowHtml(html);
  });
  marker.openInfoWindowHtml(html);
  return marker;
}

// Create our "tiny" marker icon
var blueIcon = new GIcon(G_DEFAULT_ICON);
blueIcon.iconSize = new GSize(32, 32);
blueIcon.image = "http://www.google.com/intl/en_us/mapfiles/ms/micons/blue-dot.png";
// Set up our GMarkerOptions object
markerBlueOptions = { icon:blueIcon };

// Display the map, with some controls and set the initial location 
var map = new GMap2(document.getElementById("map"));
map.setUIToDefault();
//map.addControl(new GLargeMapControl());
//map.addControl(new GMapTypeControl());
map.setCenter(new GLatLng(51.51953669675129, -0.1467597484588623), 15);

// Set up two markers with info windows 
var point = new GLatLng(51.518150192246885, -0.14700651168823242);
var marker = createMarker(point,markerBlueOptions,'<div style="width:300px;height:140px;text-align:center;"><br /><img src="_images/HSHC_logo_GMaps.gif" /><br /><br />The Queen Anne Medical Centre<br />18-22 Queen Anne Street, London, W1G 8HU<br /><br /><a href="http://maps.google.com/maps?saddr=&daddr=' + point.toUrlValue() + '" target ="_blank">Get Directions<\/a></div>')
map.addOverlay(marker);


}
    
// display a warning if the browser was not compatible
else {
alert("Sorry, the Google Maps API is not compatible with this browser");
    }

// This Javascript is based on code provided by the
// Blackpool Community Church Javascript Team
// http://www.commchurch.freeserve.co.uk/   
// http://www.econym.demon.co.uk/googlemaps/
}
