function GoogleMapsInitialize (id, latitude, longitude, zoom, editable, fieldLatitude, fieldLongitude, fieldZoom)
{
	if (GBrowserIsCompatible ())
	{
		var GoogleMapsObject = new GMap2 (document.getElementById (id));
		GoogleMapsObject.setCenter (new GLatLng (latitude, longitude), zoom);
		GoogleMapsObject.enableDoubleClickZoom ();
		GoogleMapsObject.enableScrollWheelZoom ();

		GoogleMapsObject.addControl (new GLargeMapControl ());
		GoogleMapsObject.addControl (new GOverviewMapControl ());
		GoogleMapsObject.addControl (new GMapTypeControl ());

		if (editable)
		{
			var marker = new GMarker (new GLatLng (latitude, longitude), { draggable : true });

			GEvent.addListener (marker, "dragstart", function ()
			{
//				map.closeInfoWindow ();
			});

			GEvent.addListener (marker, "dragend", function ()
			{
				var point = marker.getPoint ();
				GoogleMapsObject.panTo (point);
				if (fieldLatitude)
				{
					document.getElementById (fieldLatitude).value = point.lat ();
				}
				if (fieldLongitude)
				{
					document.getElementById (fieldLongitude).value = point.lng ();
				}
//				marker.openInfoWindowHtml ("Just bouncing along...");
			});


			GEvent.addListener (GoogleMapsObject, "zoomend", function ()
			{
				if (fieldZoom)
				{
					document.getElementById (fieldZoom).value = GoogleMapsObject.getZoom ();
				}
			});

			GoogleMapsObject.addOverlay (marker);
		}
	}
}

function GoogleUnload ()
{
//	alert (GUnload ());
}

window.onunload = GoogleUnload;