// global "map" variable
var map;

function makeMap() {
    if (GBrowserIsCompatible()) {
      // resize the map
      var m = document.getElementById("map");
      m.style.height = "460px";
      m.style.width = "470px";
      // create the map
      map = new GMap(document.getElementById("map"));
      map.addControl(new GLargeMapControl());
      map.centerAndZoom(new GPoint(-1.074960, 53.785347), 2);
		
		var point = new GPoint(-1.0749757289886475, 53.78533925783981);
		var mhtml = '<h4>Scott Road Medical Centre</h4>';
		mhtml = '<div style="white-space:nowrap;">' + mhtml + '</div>';
		
 	 	var marker = createMarker(point,mhtml);
  		map.addOverlay(marker);
		marker.openInfoWindowHtml(mhtml);
		
		// click to see where you are
		/*
   	GEvent.addListener(map, 'click', function(overlay, point) {
     	if (point) {
       	document.getElementById('ggcords').value = 'You clicked at: ' + point;
      }
   	});
		*/
    } else {
      alert("your browser does not support Google Maps!");
    }
}

function createMarker(point,html) {
        // FF 1.5 fix
        //html = '<div style="white-space:nowrap;">' + html + '</div>';
        var marker = new GMarker(point);
        GEvent.addListener(marker, "click", function() {
          marker.openInfoWindowHtml(html);
        });
		  
        return marker;
		  
}  
  





