    var map = null;
    var geocoder = null;

    function load(googlemapsPageItemId,googlemapsMapType,googlemapsMapControl,googlemapsIcon) {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("googlemapsPageItemId_" + googlemapsPageItemId));
        
        // MapControl
        if (googlemapsMapControl == "GSmallZoomControl") { map.addControl(new GSmallZoomControl()); }
        else if (googlemapsMapControl == "GSmallMapControl") { map.addControl(new GSmallMapControl()); }
        else if (googlemapsMapControl == "GLargeMapControl") { map.addControl(new GLargeMapControl()); }
        else {}
		map.addControl(new GMapTypeControl());
		//map.addControl(new GOverviewMapControl());
        map.setCenter(new GLatLng(50.243006, 8.653622), 13);
        
        // MapType
        if (googlemapsMapType == "G_HYBRID_MAP") { map.setMapType(G_HYBRID_MAP); }
        else if (googlemapsMapType == "G_PHYSICAL_MAP") { map.setMapType(G_PHYSICAL_MAP); }
        else if (googlemapsMapType == "G_SATELLITE_MAP") { map.setMapType(G_HYBRID_MAP); }
        else { map.setMapType(G_NORMAL_MAP); }
		
		// map.enableScrollWheelZoom();
 		map.enableContinuousZoom();
        geocoder = new GClientGeocoder();  
       
      }
    }
  
	
	function createMarker(point, strasse, ort, imbiss, googlemapsIcon,googlemapsIconWidth,googlemapsIconHeight) {
		
		// Create our "tiny" marker icon
		var icon = new GIcon();
		// alert("test: " + googlemapsIcon);
		icon.image = googlemapsIcon;
		icon.shadow = "http://labs.google.com/ridefinder/images/mm_20_shadow.png";
		icon.iconSize = new GSize(googlemapsIconWidth, googlemapsIconHeight);
		// icon.iconSize = new GSize(17, 34);
		//icon.shadowSize = new GSize(17, 20);
		icon.iconAnchor = new GPoint((googlemapsIconWidth/2), googlemapsIconHeight);
		icon.infoWindowAnchor = new GPoint((googlemapsIconWidth/2), googlemapsIconHeight);   		
	
	  var marker = new GMarker(point, icon);
	  GEvent.addListener(marker, "click", function() {
		marker.openInfoWindowHtml("<font style='font-family:Arial; font-size:16px; font-weight:bold; text-decoration:none;color:#000000;'><b>" + imbiss + "</b></font><font style='font-family:Arial; font-size:13px; text-decoration:none;color:#000000;'><br>" + strasse + "<br/>" + ort + "<br/>Germany</font>");
	 });
	  return marker;
	}

    function showAddress(strasse, ort, imbiss, id, googlemapsIcon,googlemapsIconWidth,googlemapsIconHeight) {
    var address = strasse + " " + ort + " Germany";
      if (geocoder) {
        geocoder.getLatLng(
          address,
          function(point) {
              map.setCenter(point, 14);
              var marker = new GMarker(point);
        	  map.addOverlay(createMarker(point, strasse, ort, imbiss, id, googlemapsIcon, googlemapsIconWidth,googlemapsIconHeight));
          }
        );
      }
    }
