    var request = null;
    var map = null;
    var xcaller = null;
    var actualTab = null;
    

    /*Switch MapType between static and interactive map*/
    function setMGI(){
      map.setMaptype( "MGI" );
    }

    function setJava(){
      map.setMaptype( "JAVA" );
    }

    ///////////////
    /*Map Objects*/
    ///////////////
    function addLabel(){
      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      mrcContainer.push(
        new Map24.Webservices.MRC.DeclareMap24Label({
          Anchor: "CENTER",
          Coordinate: new Map24.Coordinate( 296.6417, 3138.7654 ),
          Color: new Map24.Color( { R:0, G:0, B:0, A:255 } ),
          BgColor: new Map24.Color( { R:255, G:255, B:255, A:255 } ),
          BorderColor: new Map24.Color( { R:255, G:0, B:0, A:255 } ),
          MapObjectID: "myLabel",
          Text: "Soccer Stadium of AJAX Amsterdam!"
        })
      );
      mrcContainer.push( genControlMapObject ( "ENABLE", "myLabel" ) );
      mrcContainer.push( genSetMapView ( "", "", 2500, "", "myLabel" ) );
      map.Webservices.sendRequest( mrcContainer );
    }

    function addLocation(){
      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      mrcContainer.push(
        new Map24.Webservices.MRC.DeclareMap24Location({
          MapObjectID: "myLocation",
          Coordinate: new Map24.Coordinate( 514.1884, 3007.8795 ),
          LogoURL: "http://img.map24.com/map24/3DSignet/signet3d22x20.gif",
          SymbolID: 20100
        })
      );
      mrcContainer.push( genControlMapObject ( "ENABLE", "myLocation" ) );
      mrcContainer.push( genSetMapView ( "", "", 2500, "", "myLocation" ) );
      map.Webservices.sendRequest( mrcContainer );
    }

    /*This function adds a polyline to the map*/
    function addPolyline(){
      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      mrcContainer.push(
        new Map24.Webservices.MRC.DeclareMap24Polyline({
          MapObjectID: "myPolyline",
          Coordinates: new Map24.Webservices.CoordinatesArray(
            new Map24.Coordinate( 514.6492, 3003.2346 ),
            new Map24.Coordinate( 516.2507, 3003.1751 ),
            new Map24.Coordinate( 517.0803, 3004.8505 ),
            new Map24.Coordinate( 517.1010, 3005.0717 ),
            new Map24.Coordinate( 516.9647, 3005.6539 ),
            new Map24.Coordinate( 516.2847, 3006.3439 ),
            new Map24.Coordinate( 516.0388, 3006.7044 ),
            new Map24.Coordinate( 516.2092, 3006.8600 ),
            new Map24.Coordinate( 517.0373, 3006.9037 ),
            new Map24.Coordinate( 517.6766, 3006.9642 ),
            new Map24.Coordinate( 518.6640, 3006.8427 )
          ),
          Color: new Map24.Color( 0, 255, 0, 100 )
        })
      );
      mrcContainer.push( genControlMapObject ( "ENABLE", "myPolyline" ) );
      mrcContainer.push( genSetMapView ( "", "", 10000, "", "myPolyline" ) );
      map.Webservices.sendRequest( mrcContainer );
    }

    /*This function adds a polyline to the map*/
    function addPolygon(){
      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      mrcContainer.push(
        new Map24.Webservices.MRC.DeclareMap24Polygon({
          MapObjectID: "myPolygon",
          Coordinates: new Map24.Webservices.CoordinatesArray(
            new Map24.Coordinate( 400, 3000 ),
            new Map24.Coordinate( 401, 3000 ),
            new Map24.Coordinate( 401, 3001 ),
            new Map24.Coordinate( 400, 3001 )
          ),
          FillColor: new Map24.Color( 0, 255, 0, 100)
        })
      );
      mrcContainer.push( genControlMapObject ( "ENABLE", "myPolygon" ) );
      mrcContainer.push( genSetMapView ( "", "", 2500, "", "myPolygon" ) );
      map.Webservices.sendRequest( mrcContainer );
    }

    /*This function adds an oval to the map*/
    function addOval(){
      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      mrcContainer.push(
        new Map24.Webservices.MRC.DeclareMap24Oval({
          MapObjectID: "myOval",
          Width: 5500,
          Height: 5000,
          Center: new Map24.Coordinate( 513.5, 3002.56 ),
          FillColor: new Map24.Color( 255, 0, 0, 100 ),
          BorderColor: new Map24.Color( 0, 0, 0, 255 )
        })
      );
      mrcContainer.push( genControlMapObject ( "ENABLE", "myOval" ) );
      mrcContainer.push( genSetMapView ( "", "", "", 70, "myOval" ) );
      map.Webservices.sendRequest( mrcContainer );
    }

    ////////////////
    /*HTML Objects*/
    ////////////////
    /*This function adds a basic HTML object to the map that displays the HTML code behind "HTML:"*/
    function addHTMLObject(){
      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      mrcContainer.push(
        new Map24.Webservices.MRC.DeclareMap24HTMLObject({
          MapObjectID: "ffmHTMLObject",
          Coordinate: new Map24.Coordinate( 520.6536, 3009.1518 ),
          HTML: "<div width=\"250\" height=\"200\" bgcolor=\"#ffffff\" padding-right=\"15px\">"+
              "<p align=\"center\" style=\"padding: 0px; margin: 0px;\">"+
              "<a active=\"150,150,0\" link=\"0,114,189\" href=\"\" onclick=\"Map24.dispatchEvent(\'trigger_ffmHTMLObject\')\">[ x ] Close</a>"+
              "<br/>"+
              "</p>"+
              "<b>Frankfurt</b>"+
              "<br/>"+
              "Frankfurt is the fifth-largest city in Germany. It is the banking capital of Europe, where culture meets tradition."+
              "<p>"+
              "<img src=\"http://devnet.map24.com/files/frankfurt_skyline.jpg\" />"+
              "</p>"+
              "</div>",
          Orientation: new Map24.Webservices.MapObjectOrientation({
            'Vertical':'TOP',
            'Horizontal':'RIGHT',
            'HOffset':0,
            'VOffset':0
          })
        })
      );
      mrcContainer.push(
        new Map24.Webservices.MRC.DeclareMap24Location({
          MapObjectID: "trigger_ffmHTMLObject",
          Coordinate: new Map24.Coordinate( 0, 0 ),
          Events: new Array(
            new Map24.Webservices.MapObjectEvent({
              ID: "OnClick",
              Commands: new Map24.Webservices.CommandsArray(
                new Map24.Webservices.MRC.RemoveMapObject({
                  MapObjectIDs: "ffmHTMLObject"
                }),
                new Map24.Webservices.MRC.Surf({
                  URL: "javascript:checkIconAction(\"htmlobjects_standard_delete\")"
                })
              )
            })
          )
        })
      );
      mrcContainer.push( genControlMapObject( "ENABLE", "ffmHTMLObject" ) );
      mrcContainer.push( genSetMapView ( "", "", 15000, "", "ffmHTMLObject" ) );
      map.Webservices.sendRequest( mrcContainer );
    }

    /*This function adds an HTML object in bubble layout to the map. A close button in the upper right corner
      allows to close the HTML object*/
    function addHTMLObjectBubbleBigBen(){
      var content = "<b>The Big Ben</b>"+
        "<br/>"+
        "The tower was raised as a part of Charles Barrys design of a new palace, after the old Palace of Westminster was destroyed by fire on the night of October 16, 1834. The tower is designed in the Victorian Gothic style, and is 96.3 m (316 ft) high. [wikipedia]"+
        "<p>"+
        "<img src=\"http://devnet.map24.com/files/london_bigben.jpg\" />"+
        "</p>";

      addHTMLObjectBubble( "myBubble", -7.4679, 3090.0424, content, true );

      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      mrcContainer.push( genSetMapView ( "", "", "", 70, "myBubble" ) );
      map.Webservices.sendRequest( mrcContainer );
    }

    /*This function adds a bubble tooltip to the map which displays the HTML code that is passed in the variable
      content*/
    function addHTMLObjectBubble( objID, lon, lat, content, enable ){
      var html = "<div width=\"305\" height=\"216\" font-face=\"Arial\" font-size=\"11\" style=\"overflow:hidden; padding: 0px; margin: 0px; border: 0px; background: url(http://devnet.map24.com/files/tooltip/tooltip_bubble_shade2_M.gif)\">"+
        "<p align=\"right\" style=\"padding-top:7px;padding-right:70px\">"+
        "<a active=\"150,150,0\" link=\"0,114,189\" onclick=\"Map24.dispatchEvent(\'trigger_"+objID+"\')\">"+
        "<img src=\"http://devnet.map24.com/files/tooltip/tooltip_close.gif\" width=\"14\" height=\"14\" alt=\"close\" title=\"close\" border=\"0\"/>"+
        "</a>"+
        "</p>"+
        "<div height=\"106\" style=\"overflow:scroll; padding:10px; padding-right:74px\">"+
        content+
        "</div>"+
        "</div>";

      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      mrcContainer.push(
        new Map24.Webservices.MRC.DeclareMap24HTMLObject({
          MapObjectID: objID,
          Coordinate: new Map24.Coordinate( lon, lat ),
          HTML: html,
          Orientation: new Map24.Webservices.MapObjectOrientation({
            'Vertical':'TOP',
            'Horizontal':'RIGHT',
            'HOffset':0,
            'VOffset':0
          })
        })
      );
      if( enable ){
        mrcContainer.push(
          new Map24.Webservices.MRC.DeclareMap24Location({
            MapObjectID: "trigger_"+objID,
            Coordinate: new Map24.Coordinate( 0, 0 ),
            Events: new Array(
              new Map24.Webservices.MapObjectEvent({
                ID: "OnClick",
                Commands: new Map24.Webservices.CommandsArray(
                  new Map24.Webservices.MRC.ControlMapObject({
                    Control: "DISABLE",
                    MapObjectIDs: objID
                  }),
                  new Map24.Webservices.MRC.Surf({
                    URL: "javascript:checkIconAction(\"htmlobjects_bubble_delete\")"
                  })
                )
              })
            )
          })
        );
        mrcContainer.push(
          new Map24.Webservices.MRC.ControlMapObject({
            Control: "ENABLE",
            MapObjectIDs: objID
          })
        );
      }
      map.Webservices.sendRequest( mrcContainer );
    }

    /*This function adds a tabbed tooltip*/
    function addTabbedHTMLObject(){
      cont1 = "<b>The Allianz Arena</b>"+
        "<br/>"+
        "The arena facade is constructed of 2,874 ETFE-foil air panels that are kept inflated with dry air to a differential pressure of 0.035 hPa. The foil has a thickness of 0.2mm. Each panel can be independently lit with white, red, or blue light."+
        "<p>"+
        "<img src=\"http://devnet.map24.com/files/munich_allianz_stadium_2004.jpg\" />"+
        "</p>";
      cont2 = "<b>The Allianz Arena</b>"+
        "<br/>"+
        "Name: Allianz Arena<br/>"+
        "Inauguration: 30 May 2005<br/>"+
        "First match: TSV 1860 M?-1.FC N?g 3-2<br/>"+
        "Capacity: 69,900<br/>"+
        "Business seats: 2,200<br/>"+
        "VIP lodges: 106<br/>"+
        "Pitch dimensions: 105*68<br/>"+
        "Floodlights: 1,500 lux<br/>"+
        "Address: Werner-Heisenberg-Allee 25, 80939 M?<br/>";
      cont3 = "<b>Munich</b>"+
        "<br/>"+
        "Munich (1.3mil) is well known for the Oktoberfest and football. Situated near the German Alps, Munich is in close proximity to popular ski destinations as well as the famous fairytale castle Neuschwanstein. It is also home to numerous museums, churches and art galleries, park, palaces, beer gardens and the Olympic Stadium.";

      html1 = '<div width="305" height="216" font-face="Arial" font-size="11" style="overflow:hidden; padding: 0px; margin: 0px; border: 0px; background: url(http://devnet.map24.com/files/tooltip/tooltip_bubble_shade2_M.gif)"><p align="right" style="padding-top:7px;padding-right:70px"><a active="150,150,0" link="0,114,189" href="" onclick="Map24.dispatchEvent(del_tabs)"><img src="http://devnet.map24.com/files/tooltip/tooltip_close.gif" width="14" height="14" alt="close" title="close" border="0"/></a></p><div height="106" style="overflow:scroll; padding:10px; padding-right:74px"><table><tr><td width="0"></td><td><a href="" onclick="Map24.dispatchEvent(myTabbedHTMLObjTabTrigger0)"><div style="font-weight:bold"> | 1</div></a></td><td><a href="" onclick="Map24.dispatchEvent(myTabbedHTMLObjTabTrigger1)"><div> | 2</div></a></td><td><a href="" onclick="Map24.dispatchEvent(myTabbedHTMLObjTabTrigger2)"><div> | 3 |</div></a></td></tr></table><br/>'+cont1+'</div></div>';
      html2 = '<div width="305" height="216" font-face="Arial" font-size="11" style="overflow:hidden; padding: 0px; margin: 0px; border: 0px; background: url(http://devnet.map24.com/files/tooltip/tooltip_bubble_shade2_M.gif)"><p align="right" style="padding-top:7px;padding-right:70px"><a active="150,150,0" link="0,114,189" href="" onclick="Map24.dispatchEvent(del_tabs)"><img src="http://devnet.map24.com/files/tooltip/tooltip_close.gif" width="14" height="14" alt="close" title="close" border="0"/></a></p><div height="106" style="overflow:scroll; padding:10px; padding-right:74px"><table><tr><td width="0"></td><td><a href="" onclick="Map24.dispatchEvent(myTabbedHTMLObjTabTrigger0)"><div> | 1</div></a></td><td><a href="" onclick="Map24.dispatchEvent(myTabbedHTMLObjTabTrigger1)"><div style="font-weight:bold"> | 2</div></a></td><td><a href="" onclick="Map24.dispatchEvent(myTabbedHTMLObjTabTrigger2)"><div> | 3 |</div></a></td></tr></table><br/>'+cont2+'</div></div>';
      html3 = '<div width="305" height="216" font-face="Arial" font-size="11" style="overflow:hidden; padding: 0px; margin: 0px; border: 0px; background: url(http://devnet.map24.com/files/tooltip/tooltip_bubble_shade2_M.gif)"><p align="right" style="padding-top:7px;padding-right:70px"><a active="150,150,0" link="0,114,189" href="" onclick="Map24.dispatchEvent(del_tabs)"><img src="http://devnet.map24.com/files/tooltip/tooltip_close.gif" width="14" height="14" alt="close" title="close" border="0"/></a></p><div height="106" style="overflow:scroll; padding:10px; padding-right:74px"><table><tr><td width="0"></td><td><a href="" onclick="Map24.dispatchEvent(myTabbedHTMLObjTabTrigger0)"><div> | 1</div></a></td><td><a href="" onclick="Map24.dispatchEvent(myTabbedHTMLObjTabTrigger1)"><div> | 2</div></a></td><td><a href="" onclick="Map24.dispatchEvent(myTabbedHTMLObjTabTrigger2)"><div style="font-weight:bold"> | 3 |</div></a></td></tr></table><br/>'+cont3+'</div></div>';

      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
        mrcContainer.push(
        new Map24.Webservices.MRC.DeclareMap24HTMLObject({
          MapObjectID: "tabbedHtmlObject_page0",
            Coordinate: new Map24.Coordinate( 697.4995, 2893.1233 ),
            HTML: html1,
            Orientation: new Map24.Webservices.MapObjectOrientation({
              'Vertical':'TOP',
              'Horizontal':'RIGHT',
              'HOffset':0,
              'VOffset':0
            })
        })
      );
      mrcContainer.push(
        new Map24.Webservices.MRC.DeclareMap24HTMLObject({
          MapObjectID: "tabbedHtmlObject_page1",
            Coordinate: new Map24.Coordinate( 697.4995, 2893.1233 ),
            HTML: html2,
            Orientation: new Map24.Webservices.MapObjectOrientation({
              'Vertical':'TOP',
              'Horizontal':'RIGHT',
              'HOffset':0,
              'VOffset':0
            })
        })
      );
      mrcContainer.push(
        new Map24.Webservices.MRC.DeclareMap24HTMLObject({
          MapObjectID: "tabbedHtmlObject_page2",
            Coordinate: new Map24.Coordinate( 697.4995, 2893.1233 ),
            HTML: html3,
            Orientation: new Map24.Webservices.MapObjectOrientation({
              'Vertical':'TOP',
              'Horizontal':'RIGHT',
              'HOffset':0,
              'VOffset':0
            })
        })
      );
      mrcContainer.push(
        new Map24.Webservices.MRC.DeclareMap24Location({
          MapObjectID: "del_tabs",
          Coordinate: new Map24.Coordinate( 0, 0 ),
          Events: new Array(
            new Map24.Webservices.MapObjectEvent({
              ID: "OnClick",
              Commands: new Map24.Webservices.CommandsArray(
                new Map24.Webservices.MRC.RemoveMapObject({
                  MapObjectIDs: "tabbedHtmlObject_page0"
                }),
                new Map24.Webservices.MRC.RemoveMapObject({
                  MapObjectIDs: "tabbedHtmlObject_page1"
                }),
                new Map24.Webservices.MRC.RemoveMapObject({
                  MapObjectIDs: "tabbedHtmlObject_page2"
                }),
                new Map24.Webservices.MRC.Surf({
                  URL: "javascript:checkIconAction(\"htmlobjects_tabbed_delete\")"
                })
              )
            })
          )
        })
      );
      mrcContainer.push(
        new Map24.Webservices.MRC.DeclareMap24Location({
          MapObjectID: "myTabbedHTMLObjTabTrigger0",
          Coordinate: new Map24.Coordinate( 0, 0 ),
          Events: new Array(
            new Map24.Webservices.MapObjectEvent({
              ID: "OnClick",
              Commands: new Map24.Webservices.CommandsArray(
                new Map24.Webservices.MRC.Surf({
                  URL: "javascript:_setActualTab(\"tabbedHtmlObject_page0\")"
                })
              )
            })
          )
        })
      );
      mrcContainer.push(
        new Map24.Webservices.MRC.DeclareMap24Location({
          MapObjectID: "myTabbedHTMLObjTabTrigger1",
          Coordinate: new Map24.Coordinate( 0, 0 ),
          Events: new Array(
            new Map24.Webservices.MapObjectEvent({
              ID: "OnClick",
              Commands: new Map24.Webservices.CommandsArray(
                new Map24.Webservices.MRC.Surf({
                  URL: "javascript:_setActualTab(\"tabbedHtmlObject_page1\")"
                })
              )
            })
          )
        })
      );
      mrcContainer.push(
        new Map24.Webservices.MRC.DeclareMap24Location({
          MapObjectID: "myTabbedHTMLObjTabTrigger2",
          Coordinate: new Map24.Coordinate( 0, 0 ),
          Events: new Array(
            new Map24.Webservices.MapObjectEvent({
              ID: "OnClick",
              Commands: new Map24.Webservices.CommandsArray(
                new Map24.Webservices.MRC.Surf({
                  URL: "javascript:_setActualTab(\"tabbedHtmlObject_page2\")"
                })
              )
            })
          )
        })
      );

      mrcContainer.push(
        new Map24.Webservices.MRC.ControlMapObject({
          Control: "ENABLE",
          MapObjectIDs: "tabbedHtmlObject_page0"
        })
      );
      mrcContainer.push(
        SetMapView = new Map24.Webservices.MRC.SetMapView({
          ClippingWidth: new Map24.Webservices.ClippingWidth(
            { MinimumWidth: 2500 }
          ),
          MapObjectIDs: "tabbedHtmlObject_page0"
        })
      );

      _setActualTab("tabbedHtmlObject_page0");

      map.Webservices.sendRequest( mrcContainer );
    }

    /*This function centers the map view on a tabbed HTML object.*/
    function centerOnTabbedHTMLObject( zoomMeters ){
      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      mrcContainer.push(
        new Map24.Webservices.MRC.SetMapView({
          ClippingWidth: new Map24.Webservices.ClippingWidth(
            { MinimumWidth: zoomMeters }
          ),
          MapObjectIDs: actualTab
        })
      );
      map.Webservices.sendRequest( mrcContainer );
    }


    /*This function hides a tabbed HTML object.*/
    function hideTabbedHTMLObject(){
      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      mrcContainer.push(
        new Map24.Webservices.MRC.ControlMapObject({
          Control: 'DISABLE',
          MapObjectIDs: actualTab
        })
      );
      map.Webservices.sendRequest( mrcContainer );
    }

    /*This function shows a tabbed HTML object.*/
    function showTabbedHTMLObject(){
      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      mrcContainer.push(
        new Map24.Webservices.MRC.ControlMapObject({
          Control: 'ENABLE',
          MapObjectIDs: actualTab
        })
      );
      map.Webservices.sendRequest( mrcContainer );
    }

    /*This function removes a tabbed HTML object.*/
    function removeTabbedHTMLObject(){
      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      mrcContainer.push(
        new Map24.Webservices.MRC.RemoveMapObject({
          MapObjectIDs: actualTab
        })
      );
      map.Webservices.sendRequest( mrcContainer );
    }

    ///////////////////////////
    /*Locations with Tooltips*/
    ///////////////////////////

    /*This function adds a location with a tooltip. When you move the mouse on the location the tooltip is
      displayed*/
    function addCustomLocWithTooltip(){
      map.Webservices.sendRequest(
        new Map24.Webservices.Request.MapSearchFree(map, {
          SearchText: document.getElementById("customizelocation_address").value,
          MaxNoOfAlternatives: 1
        })
      );

      map.onMapSearchFree = function( event ){
        var firstResult = event.Alternatives[0];
        var lon = firstResult.Coordinate.Longitude;
        var lat = firstResult.Coordinate.Latitude;

        if(document.getElementById('customizelocation_ondblclick') && document.getElementById('customizelocation_ondblclick').checked==true)
  			  addLocationWithTooltip( "myLoc", lon, lat,  document.getElementById("customizelocation_tooltiptext").value, "OnDblClick" );
  			else if(document.getElementById('customizelocation_onclick') && document.getElementById('customizelocation_onclick').checked==true)
  			  addLocationWithTooltip( "myLoc", lon, lat,  document.getElementById("customizelocation_tooltiptext").value, "OnClick" );
    		else
    			addLocationWithTooltip( "myLoc", lon, lat,  document.getElementById("customizelocation_tooltiptext").value, "OnMouseOver" );
      }
    }

    function addLocationWithTooltip( locID, lon, lat, content, tooltipAppear ){

      addHTMLObjectBubble( locID+"_Tooltip", lon, lat, content, false );

      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      mrcContainer.push(
        new Map24.Webservices.MRC.DeclareMap24Location({
          MapObjectID: locID,
          Coordinate: new Map24.Coordinate( lon, lat ),
          LogoURL: "http://img.map24.com/map24/3DSignet/signet3d22x20.gif",
          SymbolID: 20100,
          Events: new Array(
            new Map24.Webservices.MapObjectEvent({
              ID: tooltipAppear,
                Commands: new Map24.Webservices.CommandsArray(
                  new Map24.Webservices.MRC.ControlMapObject({
                  Control: "ENABLE",
                  MapObjectIDs: locID+"_Tooltip"
                })
              )
            })
          )
        })
      );
      mrcContainer.push(
        new Map24.Webservices.MRC.DeclareMap24Location({
          MapObjectID: "trigger_"+locID+"_Tooltip",
          Coordinate: new Map24.Coordinate( 0, 0 ),
          Events: new Array(
            new Map24.Webservices.MapObjectEvent({
              ID: "OnClick",
              Commands: new Map24.Webservices.CommandsArray(
                new Map24.Webservices.MRC.ControlMapObject({
                  Control: "DISABLE",
                  MapObjectIDs: locID+"_Tooltip"
                })
              )
            })
          )
        })
      );
      mrcContainer.push(
        new Map24.Webservices.MRC.ControlMapObject({
          Control: "ENABLE",
          MapObjectIDs: locID
        })
      );
      mrcContainer.push( genSetMapView( "", "", 5000, "", locID ) );
      map.Webservices.sendRequest( mrcContainer );
    }


    /////////////
    /*Geocoding*/
    /////////////
    /*This function geocodes an address that is passed in form of the string. This string is contained by the
      parameter addressString. After the address is geocoded, the map view is centered on it and an HTML object
      is displayed that shows the complete address.*/
    function geocodeWithHTMLObject( addressString ){
      map.Webservices.sendRequest(
        new Map24.Webservices.Request.MapSearchFree(map, {
          SearchText: addressString,
          MaxNoOfAlternatives: 3
        })
      );

      map.onMapSearchFree = function( event ){
        var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
        var firstResult = event.Alternatives[0];
        var lon = firstResult.Coordinate.Longitude;
        var lat = firstResult.Coordinate.Latitude;

        var addressString = "<b>Gefundene Adresse:</b><br/>";
        if( typeof firstResult.PropertiesMajor["Street"]=="string" )
          addressString += firstResult.PropertiesMajor["Street"]+"<br />";
        addressString +=	firstResult.PropertiesMajor["Zip"]+" "+
        firstResult.PropertiesMajor["City"]+" "+
        "("+firstResult.PropertiesMajor["Cty"]+")";

        addHTMLObjectM24Layout( "geoHTMLObject", lon, lat, addressString );

        mrcContainer.push(
          new Map24.Webservices.MRC.SetMapView({
            Coordinates: new Map24.Coordinate( lon, lat ),
            ClippingWidth: new Map24.Webservices.ClippingWidth(
              { MinimumWidth: 1000 }
            )
          })
        );
        map.Webservices.sendRequest( mrcContainer );
      }
    }

    function addHTMLObjectM24Layout( objID, lon, lat, content ){
      var html = "<div font-family=\"Arial\" font-size=\"11\" style=\"overflow:hidden;width:138px; height:148px;padding: 0px; margin: 0px; border: 0px;\">"+
        "<div style=\"align:right;height:15px;position:absolute;top:0px;left:0px;padding: 0px; margin: 0px; border: 0px;color:#ffffff;\" bgcolor=\"#FF7021\">"+
     	  "<a active=\"#ffffff\" link=\"#ffffff\" href=\"control:close\" target=\"_self\"><b>[ X ]</b></a>"+
        "</div>"+
        "<div style=\"width:138px;height:78px;position:absolute;top:15px;overflow:scroll;background-color:#ffffff;left:0px;padding: 5px; margin: 0px; border: 0px;\">"+
        content+
        "</div>"+
        "<img src=\"http://devnet.map24.com/files/tooltip/tooltip_map24_bottom_S.gif\"/>"+
        "</div>";

      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );

      mrcContainer.push(
        new Map24.Webservices.MRC.DeclareMap24HTMLObject({
          MapObjectID: objID,
          Coordinate: new Map24.Coordinate( lon, lat),
          HTML: html,
          Orientation: new Map24.Webservices.MapObjectOrientation({
            'Vertical':'TOP',
            'Horizontal':'RIGHT',
            'HOffset':5,
            'VOffset':0
          })
        })
      );
      mrcContainer.push(
        new Map24.Webservices.MRC.ControlMapObject({
          Control: "ENABLE",
          MapObjectIDs: objID
        })
      );
      map.Webservices.sendRequest( mrcContainer );
    }

    ///////////
    /*Routing*/
    ///////////
    /*This function geocodes an adress. After the address has been geocoded the onGeoFunc function is called. The
      advantage of this approach is that any function can be called after the geocoding has been performed.*/
    function geocode( addressString, onGeoFunc ){
      map.Webservices.sendRequest(
        new Map24.Webservices.Request.MapSearchFree(map, {
          SearchText: addressString,
          MaxNoOfAlternatives: 3
        })
      );

      map.onMapSearchFree = function( event ){
        var geoRes = new Object();
        geoRes.Alternatives = event.Alternatives;
        geoRes.firstResult = geoRes.Alternatives[0];

        onGeoFunc( geoRes );
      }
    }

    /*This function calculates a route between start and destination that are given as address strings.*/
    function calculateRouteAddr( start, destination ){
      if( typeof start == 'undefined' || start == '' ){
        return;
      }
      if( typeof destination == 'undefined' || destination == '' ){
        return;
      }
      geocodeStartAndDestination( start, destination );
      return;
    }

    function geocodeStartAndDestination( start, destination ){
      //1. Geocode the start address. Addresses are passed as strings.
      geocode( start, onGeocodeStart )

      //2. When start address has been geocoded, then geocode destination address
      function onGeocodeStart( geoRes ){
        startGeocoded = geoRes.firstResult;
        geocode( destination, onGeocodeDest )
      }
      //3. When both start and dest address have been geocoded, then start route calculation
      function onGeocodeDest( geoRes ){
        destinationGeocoded = geoRes.firstResult;
        calculateRouteCoord( startGeocoded, destinationGeocoded );
      }
    }

    //Calculate a route between two addresses
    function calculateRouteCoord( startGeocoded, destinationGeocoded ){
      if( startGeocoded == 'NULL' || typeof startGeocoded == 'undefined' ) return;
      if( destinationGeocoded == 'NULL' || typeof destinationGeocoded == 'undefined' ) return;

      var routeRequest = new Map24.Webservices.Request.CalculateRoute( map );
      routeRequest.Start = new Map24.Webservices.Request.CalculateRoute.CoordinateAndAddress();
      routeRequest.Start.Coordinate = new Map24.Coordinate( startGeocoded.Coordinate.Longitude,
                                                            startGeocoded.Coordinate.Latitude );
      routeRequest.Destination = new Map24.Webservices.Request.CalculateRoute.CoordinateAndAddress();
      routeRequest.Destination.Coordinate = new Map24.Coordinate( destinationGeocoded.Coordinate.Longitude,
                                                                  destinationGeocoded.Coordinate.Latitude );
      map.Webservices.sendRequest( routeRequest );

     //This listener is called when the route calculation has finished
      map.onCalculateRoute = function( event ){
        var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
        mrcContainer.push(
          new Map24.Webservices.MRC.DeclareMap24RouteObject({
            MapObjectID: "actualRoute",
            Map24RouteID: event.Info.RouteID,
            Color: new Map24.Color( 0, 0, 255, 90 )
          })
        );
        //Center the map view on the route visualization
        mrcContainer.push( genSetMapView( "", "", 15000, 70, "actualRoute" ) );

        //Enable the visibility of the route
        mrcContainer.push( genControlMapObject( 'ENABLE', 'actualRoute' ) );

        //Draw a blue flag at the start of the route and an orange one at the destination
        mrcContainer.push(
          new Map24.Webservices.MRC.DeclareMap24Location({
            MapObjectID: "startLocation",
            Coordinate: new Map24.Coordinate( startGeocoded.Coordinate.Longitude, startGeocoded.Coordinate.Latitude ),
            LogoURL: "http://devnet.map24.com/files/start.gif",
            SymbolID: 20950
          })
        );
        mrcContainer.push( genControlMapObject( "ENABLE", "startLocation" ) );
        mrcContainer.push(
          new Map24.Webservices.MRC.DeclareMap24Location({
            MapObjectID: "destLocation",
            Coordinate: new Map24.Coordinate( destinationGeocoded.Coordinate.Longitude, destinationGeocoded.Coordinate.Latitude ),
            LogoURL: "http://devnet.map24.com/files/dest.gif",
            SymbolID: 20950
          })
        );
        mrcContainer.push( genControlMapObject( "ENABLE", "destLocation" ) );
        map.Webservices.sendRequest( mrcContainer );
      }
    }

    /*Map Layer*/
    function setLayerStatus( obj, layerIds ){
      if (obj.checked == true)
        ControlLayer('ENABLE',layerIds);
      else
        ControlLayer('DISABLE',layerIds);
      return;
    }

    /*Control Map Components*/
  	function controlComponent( control, component ){
      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      mrcContainer.push(
        new Map24.Webservices.MRC.ControlComponent({
          Control: control,
          Component: component
        })
      );
      component = "SHOW"+component;
      mrcContainer.push(
        new Map24.Webservices.MRC.ControlComponent({
          Component: component,
          Control: control
        })
      );
      map.Webservices.sendRequest( mrcContainer );
    }

    /*Factories. The factory?s task is to create an instance of a certain class using the values
      passed to the factory. You just have to call to the function with the values the object should
      have. Thereupon, the factory returns an instance of that object with the desired values.*/
    /*This function generates a controlMapObject which allows to control the visibility of a map
      object. The map objects is identified by the objID.*/
    function genControlMapObject( Control, objID ){
      var ControlObject = new Map24.Webservices.MRC.ControlMapObject({
        Control: Control,
        MapObjectIDs: objID
      });
      return ControlObject;
    }

    /*This function generates a RemoveMapObject which allows to remove the target map object. The map objects is
      identified by the objID.*/
    function genRemoveMapObject( objID ){
      var RemoveObject = new Map24.Webservices.MRC.RemoveMapObject({
        MapObjectIDs: objID
      });
      return RemoveObject;
    }

    /*This function generates a SetMapView object which allows to set the target map view. The map view can be
      centered on a longitude, latitude pair or on a map object which is identified by the objID.*/
    function genSetMapView( Long, Lat, ClippingWidth, ClippingPercent, objID ){
      var SetMapView = null;
      var Clip = new Array();
      if (ClippingWidth != '')
        Clip['MinimumWidth'] = ClippingWidth;
      if (ClippingPercent != '')
        Clip['ViewPercentage'] = ClippingPercent;
      if (Long != '' && Lat != '')
      {
        SetMapView = new Map24.Webservices.MRC.SetMapView({
          Coordinates: new Map24.Coordinate( Long, Lat ),
          ClippingWidth: new Map24.Webservices.ClippingWidth( Clip )
        });
      }
      else if ( objID != '' ){
        SetMapView = new Map24.Webservices.MRC.SetMapView({
          ClippingWidth: new Map24.Webservices.ClippingWidth( Clip ),
          MapObjectIDs: objID
        });
      }
      return SetMapView;
    }

    /*Helpers. Helpers execute tasks that often occur, therefore they minimize the code.*/
    /*This function hides (disables the visibility) of a map object*/
    function hideMapObject( objID ){
      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      mrcContainer.push( genControlMapObject( "DISABLE", objID ) );
      map.Webservices.sendRequest( mrcContainer );
    }

    /*This function shows (enables the visibility) of a map object*/
    function showMapObject( objID ){
      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      mrcContainer.push( genControlMapObject( "ENABLE", objID ) );
      map.Webservices.sendRequest( mrcContainer );
    }

    /*This function removes of a map object*/
    function removeMapObject( objID ){
      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      mrcContainer.push( genRemoveMapObject( objID ) );
      map.Webservices.sendRequest( mrcContainer );
    }

    /*This function removes of a map object*/
    function centerOnMapObject( objID ){
      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      mrcContainer.push( genSetMapView( "", "", "", 70, objID ) );
      map.Webservices.sendRequest( mrcContainer );
    }

    /*This function moves the map view in a predefined way such as NORTH, EAST,...,ZOOMIN,...HOME. The
      predefined values are passed as strings.*/
    function move( dir ){
      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      mrcContainer.push( new Map24.Webservices.MRC.ModifyMapView( { Control: dir } ) );
      map.Webservices.sendRequest( mrcContainer );
    }

    /*This function controls the visibility of a map layer.*/
  	function ControlLayer( cmd, layerid ) {
  		var mrc = new Map24.Webservices.Request.MapletRemoteControl( map );
  		mrc.push( new Map24.Webservices.MRC.ControlLayer(cmd, layerid, true) );
  		map.Webservices.sendRequest( mrc );
  	}

  	/*This function centers the map on london.*/
  	function centerMapOnLondon(){
      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      mrcContainer.push(
        new Map24.Webservices.MRC.SetMapView({
          Coordinates: new Map24.Coordinate( -8.1679, 3091.0424 ),
          ClippingWidth: new Map24.Webservices.ClippingWidth(
            { MinimumWidth: 460 }
          )
        })
      );
      map.Webservices.sendRequest( mrcContainer );
    }

    /*This function sets which tab is currently active.*/
    function _setActualTab( actTab ){
      actualTab = actTab;
      
      var mrcContainer = new Map24.Webservices.Request.MapletRemoteControl( map );
      
      for ( var i = 0; i < 3; i++ ){
        mrcContainer.push(
          new Map24.Webservices.MRC.ControlMapObject({
            Control: "DISABLE",
            MapObjectIDs: "tabbedHtmlObject_page"+i
          })
        );
     	}
      mrcContainer.push( 	
        new Map24.Webservices.MRC.ControlMapObject({
          Control: "ENABLE",
          MapObjectIDs: actTab
        })
      );
      map.Webservices.sendRequest( mrcContainer );
    }


    /*Menu controls*/
  	function listDemoMenu(menu)
  	{
  		if (typeof menu == 'undefined' || menu == '') return;
  		var prefix = 'map24_';

  		var menuDiv = document.getElementById(prefix+menu).style;

  		if (menuDiv.display == 'none'){
  			menuDiv.display = 'block';
			if(document.getElementById(menu+'_arrowimg')){
				document.getElementById(menu+'_arrowimg').src = 'img/arrow_down.gif';
			}
  			if( menu == "controllayer" )
  			  centerMapOnLondon();
  	  }
  		else{
  			menuDiv.display = 'none';
			if(document.getElementById(menu+'_arrowimg')){
				document.getElementById(menu+'_arrowimg').src = 'img/arrow_right.gif';
			}
  			if( menu == "controllayer" )
  			  move("HOME");
  		}
  	}

  	function toogleSection()
  	{
  		//|
listDemoMenu('searchaddress');
listDemoMenu('calculateandshowroute');
listDemoMenu('maptype');
  		return;
  	}

  	function showMenu(obj)
  	{
  		var objs = new Array('map24_label','map24_oval','map24_polygon','map24_polyline');
  		for (i=0; i<objs.length; i++)
  			document.getElementById(objs[i]).style.display='none';

  		document.getElementById(obj).style.display='block';
  		return;
  	}

  	function checkedStatus(obj,start,end)
  	{
  		var status = true;
  		if (obj.checked == false) status = false;
  		for (var i=start; i<=end; i++)
  		{
  			document.getElementById('myLayer'+i).checked = status;
  		}
  	}

  	function map24_open(URL)
  	{
  		var map24_window = window.open(URL,'Map24','width=360,height=300');
  		return;
  	}



	function checkIconAction(divId){
  		var divIdArray = divId.split('_');
		var actionId = divIdArray[2];
		var divIdBase = divIdArray[0]+'_'+divIdArray[1];
		if(actionId == 'add'){
			setActionIcon(divIdBase, 'add', 0);
			setActionIcon(divIdBase, 'delete', 1);
			setActionIcon(divIdBase, 'showhide', 2);
			setActionIcon(divIdBase, 'centerabove', 1);
		}
		else if(actionId == 'delete'){
			setActionIcon(divIdBase, 'add', 1);
			setActionIcon(divIdBase, 'delete', 0);
			setActionIcon(divIdBase, 'showhide', 0);
			setActionIcon(divIdBase, 'centerabove', 0);
		}
		else if(actionId == 'showhide' && getActionIconStatus(divIdBase, 'showhide') == 2){
			//setActionIcon(divIdBase, 'add', 0);
			//setActionIcon(divIdBase, 'delete', 1);
			setActionIcon(divIdBase, 'showhide', 1);
			//setActionIcon(divIdBase, 'centerabove', 1);
		}
		else if(actionId == 'showhide'){
			//setActionIcon(divIdBase, 'add', 0);
			//setActionIcon(divIdBase, 'delete', 1);
			setActionIcon(divIdBase, 'showhide', 2);
			//setActionIcon(divIdBase, 'centerabove', 1);
		}
		else if(actionId == 'centerabove'){
			//setActionIcon(divIdBase, 'add', 0);
			//setActionIcon(divIdBase, 'delete', 1);
			//setActionIcon(divIdBase, 'showhide', 2);
			setActionIcon(divIdBase, 'centerabove', 1);
		}
  	}
	function setActionIcon(divIdBase, actionId, status){
		if(!(document.getElementById(divIdBase + '_' + actionId))){return true;}
		if(status == 0){
			actionDef[divIdBase][actionId].status = 0;
			document.getElementById(divIdBase + '_' + actionId).style.cursor = '';
			document.getElementById(divIdBase + '_' + actionId).onclick = new Function('return false');
		}
		else{
			actionDef[divIdBase][actionId].status = status;
			document.getElementById(divIdBase + '_' + actionId).style.cursor = 'pointer';
			document.getElementById(divIdBase + '_' + actionId).style.cursor = 'hand';
			document.getElementById(divIdBase + '_' + actionId).onclick = new Function('checkIconAction(\''+divIdBase + '_' + actionId+'\');'+actionDef[divIdBase][actionId]['call'+status]);
		}
		document.getElementById(divIdBase + '_' + actionId + '_img').setAttribute('alt', actionAltDef[actionId][status]);
		document.getElementById(divIdBase + '_' + actionId + '_img').setAttribute('title', actionAltDef[actionId][status]);
		document.getElementById(divIdBase + '_' + actionId + '_img').setAttribute('src', actionIconDef[actionId][status]);
	}
	function getActionIconStatus(divIdBase, actionId){
		var status = actionDef[divIdBase][actionId].status;
		return status;
	}
	function enableCustomizeLocationFields(){
		document.getElementById('customizelocation_address').disabled = false;
		document.getElementById('customizelocation_tooltiptext').disabled = false;
		document.getElementById('customizelocation_onmouseover').disabled = false;
		document.getElementById('customizelocation_onclick').disabled = false;
		document.getElementById('customizelocation_ondblclick').disabled = false;
	}
	function disableCustomizeLocationFields(){
		document.getElementById('customizelocation_address').disabled = true;
		document.getElementById('customizelocation_tooltiptext').disabled = true;
		document.getElementById('customizelocation_onmouseover').disabled = true;
		document.getElementById('customizelocation_onclick').disabled = true;
		document.getElementById('customizelocation_ondblclick').disabled = true;
	}

	var actionDef = {};
	actionDef['mapobjects_label'] = {};
	actionDef['mapobjects_label']['add'] = {call1:'addLabel()', status:1};
	actionDef['mapobjects_label']['delete'] = {call1:'removeMapObject("myLabel")', status:0};
	actionDef['mapobjects_label']['showhide'] = {call1:'showMapObject("myLabel")', call2:'hideMapObject("myLabel")', status:0};
	actionDef['mapobjects_label']['centerabove'] = {call1:'centerOnMapObject("myLabel")', status:0};
	actionDef['mapobjects_location'] = {};
	actionDef['mapobjects_location']['add'] = {call1:'addLocation()', status:1};
	actionDef['mapobjects_location']['delete'] = {call1:'removeMapObject("myLocation")', status:0};
	actionDef['mapobjects_location']['showhide'] = {call1:'showMapObject("myLocation")', call2:'hideMapObject("myLocation")', status:0};
	actionDef['mapobjects_location']['centerabove'] = {call1:'centerOnMapObject("myLocation")', status:0};
	actionDef['mapobjects_polyline'] = {};
	actionDef['mapobjects_polyline']['add'] = {call1:'addPolyline()', status:1};
	actionDef['mapobjects_polyline']['delete'] = {call1:'removeMapObject("myPolyline")', status:0};
	actionDef['mapobjects_polyline']['showhide'] = {call1:'showMapObject("myPolyline")', call2:'hideMapObject("myPolyline")', status:0};
	actionDef['mapobjects_polyline']['centerabove'] = {call1:'centerOnMapObject("myPolyline")', status:0};
	actionDef['mapobjects_polygon'] = {};
	actionDef['mapobjects_polygon']['add'] = {call1:'addPolygon()', status:1};
	actionDef['mapobjects_polygon']['delete'] = {call1:'removeMapObject("myPolygon")', status:0};
	actionDef['mapobjects_polygon']['showhide'] = {call1:'showMapObject("myPolygon")', call2:'hideMapObject("myPolygon")', status:0};
	actionDef['mapobjects_polygon']['centerabove'] = {call1:'centerOnMapObject("myPolygon")', status:0};
	actionDef['mapobjects_oval'] = {};
	actionDef['mapobjects_oval']['add'] = {call1:'addOval()', status:1};
	actionDef['mapobjects_oval']['delete'] = {call1:'removeMapObject("myOval")', status:0};
	actionDef['mapobjects_oval']['showhide'] = {call1:'showMapObject("myOval")', call2:'hideMapObject("myOval")', status:0};
	actionDef['mapobjects_oval']['centerabove'] = {call1:'centerOnMapObject("myOval")', status:0};
	actionDef['htmlobjects_standard'] = {};
	actionDef['htmlobjects_standard']['add'] = {call1:'addHTMLObject()', status:1};
	actionDef['htmlobjects_standard']['delete'] = {call1:'removeMapObject("ffmHTMLObject")', status:0};
	actionDef['htmlobjects_standard']['showhide'] = {call1:'showMapObject("ffmHTMLObject")', call2:'hideMapObject("ffmHTMLObject")', status:0};
	actionDef['htmlobjects_standard']['centerabove'] = {call1:'centerOnMapObject("ffmHTMLObject")', status:0};
	actionDef['htmlobjects_bubble'] = {};
	actionDef['htmlobjects_bubble']['add'] = {call1:'addHTMLObjectBubbleBigBen()', status:1};
	actionDef['htmlobjects_bubble']['delete'] = {call1:'removeMapObject("myBubble")', status:0};
	actionDef['htmlobjects_bubble']['showhide'] = {call1:'showMapObject("myBubble")', call2:'hideMapObject("myBubble")', status:0};
	actionDef['htmlobjects_bubble']['centerabove'] = {call1:'centerOnMapObject("myBubble")', status:0};
	actionDef['htmlobjects_tabbed'] = {};
	actionDef['htmlobjects_tabbed']['add'] = {call1:'addTabbedHTMLObject()', status:1};
	actionDef['htmlobjects_tabbed']['delete'] = {call1:'removeTabbedHTMLObject()', status:0};
	actionDef['htmlobjects_tabbed']['showhide'] = {call1:'showTabbedHTMLObject()', call2:'hideTabbedHTMLObject()', status:0};
	actionDef['htmlobjects_tabbed']['centerabove'] = {call1:'centerOnTabbedHTMLObject(2000)', status:0};
	actionDef['htmlobjects_loctooltip'] = {};
	actionDef['htmlobjects_loctooltip']['add'] = {call1:'addCustomLocWithTooltip();disableCustomizeLocationFields()', status:1};
	actionDef['htmlobjects_loctooltip']['delete'] = {call1:'removeMapObject("myLoc");enableCustomizeLocationFields()', status:0};
	actionDef['htmlobjects_loctooltip']['showhide'] = {call1:'showMapObject("myLoc")', call2:'hideMapObject("myLoc")', status:0};
	actionDef['htmlobjects_loctooltip']['centerabove'] = {call1:'centerOnMapObject("myLoc")', status:0};
	actionDef['components_3dview'] = {};
	actionDef['components_3dview']['showhide'] = {call1:'controlComponent("SHOW", "M3D")', call2:'controlComponent("HIDE", "M3D")', status:1};
	actionDef['components_overview'] = {};
	actionDef['components_overview']['showhide'] = {call1:'controlComponent("SHOW", "OV")', call2:'controlComponent("HIDE", "OV")', status:1};
	actionDef['components_routepanel'] = {};
	actionDef['components_routepanel']['showhide'] = {call1:'controlComponent("SHOW", "M3DROUTE")', call2:'controlComponent("HIDE", "M3DROUTE")', status:1};
	actionDef['components_toolbar'] = {};
	actionDef['components_toolbar']['showhide'] = {call1:'controlComponent("SHOW", "TBAR")', call2:'controlComponent("HIDE", "TBAR")', status:2};
	actionDef['maptype_mgi'] = {};
	actionDef['maptype_mgi']['showhide'] = {call1:'javascript:setMGI();setActionIcon("maptype_java", "showhide", "1")', call2:'javascript:setJava();setActionIcon("maptype_java", "showhide", "2")', status:1};
	actionDef['maptype_java'] = {};
	actionDef['maptype_java']['showhide'] = {call1:'javascript:setJava();setActionIcon("maptype_mgi", "showhide", "1")', call2:'javascript:setMGI();setActionIcon("maptype_mgi", "showhide", "2")', status:2};


	var infoStyle = 'body{background-color:#FFFFFF;}body, table, div, td, tr, span{font-family:Arial;font-size:11px;}';
		infoStyle += '.stylexy{color:#AA0000;}';


	var infoContentTemplate = '<table cellpadding="0" cellspacing="0" style="border:2px solid #fea13f;background-color:#efefef;padding:3px;"><tbody><tr>';
	infoContentTemplate += '<td><div style="overflow:hidden">%content%</div></td>';
	infoContentTemplate += '</tr></tbody></table>';

	var infoContents = new Array();
	infoContents['info_maptype'] = 'You can switch between static and interactive maps at any time. The interactive map provides the map data in a computational format for higher performance and interactivity. Interactive maps require an installed Java runtime environment.';
	infoContents['info_mapobject'] = 'You can add and remove all kinds of map objects: locations, labels, polylines, polygons and ovals and define their layout. Furthermore, it is possible to change their visibility after they have been added to the map.';
	infoContents['info_htmlobject'] = 'HTML objects display HTML code. They can display texts, tables, links, images and forms in a separate frame. You can also customize the layout of an HTML object.';
	infoContents['info_customizelocation'] = 'This section allows you to create a location at a customized address. You can choose the text of the tooltip that is bound to the location and on which type of mouse event the tooltip appears.';
	infoContents['info_maplayer'] = 'Map layers contain all kinds of objects that might be of interest: streets, bridges, buildings, restaurants, gas stations, medical help, railway stations, parking areas, public buildings, and many more. By default, all layers are visible, use the checkboxes to change the visibility of the corresponding layers.';
	infoContents['info_mapcomponents'] = 'The advanced map controls allow viewing the map from different point of views: 3D View, Map Overview Window and the Route Panel are controls that let you customize the perspective. For example, with the Route Panel you can fly along a calculated route. Furthermore, you can use the Map24 Toolbar to navigate around the map.';
	infoContents['info_geocoding'] = 'The user can enter search requests in the input field below. After pressing the "Go" button, the Map24 Geocoder calculates the geographical coordinates that correspond to the entered request. Subsequently, the map is centered on the coordinates and an HTML tooltip shows address information.';
	infoContents['info_routing'] = 'Routing allows you to calculate a route between a specified start and destination address. After it has been calculated, the route is painted on the map.';

	var actionIconDef = {};
	actionIconDef['add'] = new Array('img/add_dis.gif', 'img/add_std.gif');
	actionIconDef['delete'] = new Array('img/del_dis.gif', 'img/del_std.gif');
	actionIconDef['showhide'] = new Array('img/showhide_func1_dis.gif', 'img/showhide_func2_std.gif', 'img/showhide_func1_std.gif');
	actionIconDef['centerabove'] = new Array('img/centerabove_dis.gif', 'img/centerabove_std.gif');

	var actionAltDef = {};
	actionAltDef['add'] = new Array('add, show and go to', 'add, show and go to');
	actionAltDef['delete'] = new Array('delete', 'delete');
	actionAltDef['showhide'] = new Array('hide', 'show', 'hide');
	actionAltDef['centerabove'] = new Array('go to', 'go to');  