var map;

function makeMap() {
	if (GBrowserIsCompatible()) {
		
		// resize the map
		var m = document.getElementById("google-map");
		m.style.height = "480px";
		m.style.width = "480px";
		
		// create the map
		map = new GMap(document.getElementById("google-map"));
		map.addControl(new GLargeMapControl());
		map.centerAndZoom(new GPoint(-1.09352, 53.95073), 3);
		
		var point = new GPoint(-1.09352, 53.95073);
		var mhtml = '<img src="/img/design/map_pic.jpg" width="" height="" id="map_pic" /><h4>The Acer Hotel</h4><p>52 Scarcroft Hill<br/>York<br/>YO24 1DE<br /><a href="http://maps.google.com/maps?saddr=&daddr=YO24 1DE" id="map_directions">Get driving directions</a></p>';
		mhtml = '<div style="white-space:nowrap;" class="info-window">' + mhtml + '</div>';
		
 	 	var marker = createMarker(point,mhtml);
  		map.addOverlay(marker);
		marker.openInfoWindowHtml(mhtml);
	} else {
		var m = document.getElementById("map");
		alert('Your Browser is not compatible with 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;	  
}

