// global "map" variable
var map;

function makeMap() {
    if (GBrowserIsCompatible()) {
      // resize the map
      var m = document.getElementById("map");
      m.style.height = "350px";
      m.style.width = "430px";
      // create the map
      map = new GMap(document.getElementById("map"));
      map.addControl(new GLargeMapControl());
      map.centerAndZoom(new GPoint(-0.726,52.6687), 4);
		
		var point = new GPoint(-0.726,52.6687);
		var mhtml = '<h4>Oakham Show House</h4></p>';
		mhtml = '<div style="width: 150px;">' + mhtml + '</div>';
		
		//map.addControl(GOverviewMapControl(new GSize(200, 200)));
		map.addControl(new GOverviewMapControl (new GSize(120, 120)));
      
		var omap=document.getElementById("map_overview");
      var mapdiv =document.getElementById("map");
      omap.style.position = "relative";
      omap.style.right = "0px";
      omap.style.bottom = "8px";
      mapdiv.appendChild(omap); 
		
		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;
		  
}
