/***********************************************
* Javascript for generatinf map from Google Map API
* Info from http://www.google.com/apis/maps/documentation/
***********************************************/
function get_map() {
	if (GBrowserIsCompatible()) {
		var point = new GLatLng(54.6768,-5.6165);
		var map = new GMap2(document.getElementById("map"));
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
		map.addControl(new GOverviewMapControl(new GSize(170,170)));
		map.setCenter(point, 14);
		// Creates a marker at the given point with the given number label
		function createMarker(point) {
		var marker = new GMarker(point);
		GEvent.addListener(marker, "click", function() {
			marker.openInfoWindowHtml("<span class='iwstyle'><b>Boat House</b><br />Harbour Car Park<br />Harbour Road<br />Groomsport<br />Northern Ireland</span>");
		});  return marker;
	}
		map.addOverlay(createMarker(point));
	} else {
		alert("Sorry - Your browser is not compatible with the Google Map API\nTry checking on the web for the latest version");
	}
}
addEvent(window,'load',get_map)

/* 3rd party helper functions */

/* addEvent handler for IE and other browsers */
function addEvent(obj, evType, fn, useCapture) 
// addEvent and removeEvent
// cross-browser event handling for IE5+,  NS6 and Mozilla
// By Scott Andrew
{
 if (obj.addEventListener){
   obj.addEventListener(evType, fn, useCapture);
   return true;
 } else if (obj.attachEvent){
   var r = obj.attachEvent("on"+evType, fn);
   return r;
 }
} 