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

   function init(street,zip,city) {
     if (GBrowserIsCompatible()) {
       theAddress = street+" "+zip+" "+city;
       DirectionToValue = "to: "+street+" "+zip+" "+city;
       map = new GMap2(document.getElementById("themap"));
       geocoder = new GClientGeocoder();
       ShowtheMap(street,zip,city);
       
     }
   }

   function showDirection() {
   	   DirectionFromValue = "from: "+document.getElementById("DirectionFromValue").value;

       directionsPanel = document.getElementById("map_route");
       directions = new GDirections(map, directionsPanel);
       GEvent.addListener(directions, "addoverlay", onGDirectionsLoad);

       dir_value = DirectionFromValue+" "+DirectionToValue

       directions.load("from: berlin to: flensburg");
   }    	
       	
   function onGDirectionsLoad() { 

        var CurrentWidth  = document.body.clientWidth;
        var CurrentHeight = document.body.clientHeight;

        if(document.body.clientHeight) {
            CurrentWidth  = document.body.clientWidth;
            CurrentHeight = document.body.clientHeight;
        } else {
            CurrentWidth  = window.innerWidth;
            CurrentHeight = window.innerHeight;
        }

		newHeight = CurrentHeight + 100 ;
		if(newHeight < SiteHeight)
			newHeight = SiteHeight;
        alert(newHeight+" "+SiteHeight);
        document.getElementById("SiteHide").style.height = newHeight+'px';
   }

   function ShowtheMap(street,zip,city) {
       address = street+" "+zip+" "+city;
     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
             bubbleContent = '<div id="BubbleWrapper"><table><tr><td>'+street+'</td></tr><tr><td>'+zip+' '+city+'</td></tr></table></div>';
             marker.openInfoWindowHtml(bubbleContent);
           }
       });
     }
   }

