// JavaScript Document

// display current year for copyright
function showYear() {
	var to = new Date();
	var year = to.getFullYear();
	if (year != '2005')	document.write(" - " + year + " ");
}
    //<![CDATA[

function loadMap() {

    // Check to see if this browser can run the Google API
    if (GBrowserIsCompatible()) {

		// Display the map
		var map = new GMap2(document.getElementById("map"));
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
		map.setCenter(new GLatLng(51.2905, -2.2511), 12);
		// create marker for Castle Hotel
		var point = new GLatLng(51.2905, -2.2511);
		var marker = new GMarker(point);
		marker.my_html = "Eastbrook Cottage<br />Bed and Breakfast<br />Hoopers Pool<br />Southwick<br />Wiltshire, BA14 9NG";
		map.addOverlay(marker);
	
		GEvent.addListener(map, "click", function(overlay, point) {
				if (overlay) {
					  if (overlay.my_html) {
						overlay.openInfoWindowHtml(overlay.my_html);
					  }
				}
		  });      
    }

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