var map;
var gdir;
var geocoder = null;
var addressMarker;
var lat = 54.96790868640147;
var lng = -1.6209125518798828;

function initialize(address, postcode) {

	if (GBrowserIsCompatible()) {     
		map = new GMap2(document.getElementById("map_canvas"));
		map.addControl(new GSmallMapControl());
		map.addControl(new GMapTypeControl());
		
		map.setCenter(new GLatLng(lat, lng), 15);
		var point = new GLatLng(lat, lng);
		var newmarker = new GMarker(point);
		map.addOverlay(newmarker);
		
		/* callGetLatLng(address, postcode); */
	}
}

function callGetLatLng(address,index) {
	gaddress = new GClientGeocoder();
	gaddress.setBaseCountryCode('UK'); 
	gaddress.getLatLng(address, function(point) {
	map.setCenter(new GLatLng(point.lat(),point.lng()),13);
	var point = new GLatLng(point.lat(),point.lng());
	var newmarker = new GMarker(point);
	map.addOverlay(newmarker);
	});
}

/* <wpt lon="-1.6164676" lat="54.977256"> */
/* (54.96790868640147, -1.6209125518798828) */