   var map = null;
   var geocoder = null;
   var directionsPanel;
   var directions;

   function init(address) {
     if (GBrowserIsCompatible()) {
       map = new GMap2(document.getElementById("map_canvas"));
       geocoder = new GClientGeocoder();
       ShowMap(address);
       
       directionsPanel = document.getElementById("map_route");
       directions = new GDirections(map, directionsPanel);
       GEvent.addListener(directions, "addoverlay", onGDirectionsLoad);
     
     }
   }

   function showDirection() {
        dasgeht = "from: "+$('DirectionFromValue').value;
        directions.load(dasgeht+" "+DirectionToValue);
   }    	
       	
   function onGDirectionsLoad() { 
   		theHeight = $('MapContainer').getStyle('height').toInt();
		newHeight = theHeight + 200 ;
		if(newHeight < 620)
			newHeight = 620;
		$('ContentWrapper').setStyle('height', newHeight+'px');
   }

   function ShowMap(address) {
     if (geocoder) {
       geocoder.getLatLng(
         address,
         function(point) {
           if (!point) {
             // alert(address + " not found");
           } else {
             // Eigene Marker
             var blueIcon = new GIcon(G_DEFAULT_ICON);
             blueIcon.shadow = IconShadow;
             blueIcon.image = IconImage;
             blueIcon.iconSize = new GSize(IconSizeWidth, IconSizeHeight);
             blueIcon.shadowSize = new GSize(ShadowSizeWidth, ShadowSizeHeight);
             blueIcon.iconAnchor = new GPoint(IconAnchorLeft, IconAnchorTop);
             blueIcon.infoWindowAnchor = new GPoint(InfoWindowLeft, InfoWindowTop);

             markerOptions = { icon:blueIcon }

             map.setCenter(point, ZoomFactor);
             var marker = new GMarker(point, markerOptions);
             map.addOverlay(marker);

             // Steuerung einfuegen
             map.addControl(new GLargeMapControl());

             var mapControl = new GHierarchicalMapTypeControl();
             map.addControl(mapControl);

             // Blubberblase
             //marker.openInfoWindowHtml(BubbleContent);
           }
       });
     }
   }

