var map = null;
var geocoder = null;
var destination = null;
var overview = false;
var zoom = null;

function doOnload() {
	var temp = destination.split("|");
	destination = temp[0];
	zoom = temp[1];
	if (destination == "overview") {
		overview = true;
	}
	
	if (GBrowserIsCompatible()) {
		map = new GMap2(document.getElementById("map"),G_SATELLITE_MAP);
		map.addControl(new GSmallMapControl());
		//map.addControl(new GMapTypeControl());
		if (!overview) {
			geocoder = new GClientGeocoder();
			
			if (geocoder) {
				geocoder.getLatLng(
					destination, 
					function(point) {
						if (point) {
						  map.setCenter(point, parseInt(zoom));
						  map.setMapType(G_HYBRID_MAP);
						}
					}
				);
			}
		} else {
			// Übersichtskarte anzeigen
			map.setCenter(new GLatLng(22.4419, -38.1419),1);
			map.setMapType(G_HYBRID_MAP);			
		}
	}
}