function setMap(lon, lat, mapId, zoom){
	if(!mapId){mapId = "map";}
	if(!zoom){zoom = 2;}
	var map = new GMap(document.getElementById(mapId));
	map.addControl(new GLargeMapControl());
	map.centerAndZoom(new GPoint(lon, lat ), zoom);
	
	var icon = new GIcon();
	icon.image = "/i/maps/map_marker_blue_sml.png";
	icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
	icon.iconSize = new GSize(17, 31);
	icon.shadowSize = new GSize(1, 1);
	icon.iconAnchor = new GPoint(0, 23);
	icon.infoWindowAnchor = new GPoint(5, 1);
	for(i=0;i<offices.length;i++){
		var point = new GPoint(offices[i][1],offices[i][2]);	
		map.addOverlay(createMarker(point, i + 1, icon, zoom));
	}
}
 // Creates a marker at the given point with the given number label
function createMarker(point, number, icon, zoom) {
	var marker = new GMarker(point, icon);
	var officeType ="";
	var office = number-1;
	if(office>0){
		officeType = " Office";
	}
	// create content for each office
	var bubbleContent = "<h2>"+offices[office][0]+officeType+"</h2>";
	bubbleContent += "<p>"+offices[office][3]+"</p>";
	if(zoom < 5){
		bubbleContent += "<p><a href='/form/generic/'>Email us</a> or call 08000 38 37 36</p>";
	}else{
		bubbleContent += "<p><a href='javascript:setMap("+offices[office][1]+","+offices[office][2]+",\"map\",2)'>Zoom into this office's location</a></p>";
	}
	GEvent.addListener(marker, "click", function() {
		marker.openInfoWindowHtml(bubbleContent);
	});
	return marker;
}