    //<![CDATA[
function loadMap(latitude, longitude, zoom, member, webaddress) {
    // Check to see if this browser can run the Google API
    if (GBrowserIsCompatible()) {
			showmember(latitude, longitude, zoom, member, webaddress);
    }
    // display a warning if the browser was not compatible
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }
}
function showmember(latitude, longitude, zoom, member, webaddress) {
		// Display the map
		var map = new GMap2(document.getElementById("mapzone"));
		map.addControl(new GSmallMapControl());
		//map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
		map.setCenter(new GLatLng(latitude, longitude), zoom);
		
		if (member != "") {
			var html = member;
			if (webaddress != "") {
				// add link to website or page
				if (webaddress.substring(0, 7) == "http://") {
					// link to external website
					var weblink = webaddress.replace("http://","");
					html += "</br><a href=\"" + webaddress + "\" target=\"_blank\">" + weblink + "</a>";
				} else {
					// link to page
					html += "</br><a href=\"" + webaddress + "\">more information...</a>";
				}
			}
			map.openInfoWindowHtml(map.getCenter(), html);
		}
}
function loadGridMap(latitude, longitude, zoom) {
    // Check to see if this browser can run the Google API
    if (GBrowserIsCompatible()) {
			// display map centred on Porlock
			var map = new GMap(document.getElementById("mapzone"));
			map.addControl(new GSmallMapControl());
			map.addControl(new GMapTypeControl());
			map.setCenter(new GLatLng(latitude, longitude), zoom);
	
			// Add listener in case we click on the map		
			GEvent.addListener(map, 'click', function(overlay, point) {
			if (overlay) {
				// clicked on overlay so remove it
							if (overlay.content_html) {
							overlay.openInfoWindowHtml(overlay.content_html);
							} else {
				map.removeOverlay(overlay);}
			} else if (point) {
				//didn't click on overlay so add marker at point and display position
				map.addOverlay(new GMarker(point));
				document.business.latitude.value = point.y;
				document.business.longitude.value = point.x;
					}
			});
			}
    // display a warning if the browser was not compatible
    else {
      alert("Sorry, the Google Maps API is not compatible with this browser");
    }
}
function showmarker(latitude, longitude, zoom, member) {
		// Display the map
		var map = new GMap2(document.getElementById("mapzone"));
		map.addControl(new GLargeMapControl());
		//map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
		map.setCenter(new GLatLng(latitude, longitude), zoom);
		
		// create marker
		var point = new GLatLng(51.1338, -3.6418);
		var marker = new GMarker(point);
		marker.my_html = "The White Horse Inn";
		map.addOverlay(marker);
	
		GEvent.addListener(map, "click", function(overlay, point) {
				if (overlay) {
					  if (overlay.my_html) {
						overlay.openInfoWindowHtml(overlay.my_html);
					  }
				}
		  });

}
	//]]>
