    var map = false;
    var marker = false;
    var geocoder = false;
	
    // Create a base icon for all of our markers that specifies the
    // shadow, icon dimensions, etc.

    if (typeof(baseIcon)=="undefined") {
      var baseIcon = new GIcon();
      baseIcon.image = "http://www.google.com/mapfiles/marker.png";
      baseIcon.shadow = "http://www.google.com/mapfiles/shadow50.png";
      baseIcon.iconSize = new GSize(20, 34);
      baseIcon.shadowSize = new GSize(37, 34);
      baseIcon.iconAnchor = new GPoint(9, 34);
      baseIcon.infoWindowAnchor = new GPoint(9, 2);
      baseIcon.infoShadowAnchor = new GPoint(18, 25);
    }

    function load(address) {	
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map"));
        geocoder = new GClientGeocoder();
        showAddress(address);
        return false;
      }
    }

    function load_point(x,y,iconobject) {	
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map"));
        geocoder = new GClientGeocoder();
        do_map(x,y,10,iconobject);
        return false;
      }
    }
	
    function do_map (x, y, z, iconobject) {
	
      // Alten Marker loeschen wenn vorhanden
      if (typeof(marker) == 'object' ) map.removeOverlay(marker);

      var point = new GLatLng(x,y);
      map.setCenter(point, z);
      map.addControl(new GSmallMapControl());
      map.addControl(new GMapTypeControl());

      if (iconobject) {
        marker = new GMarker(point, {icon: iconobject, draggable: true});		  
      } else {
        marker = new GMarker(point, {icon: baseIcon, draggable: true});
      }
      GEvent.addListener(marker, "dragend", function() {
        document.getElementById('lat').value = marker.getPoint().lat();
        document.getElementById('lng').value = marker.getPoint().lng();
      });
			
      map.addOverlay(marker);
      map.setCenter(point, 15);
      GEvent.trigger(marker,"mouseover"); 	 

      if (document.getElementById('lat')) document.getElementById('lat').value = x;
      if (document.getElementById('lng')) document.getElementById('lng').value = y;      
    }
	
    function showAddress(address) {
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
            if (!point) {
              // Im Fehlerfall: Nur PLZ und Ort aufloesen
              if(address!= ", , Deutschland") {
                alert ('Anschrift nicht gefunden!');
              }
            } else {
              latDeg = point.y.toFixed(8);
              lonDeg = point.x.toFixed(8);
              do_map (latDeg, lonDeg, 10);
            }
          }
        )
      }
    }


function addLoadEvent(func) {
  var oldonload = window.onload;
  if (typeof window.onload != 'function') {
    window.onload = func;
  } else {
    window.onload = function() {
      if (oldonload) {
        oldonload();
      }
      func();
    }
  }
}


