// use javascript for icons functions as they are javascript based
// also change the title of the link if js is enabled
window.onload = function() {
	if (document.getElementById) {
		////////Google Map
		if(document.getElementById('googlemap')){
			if(GBrowserIsCompatible()){
				var map = new GMap2(document.getElementById('googlemap'));
				map.addControl(new GLargeMapControl());
				map.addControl(new GMapTypeControl());
				map.setCenter(new GLatLng(51.503544,-0.192132), 14);
				map.panBy(new GSize(10,70));
				// Place a marker at the right coordinate
				var marker = new GMarker(new GLatLng(51.503544,-0.192132));	
				var maptext = "<div id=\"maptext\"><img src=\"/images/_system/logomap-102x30-ken.gif\" alt=\"Logo\" /></div>";
				GEvent.addListener(marker, "click", function() {
					marker.openInfoWindowHtml(maptext);
				});
				map.addOverlay(marker);
				marker.openInfoWindowHtml(maptext);
			}//end if GBrowserIsCompatible
		}

		////////Google Map 2
		if(document.getElementById('googlemap2')){
			if(GBrowserIsCompatible()){
				var map = new GMap2(document.getElementById('googlemap2'));
				map.addControl(new GLargeMapControl());
				map.addControl(new GMapTypeControl());
				map.setCenter(new GLatLng(51.487008,-0.169063), 14);
				map.panBy(new GSize(10,70));

				// Place a marker at the right coordinate
				var marker = new GMarker(new GLatLng(51.487008,-0.169063));	
				var maptext = "<div id=\"maptext\"><img src=\"/images/_system/logomap-102x30-chelsea.gif\" alt=\"Logo\" /></div>";

				GEvent.addListener(marker, "click", function() {
					marker.openInfoWindowHtml(maptext);
				});
				map.addOverlay(marker);
				marker.openInfoWindowHtml(maptext, {maxWidth:300});
			}//end if GBrowserIsCompatible
		}

	}//end if
//search highlighting
//highlight();
}//end window.onload


window.onunload = function() { GUnload() }