if (GBrowserIsCompatible()) {

	var map;
	var point;
	var marker;
	var html = '<b>Allies Computing Limited</b>';
	//html += '<br>Manor Farm Barns<br>Fox Road<br>Framingham Pigot<br>NORWICH<br>NR14 7PZ';
	html += '<br>Framingham Pigot, NORWICH, Norfolk<br>01508 494 488';
	html += '<br>';
	var new_html;
	var alliesIcon = new GIcon();
	alliesIcon.image = "/images/allies_logo.png";
	alliesIcon.shadow = "/images/allies_logo_shadow.png";
	alliesIcon.iconSize = new GSize(30, 15);
	alliesIcon.shadowSize = new GSize(40, 17);
	alliesIcon.iconAnchor = new GPoint(6, 20);
	alliesIcon.infoWindowAnchor = new GPoint(15, 0);
	markerOptions = { icon:alliesIcon };

}

function map_init(map_id) {
	var new_html = html+'<div id="google_marker_swap"><span style="font-size: 0.9em;"><a href="javascript: to_here(\'resize\');">Get Directions</a></span></div>';
	if (map_id != undefined)
	{
		map = new GMap2(document.getElementById(map_id));

		map.setCenter(new GLatLng(52.585050,1.348400), 14);
		//map.setMapType(G_HYBRID_MAP);
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());

		point = map.getCenter();
		marker =  new GMarker(point, markerOptions);
		map.addOverlay(marker);

		var new_html = '<div id="google_marker">'+new_html+'</div>';

		marker.openInfoWindowHtml(new_html);

		GEvent.addListener(marker, 'click', function() {
	  		marker.openInfoWindowHtml(new_html);
		});
	}
	else
	{
		map.updateInfoWindow([new GInfoWindowTab('', new_html)]);
	}
}

function to_here(resize)
{
	var new_html = '<span style="font-size: 0.9em;">Get Directions: <b>To here</b> - <a href="javascript: from_here();">From here</a></span><br>';
	new_html += '<span style="font-size: 0.8em;">Start address</span>';
	new_html += '<form action="http://maps.google.co.uk" method="get" target="_blank" style="padding: 0px; margin: 0px;">';
	new_html += '<input type="hidden" name="daddr" value="NR14 7PZ">';
	new_html += '<input type="text" size="20" maxlength="40" name="saddr" id="saddr" value="">&nbsp;<input type="submit" value="Go"><br>';
	new_html += '<a href="javascript: map_init();" style="font-size: 0.8em;">&laquo; Back</a>';
	new_html += '</form>';

	map.updateInfoWindow([new GInfoWindowTab('', html+new_html)]);
}

function from_here(resize)
{
	var new_html = '<span style="font-size: 0.9em;">Get Directions: <a href="javascript: to_here();">To here</a> - <b>From here</b></span><br>';
	new_html += '<span style="font-size: 0.8em;">End address</span>';
	new_html += '<form action="http://maps.google.co.uk" method="get" target="_blank" style="padding: 0px; margin: 0px;">';
	new_html += '<input type="hidden" name="saddr" value="NR14 7PZ">';
	new_html += '<input type="text" size="20" maxlength="40" name="daddr" id="daddr" value="">&nbsp;<input type="submit" value="Go"><br>';
	new_html += '<a href="javascript: map_init();" style="font-size: 0.8em;">&laquo; Back</a>';
	new_html += '</form>';

	map.updateInfoWindow([new GInfoWindowTab('', html+new_html)]);
}