All pastes #899984 Raw Edit

Untitled

public text v1 · immutable
·published 2008-02-11 16:09 UTC
rendered paste body
FIREBUG LITE -> Invalid syntax minimal.phtml?WMS_LAYERS_TOADD=1049&NAV_INPUT_TYPE=&NAV_INPUT_COORDINATES=&NAV_INPUT_SUBMIT=&MAP_EXTENTS_MINX=-82.0077951002&MAP_EXTENTS_MINY=43&MAP_EXTENTS_MAXX=-53.9922048998&MAP_EXTENTS_MAXY=64&MAP_WIDTH=600&MAP_HEIGHT=450&MAP_CURSOR_POS_X=&MAP_CURSOR_POS_Y=&NAV_CMD=&NAV_SUBMIT=1&MAP_ORIGINAL_EXTENTS=-82.0077951002%2C43%2C-53.9922048998%2C64&MAP_ORIGINAL_PROJ=%2Binit%3Depsg%3A4326&CURSOR_TYPE=AUTO&LAYERORDER_MOVE11=&LAYER_ORDER=Ombrage%2CMNE%2Cprovinces_etats%2CPROVINCE_QC%2CBDGA_HYDRO_S_POLY%2Chydro_l_arc%2Cenerg_l_arc%2Ctrans_l_arc%2Croute_l_arc%2Chabit_p_point%2CQu%E9bec_-_Base_de_donn%E9es_topographiques_du_Qu%E9bec-HYDROGRAPHIE&LAYER_ORDER_PREVIOUS=Ombrage%2CMNE%2Cprovinces_etats%2CPROVINCE_QC%2CBDGA_HYDRO_S_POLY%2Chydro_l_arc%2Cenerg_l_arc%2Ctrans_l_arc%2Croute_l_arc%2Chabit_p_point%2CQu%E9bec_-_Base_de_donn%E9es_topographiques_du_Qu%E9bec-HYDROGRAPHIE&LAYERORDER_MOVE12=&REMOVE_LAYER13=&NAV_ALLOW_RECTANGLE=true&sid=47b071dc1a852&SELECTED_LAYERS=Ombrage&BUTTON_TOOLSET_mapsizes=cwcimage_8&SET_MAP_WIDTH=&SET_MAP_HEIGHT=&UPDATE_MAP=0&LEGENDTEMPLATE_RESET=&LEGENDTEMPLATE_LAYERS=Ombrage%7E%7EMNE%7E%7Eprovinces_etats%7E%7EPROVINCE_QC%7E%7EBDGA_HYDRO_S_POLY%7E%7Ehydro_l_arc%7E%7Eenerg_l_arc%7E%7Etrans_l_arc%7E%7Eroute_l_arc%7E%7Ehabit_p_point%7E%7EQu%E9bec_-_Base_de_donn%E9es_topographiques_du_Qu%E9bec-HYDROGRAPHIE&BUTTON_TOOLSET_Navigation=&LANGUAGE=fr-CA&legendlayername%5B%5D=Qu%E9bec_-_Base_de_donn%E9es_topographiques_du_Qu%E9bec-HYDROGRAPHIE&legendlayername%5B%5D=habit_p_point&legendlayername%5B%5D=route_l_arc&legendlayername%5B%5D=hydro_l_arc&legendlayername%5B%5D=BDGA_HYDRO_S_POLY&legendlayername%5B%5D=PROVINCE_QC&legendlayername%5B%5D=provinces_etats&legendlayername%5B%5D=MNE&my_legend=on&legendlayername%5B%5D=Ombrage (line 1) 

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="fr-CA" lang="fr" debug="true">
<HEAD><!-- javascript include cwc_dhtml.js -->
<script language="JavaScript" src="http://localhost/chameleon//widgets/js/cwc_dhtml.js" type="text/javascript"></script>
<!-- javascript include cwc_button.js -->
<script language="JavaScript" src="http://localhost/chameleon//widgets/js/cwc_button.js" type="text/javascript"></script>
<!-- javascript include MapDHTML.js -->
<script language="JavaScript" src="http://localhost/chameleon//widgets/MapDHTML/MapDHTML.js" type="text/javascript"></script>
<!-- javascript include cwc_events.js -->
<script src="http://localhost/chameleon//widgets/js/cwc_events.js" type="text/javascript"></script>
<SCRIPT Language="JavaScript"  type="text/javascript">

var gCWCJSAPI = 0;
var gAPixel = 'http://localhost/chameleon//skins/default/images/a_pixel.gif';
var gMapWiWidth = 600;
var gMapWiHeight = 450;
var gMapDHTMLDelayDraw = true;
var gMapDHTMLWaitImage = 'http://localhost/chameleon//skins/default/images/a_pixel.gif';
var gMapDHTMLWaitImageWidth = 1;
var gMapDHTMLWaitImageHeight = 1;
var gMapDHTMLVerticalMarquee = 'http://localhost/chameleon//skins/default/images/a_pixel.gif';
var gMapDHTMLHorizontalMarquee = 'http://localhost/chameleon//skins/default/images/a_pixel.gif';
var gMapDHTMLMarqueeWidth = 2;
var gMapDHTMLMarqueeColor = 'FF3333';
var gMapDHTMLURL = '/chameleon//common//wrapper/drawmap.php?map_session_mode=1&run_query=0&sid=47b071dc1a852&streaming=true&dummy=0.27972300+1202745835';
var gMapDHTMLAllowResize = 1;
var gMapOffset = 1;
if (navigator.appName != "Microsoft Internet Explorer") document.captureEvents(Event.MOUSEMOVE);

var gnMouseX = -1;

var gnMouseY = -1;

function BrowseWMSCallBack( actionId, wh )
{
    if ( actionId == 0) //Clicked Apply
    {
        var szSelectedLayers = wh.document.forms[0].selectedLayers.value;
        document.forms[0].WMS_LAYERS_TOADD.value = szSelectedLayers;

        if (0)
        {
            AddWMSLayer(szSelectedLayers);
        }
        else
        {
            document.forms[0].NAV_CMD.value = "";
            document.forms[0].submit();
        }
    }
    else if ( actionId == 1) // cancel
    {
        if (!wh.closed)
            wh.close();
    }
    else if ( actionId == 2) // submit only
    {
        document.forms[0].NAV_CMD.value = "";
        document.forms[0].submit();
    }
    return;
}
function clickWMSBrowser()
{
    var wh = window.open('http://localhost/chameleon//widgets/WMSBrowser/WMSBrowser.php?sid=47b071dc1a852', 'WMSBrowser_4_47b071dc1a852', 'width=700,height=620,toolbar=yes,menubar=yes,status=yes,scrollbars=yes,resizable=yes');
if (!wh)
{
    alert( 'unable to open popup dialog.  Perhaps you have a popup blocker installed?' );
}
else
{
    wh.focus();
}
}
/**
 * AddWMSLayer
 * called to add a WMS layer(JSAPI)
 */
function AddWMSLayer(szSelectedLayers)
{
    CWCDHTML_ShowLayer("ActivityLayer");

    goCWCJSAPI.NAV_CMD = '';

    aHiddenVars = new Array(1);
    aHiddenVars[0] = new Array(2);
    aHiddenVars[0][0] = "WMS_LAYERS_TOADD";
    aHiddenVars[0][1] = szSelectedLayers;

    szOnLoad = 'WMSLayerAdded()';

    goCWCJSAPI.CallServer(szOnLoad, aHiddenVars);
}
/**
 * WMSLayerAdded
 * called when a new WMS layer is added(JSAPI)
 */
function WMSLayerAdded()
{
        goCWCJSAPI.TriggerEvent(MAP_NEW_LAYER_ADDED);
}
/**
 * clickLayerOrder
 * called when the user clicks the LayerOrder icon
 */

function clickLayerOrder(obj, direction)
{
    with(document.forms[0])
    {
       	LAYERORDER_MOVE11.value = direction;
       	NAV_CMD.value = '';

        if (0)
        {
            var sOldTool = goCWCJSAPI.NAV_CMD;

            if(direction == "UP")
            {
                goCWCJSAPI.oMap.GetLayerByName(SELECTED_LAYERS.value).Promote();
            }
            else
            {

                goCWCJSAPI.oMap.GetLayerByName(SELECTED_LAYERS.value).Demote();
            }
            goCWCJSAPI.NAV_CMD = '';
            goCWCJSAPI.RefreshMap();
            goCWCJSAPI.NAV_CMD = sOldTool;
            document.forms[0].NAV_CMD.value = sOldTool;

        } else 
        // If ApplyOnRefresh is true, don't submit the page, 
        // butupdate the JS array instead
        if(1)
        {
            LAYERORDER_MOVE11.value = '';
            if(!SELECTED_LAYERS)
                alert('The ApplyOnRefresh functionality of the LayerOrder '+
                      'widget needs the SelectLayers widget to be present.');
            updateLayerOrderArray(direction, SELECTED_LAYERS.value);
        }
        else
        {
            submit();
        }

    }
    return;
}

/**
 * updateLayerOrderArray
 * function to change the aszLayerOrder array
 */

function updateLayerOrderArray(direction, szLayerName)
{
    var aszLayerOrder = document.forms[0].LAYER_ORDER.value.split( "," );
    var oLegendLayerDOM1 = false;
    var oLegendLayerDOM2 = false;
    for(var i=0; i<aszLayerOrder.length; i++)
    {
        if(aszLayerOrder[i] == szLayerName)
        {
            if(direction == "UP" && (i+1)<aszLayerOrder.length)
            {
                // Change the legend layer div to match the new order
                oLegendLayerDOM1 = document.getElementById(
                        'LAYERORDER_'+aszLayerOrder[i+1]);
                if(i==0)
                    oLegendLayerDOM2 = oLegendLayerDOM1.parentNode.rows[oLegendLayerDOM1.rowIndex+2];
                else
                    oLegendLayerDOM2 = document.getElementById(
                        'LAYERORDER_'+aszLayerOrder[i-1]);
                // Change the layer order array
                aszLayerOrder.splice( i, 2, aszLayerOrder[i+1], 
                                      aszLayerOrder[i] );
            }
            else if( direction == "DOWN" && (i-1) >= 0 )
            {
                // Change the legend layer div to match the new order
                oLegendLayerDOM1 = document.getElementById(
                        'LAYERORDER_'+aszLayerOrder[i-1]);
                oLegendLayerDOM2 = document.getElementById(
                        'LAYERORDER_'+aszLayerOrder[i]);
                // Change the layer order array
                aszLayerOrder.splice( i-1, 2, aszLayerOrder[i], 
                                      aszLayerOrder[i-1] );
            }
            break;
        }
     }
    if(oLegendLayerDOM1 && oLegendLayerDOM2)
    {
        oLegendLayerDOM1.parentNode.insertBefore(
            oLegendLayerDOM1.cloneNode(true), oLegendLayerDOM2);
        oLegendLayerDOM1.parentNode.deleteRow(oLegendLayerDOM1.rowIndex);
    }

    document.forms[0].LAYER_ORDER.value = aszLayerOrder.join();

    return;
}

/**
 * clickRemoveLayer
 * called when the user clicks the RemoveLayer icon
 */

function clickRemoveLayer()
{
    if (document.forms[0].SELECTED_LAYERS == null ||
        document.forms[0].SELECTED_LAYERS.value == null ||
        document.forms[0].SELECTED_LAYERS.value == "" )
    {
        alert( "There is no active map layer" );
        return;
    }
    with(document.forms[0])
    {
       // reset the NAV_CMD
       NAV_CMD.value = "";
       REMOVE_LAYER13.value = "1";
       submit();
    }
    return;
}

function KeyMapTrackMouseXY(e)
{
    if (navigator.appName == "Microsoft Internet Explorer")
    {
        gnMouseX = event.clientX + document.body.scrollLeft;
        gnMouseY = event.clientY + document.body.scrollTop;
    }
    else
    {
        gnMouseX = e.pageX;
        gnMouseY = e.pageY;
    }
    return true;
}
function KeyMapCaptureMouse()
{
    document.onmousemove=KeyMapTrackMouseXY;
}
function KeyMapReleaseMouse()
{
    document.onmousemove=null;
}
function KeyMapClicked( )
{
    if (gnMouseX == -1 || gnMouseY == -1)
        return;

    var nAnchorX = CWCDHTML_FindObjectPosX( CWCDHTML_GetImage('keymapFrameTL') );
    var nAnchorY = CWCDHTML_FindObjectPosY( CWCDHTML_GetImage('keymapFrameTL') );;

    // Keep the old information for the jsapi mode.
    if(0)
    {
        var sOldTool = goCWCJSAPI.NAV_CMD;
    }

    nAnchorX +=1;
    nAnchorY +=1;

    nMapX = gnMouseX - nAnchorX;
    nMapY = gnMouseY - nAnchorY;

    szCoord= nMapX + "," + nMapY;

    document.forms[0].NAV_INPUT_COORDINATES.value=szCoord;
    document.forms[0].NAV_INPUT_TYPE.value='POINT';
    document.forms[0].NAV_CMD.value='KEY_MAP';

    if (0)
    {
        goCWCJSAPI.NAV_INPUT_COORDINATES = szCoord;
        goCWCJSAPI.NAV_INPUT_TYPE = 'POINT';
        goCWCJSAPI.NAV_CMD='KEY_MAP';
        goCWCJSAPI.UpdateNavTools();

        goCWCJSAPI.NAV_CMD = sOldTool;
        goCWCJSAPI.NAV_INPUT_COORDINATES = '';
        goCWCJSAPI.NAV_INPUT_TYPE = '';
        document.forms[0].NAV_INPUT_COORDINATES.value='';
        document.forms[0].NAV_INPUT_TYPE.value='';
        document.forms[0].NAV_CMD.value=sOldTool;
    }
    else
    {
        document.forms[0].submit();
    }
}
/**
 * CWCSelectLayer
 * called to set a layer as selected.  If the layer is already selected, then
 * it deselects the layer.  Returns true if the layer was added, false otherwise.
 */
function CWCSelectLayer( szLayerName, bSingle )
{
    with(document.forms[0])
    {
        var aszLayers;
        if (bSingle)
        {
            aszLayers = new Array();
        }
        else
        {
            aszLayers = SELECTED_LAYERS.value.split( "," );
        }
        var aszNewLayers = new Array();
        var i;
        var bNewLayer = true;
        for (i=0; i < aszLayers.length; i++)
        {
            if (szLayerName == aszLayers[i])
            {
                bNewLayer = false;
            }
            else
            {
                aszNewLayers[aszNewLayers.length] = aszLayers[i];
            }
        }
        if (bNewLayer)
        {
            aszNewLayers[aszNewLayers.length] = szLayerName;
        }
        SELECTED_LAYERS.value = aszNewLayers.toString();
    }
    
    goEventManager.triggerEvent( 'LAYER_SELECTION_CHANGED' );
    
    return bNewLayer;
}
/**
  _____________________________________________________________________________
 |
 |  launchPopin
 |  Displays popin window.
 |_____________________________________________________________________________

 **/
function launchPopin()
{
    // get the current highest zIndex
    var maxZIndex = PopinGetHighestZ();

    // lock application
    CWCDHTML_ShowMaskLayer( maxZIndex + 1 );

    // store div name
    szCurrentDiv = 'divpopinMapSize_9_47b071dc1a852';

    // create the layer
    var newDiv = document.createElement('div');
    newDiv.id = 'divpopinMapSize_9_47b071dc1a852';
    var divContents = '<div class="titleBar"><img class="titleBarClose" src="http://localhost/chameleon//images/icon_close.png" width="20" height="20" onclick="closePopin()"><img class="titleBarIcon" src="http://localhost/chameleon//images/icon_mapsize.png" width="19" height="18"><span class="titleBarText">Resize Map</span></div><iframe class="PopinFrame" name="popinMapSize_9_47b071dc1a852" id="popinMapSize_9_47b071dc1a852" src="http://localhost/chameleon//widgets/MapSize/MapSizePopup.phtml?sid=47b071dc1a852" frameborder="0" scrolling="auto" style="width:480px; height:200px;" allowtransparency="true"></iframe>';
    newDiv.innerHTML = divContents;
    newDiv.className = 'popinChrome';
    newDiv.style.width = '480px';
    newDiv.style.position = 'absolute';
    newDiv.style.top = '50px';
    newDiv.style.left = '50px';
    newDiv.style.zIndex = maxZIndex + 2;
    document.body.appendChild( newDiv );

}
/**
  _____________________________________________________________________________
 |
 |  closePopin
 |  Hides popin window.
 |_____________________________________________________________________________

 **/
function closePopin()
{
    // only close if current div is set
    if ( szCurrentDiv == '' )
    {
        return;
    }

    // destroy popin layer
    var oDiv = document.getElementById( szCurrentDiv );
    document.body.removeChild( oDiv );

    // clear current div
    szCurrentDiv = '';

    // hide mask
    CWCDHTML_HideMaskLayer();

}
/**
  _____________________________________________________________________________
 |
 |  PopinGetHighestZ
 |  gets highest Z index
 |_____________________________________________________________________________

 **/
function PopinGetHighestZ()
{
    var documentDivs = new Array();
    documentDivs = document.getElementsByTagName("DIV")
    var highestZ = 0;
    for (var i = 0; i < documentDivs.length; i++)
    {
        var zIndex = documentDivs[i].style.zIndex;
        highestZ = (zIndex > highestZ) ? zIndex : highestZ;
    }

    return highestZ;
}
/**
 * applyMapSize
 * apply a new map size.
 */
function applyMapSize(nWidth, nHeight)
{
      if (0)
      {
          SetMapSize(nWidth, nHeight);
      }
      else
      {
          document.forms[0].NAV_CMD.value = "";
          document.forms[0].SET_MAP_WIDTH.value=nWidth;
          document.forms[0].SET_MAP_HEIGHT.value=nHeight;
          document.forms[0].submit();
      }

     return;
}
/**
 * cancelMapSize
 * cancel the user changing the map size.
 */
function cancelMapSize()
{
     obj = document.forms[0].MAP_SIZE;
     aMapSize = getMapSize();
     szMapSize = aMapSize[0] + "," + aMapSize[1];
     for (i=0; i<obj.options.length; i++ )
     {
        val = obj.options[i].value;
        if (val == szMapSize)
        {
           obj.selectedIndex = i;
            break;
        }
     }
     return;
}
/**
 * getMapSize
 * return the current extents as an array (width,height)
 */
function getMapSize()
{
    if (0)
    {
        return new Array( goCWCJSAPI.oMap.width, goCWCJSAPI.oMap.height );
    }
    else
    {
        return new Array( 600, 450 );
    }
}
/**
 * changeMapSize
 * called when the mapsize value is changed.
 */
function changeMapSize(obj)
{
    mapsize=obj.options[obj.selectedIndex].value;
    pos = mapsize.indexOf(",");
    width = mapsize.substring( 0, pos );
    height = mapsize.substring( pos + 1, mapsize.length );
    if (width == "custom" || height == "custom")
        if (0)
        {
            SetMapSize(width, height);
        }
        else
        {
            clickMapSizePopup();
        }
    else
    {
        curMapSize = getMapSize();
        if (curMapSize[0] != width || curMapSize[1] != height )
        {
            if (0)
            {
                SetMapSize(width, height);
            }
            else
            {
                document.forms[0].NAV_CMD.value = "";
                document.forms[0].SET_MAP_WIDTH.value = width;
                document.forms[0].SET_MAP_HEIGHT.value = height;
                document.forms[0].submit();
            }
        }
    }
    return;
}
/**
 * SetMapSize
 * Change the map size
 */
function SetMapSize(nNewWidth, nNewHeight)
{
    CWCDHTML_ShowLayer("ActivityLayer");

    var sOldTool = goCWCJSAPI.NAV_CMD;
    goCWCJSAPI.NAV_CMD = "";
    document.forms[0].NAV_CMD.value = "";
    goCWCJSAPI.oMap.width = nNewWidth;
    goCWCJSAPI.oMap.height = nNewHeight;

    aHiddenVars = new Array(2);
    aHiddenVars[0] = new Array(2);
    aHiddenVars[0][0] =  "SET_MAP_WIDTH";
    aHiddenVars[0][1] = nNewWidth;
    aHiddenVars[1] = new Array(2);
    aHiddenVars[1][0] =  "SET_MAP_HEIGHT";
    aHiddenVars[1][1] = nNewHeight;

    szOnLoad = 'MapSizeChanged()';

    goCWCJSAPI.CallServer(szOnLoad, aHiddenVars);

    goCWCJSAPI.NAV_CMD = sOldTool;
    document.forms[0].NAV_CMD.value = sOldTool;

}
/**
 * MapSizeChanged
 * called when the size of the map is changed(JSAPI)
 */
function MapSizeChanged()
{
        goCWCJSAPI.TriggerEvent(MAP_SIZE_CHANGED);
        //Readjust the map extents because when the map session is restored
        //in readMapFile(), setExtent() modify the map extents (MT1799).
        goCWCJSAPI.oMap.ZoomFull();
}
/**
 * clickUpdateMap
 * called when the user clicks the UpdateMap icon
 */
function clickUpdateMap()
{
    // clear the nav command
    document.forms[0].NAV_CMD.value = '';
    

    if (0)
    {
        var sOldTool = goCWCJSAPI.NAV_CMD;

        document.forms[0].MAP_EXTENTS_MINX.value = goCWCJSAPI.oMap.minx;  
        document.forms[0].MAP_EXTENTS_MAXX.value = goCWCJSAPI.oMap.maxx;
        document.forms[0].MAP_EXTENTS_MINY.value = goCWCJSAPI.oMap.miny;
        document.forms[0].MAP_EXTENTS_MAXY.value = goCWCJSAPI.oMap.maxy;

        goCWCJSAPI.NAV_CMD = '';
        if( document.forms[0].UPDATE_MAP.value == "1")
        {
            goCWCJSAPI.oMap.oApplication.ZoomToScale(document.forms[0].SCALE.value);
            document.forms[0].UPDATE_MAP.value = "0";
        }
        else
        {
            goCWCJSAPI.RefreshMap();
        }

        goCWCJSAPI.NAV_CMD = sOldTool;
        document.forms[0].NAV_CMD.value = sOldTool;

    }
    else
    {
        document.forms[0].UPDATE_MAP.value = "1";
        document.forms[0].submit();
    }


    return;
}
function LegendTemplateGetLayerName( index )
{
aLayers = new Array();
aLayers[0] = "Ombrage";
aLayers[1] = "MNE";
aLayers[2] = "provinces_etats";
aLayers[3] = "PROVINCE_QC";
aLayers[4] = "BDGA_HYDRO_S_POLY";
aLayers[5] = "hydro_l_arc";
aLayers[6] = "energ_l_arc";
aLayers[7] = "trans_l_arc";
aLayers[8] = "route_l_arc";
aLayers[9] = "habit_p_point";
aLayers[10] = "Québec_-_Base_de_données_topographiques_du_Québec-HYDROGRAPHIE";
aLayers[11] = "Québec_-_Base_de_données_topographiques_du_Québec-VEGETATION";

return aLayers[index];
}

/**
 * LegendTemplateLayerInfo
 * called to popup infos on the layer into a separate window
 */
function LegendTemplateLayerInfo(layername)
{
    layername = layername.replace(/é/g,'%E9');
    var wh = window.open('http://localhost/chameleon//widgets/LegendTemplate/LegendInfo.phtml?layerName='+layername+'&sid=47b071dc1a852', 'LegendTemplate_14_47b071dc1a852', 'width=500,height=400,toolbar=yes,menubar=no,status=no,scrollbars=yes,resizable=yes');
if (!wh)
{
    alert( 'unable to open popup dialog.  Perhaps you have a popup blocker installed?' );
}
else
{
    wh.focus();
}
}
/**
 * set the active navigation tool
 */
function NavSetActiveTool( oButton, aVals )
{
    var nTool = aVals[0];
    var sTool = aVals[1];
    var bAllowRectangle = (aVals[2] == 0 || aVals[2] == "0") ? false : true;
    var bAutoSubmit = (aVals[3] == 0 || aVals[3] == "0") ? false : true;
    var szCursorType = aVals[4];
    var nNavSubmit = (aVals[5] != undefined) ? aVals[5] : 1;

    // Keep the old information for the jsapi mode.
    if(0)
    {
        var sOldTool = goCWCJSAPI.NAV_CMD;
        var bOldAllowRectangle =document.forms[0].NAV_ALLOW_RECTANGLE.value;
        var bOldAutoSubmit = document.forms[0].NAV_SUBMIT.value;
    }

    document.forms[0].NAV_CMD.value = sTool;
    document.forms[0].NAV_ALLOW_RECTANGLE.value=bAllowRectangle;
    document.forms[0].NAV_SUBMIT.value=nNavSubmit;

    if (0)
    {
        goCWCJSAPI.NAV_CMD = sTool;
    }

    if (bAutoSubmit)
    {
        if (0)
        {
            goCWCJSAPI.UpdateNavTools();

            goCWCJSAPI.NAV_CMD = sOldTool;
            document.forms[0].NAV_CMD.value = sOldTool;
            document.forms[0].NAV_ALLOW_RECTANGLE.value=bOldAllowRectangle;
            document.forms[0].NAV_SUBMIT.value=bOldAutoSubmit;
        }
        else
        {
            document.forms[0].submit();
        }    
    }

    if (document.forms[0].CURSOR_TYPE != null)
    {
      document.forms[0].CURSOR_TYPE.value = szCursorType;
    }
    
    goEventManager.triggerEvent( 'NAV_TOOL_CHANGED', sTool );
}
/**
 * 
 */
function setLanguage(szLanguage)
{
    aLanguages = new Array();


    //if this is called from a Link widget then the first argument
    //is an object (the button) and the second is the language
    if (arguments.length == 2 && String(szLanguage).length != 5)
    {
        szLanguage = arguments[1];
    }

    bValid = false;
    for( i=0; i< aLanguages.length; i++ )
    {
        if ( aLanguages[i][0] == szLanguage )
        {
            bValid = true;
            break;
        }
    }
    document.forms[0].LANGUAGE.value = szLanguage;
    document.forms[0].submit();
    return true;
}function CWC2OnLoadFunction()
{

MapLayerDivImgOnLoad();

MapWPositionMapDHTML();

var CWCButtonInit_8 = goCWCButtonManager.GetButton( "cwcimage_8" );
CWCButtonInit_8.bActive = true;
CWCButtonInit_8.SetState( CWCBUTTONSTATE_SELECTED );
if (CWCButtonInit_8.onClick != null)
{
    CWCButtonInit_8.onClick( CWCButtonInit_8, CWCButtonInit_8.xValues );
}
if (CWCButtonInit_8.oGroup != null)
{
    CWCButtonInit_8.oGroup.ActivateButton( CWCButtonInit_8 );
}
var CWCButtonInit_3 = goCWCButtonManager.GetButton( "cwcimage_3" );
CWCButtonInit_3.bActive = true;
CWCButtonInit_3.SetState( CWCBUTTONSTATE_SELECTED );
if (CWCButtonInit_3.onClick != null)
{
    CWCButtonInit_3.onClick( CWCButtonInit_3, CWCButtonInit_3.xValues );
}
if (CWCButtonInit_3.oGroup != null)
{
    CWCButtonInit_3.oGroup.ActivateButton( CWCButtonInit_3 );
}
}
function CWC2OnMouseMoveFunction(e)
{

MapWgetMouse(e);

 if ((window.MapWinsideMap && MapWinsideMap()) || (window.KeyMapWinsideKeyMap && KeyMapWinsideKeyMap())) return false; else return true;
}
</SCRIPT>

    <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
    <title>Portail Géomatique: Accueil</title>
    <script language="JavaScript" src="firebug/firebug.js" type="text/javascript"></script>
<script language="javascript">

function mapSizeSmall()
{
    var mapsize = getMapSize();
    gszMapSize = 'small';
    if (mapsize[0] != 400)
    {
      document.forms[0].NAV_CMD.value = '';
      applyMapSize( 400, 300 );
    }
}

function mapSizeMedium()
{
    var mapsize = getMapSize();
    gszMapSize = 'medium';
    if (mapsize[0] != 500)
    {
      document.forms[0].NAV_CMD.value = '';
      applyMapSize( 500, 375 );
    }
}

function mapSizeLarge()
{
    var mapsize = getMapSize();
    gszMapSize = 'large';
    if (mapsize[0] != 600)
    {
      document.forms[0].NAV_CMD.value = '';
      applyMapSize( 600, 450 );
    }
}

function CWCMyOnLoad()
{
    CWC2OnLoadFunction();
}
</script>



<!-- defaults for Text Buttons -->


</head>
<body onload="CWCMyOnLoad()">


<form name="chameleon">
 <INPUT TYPE=HIDDEN NAME=WMS_LAYERS_TOADD VALUE="">
 <INPUT TYPE=HIDDEN NAME=NAV_INPUT_TYPE VALUE="">
 <INPUT TYPE=HIDDEN NAME=NAV_INPUT_COORDINATES VALUE="">

<input type="hidden" name="NAV_INPUT_SUBMIT" value="">
 <INPUT TYPE=HIDDEN NAME=MAP_EXTENTS_MINX VALUE="-82.0077951002">

 <INPUT TYPE=HIDDEN NAME=MAP_EXTENTS_MINY VALUE="43">

 <INPUT TYPE=HIDDEN NAME=MAP_EXTENTS_MAXX VALUE="-53.9922048998">

 <INPUT TYPE=HIDDEN NAME=MAP_EXTENTS_MAXY VALUE="64">

<INPUT TYPE=HIDDEN NAME=MAP_WIDTH VALUE="600">

<INPUT TYPE=HIDDEN NAME=MAP_HEIGHT VALUE="450">

 <INPUT TYPE=HIDDEN NAME=MAP_CURSOR_POS_X VALUE="">

 <INPUT TYPE=HIDDEN NAME=MAP_CURSOR_POS_Y VALUE="">

 <INPUT TYPE=HIDDEN NAME=NAV_CMD VALUE="">

 <INPUT TYPE=HIDDEN NAME=NAV_SUBMIT VALUE="1">

 <INPUT TYPE=HIDDEN NAME=MAP_ORIGINAL_EXTENTS VALUE="-82.0077951002,43,-53.9922048998,64">

 <INPUT TYPE=HIDDEN NAME=MAP_ORIGINAL_PROJ VALUE="+init=epsg:4326">

 <INPUT TYPE=HIDDEN NAME=CURSOR_TYPE VALUE="">

 <INPUT TYPE=HIDDEN NAME=LAYERORDER_MOVE11 VALUE="">
 <INPUT TYPE=HIDDEN NAME=LAYER_ORDER VALUE="Ombrage,MNE,provinces_etats,PROVINCE_QC,BDGA_HYDRO_S_POLY,hydro_l_arc,energ_l_arc,trans_l_arc,route_l_arc,habit_p_point,Québec_-_Base_de_données_topographiques_du_Québec-HYDROGRAPHIE,Québec_-_Base_de_données_topographiques_du_Québec-VEGETATION">
 <INPUT TYPE=HIDDEN NAME=LAYER_ORDER_PREVIOUS VALUE="Ombrage,MNE,provinces_etats,PROVINCE_QC,BDGA_HYDRO_S_POLY,hydro_l_arc,energ_l_arc,trans_l_arc,route_l_arc,habit_p_point,Québec_-_Base_de_données_topographiques_du_Québec-HYDROGRAPHIE,Québec_-_Base_de_données_topographiques_du_Québec-VEGETATION">
 <INPUT TYPE=HIDDEN NAME=LAYERORDER_MOVE12 VALUE="">
 <INPUT TYPE=HIDDEN NAME=REMOVE_LAYER13 VALUE="">
<INPUT TYPE='HIDDEN' NAME='NAV_ALLOW_RECTANGLE' VALUE='true'>
 <INPUT TYPE=HIDDEN NAME=sid VALUE="47b071dc1a852">
 <INPUT TYPE="HIDDEN" NAME="SELECTED_LAYERS" VALUE="Ombrage">

<INPUT TYPE=HIDDEN NAME=BUTTON_TOOLSET_mapsizes VALUE="cwcimage_8">
<INPUT TYPE=HIDDEN NAME=SET_MAP_WIDTH VALUE="">

<INPUT TYPE=HIDDEN NAME=SET_MAP_HEIGHT VALUE="">

 <INPUT TYPE=HIDDEN NAME=UPDATE_MAP VALUE="0">
 <INPUT TYPE=HIDDEN NAME=LEGENDTEMPLATE_RESET VALUE="">

 <INPUT TYPE="HIDDEN" NAME="LEGENDTEMPLATE_LAYERS" VALUE="Ombrage~~MNE~~provinces_etats~~PROVINCE_QC~~BDGA_HYDRO_S_POLY~~hydro_l_arc~~energ_l_arc~~trans_l_arc~~route_l_arc~~habit_p_point~~Québec_-_Base_de_données_topographiques_du_Québec-HYDROGRAPHIE~~Québec_-_Base_de_données_topographiques_du_Québec-VEGETATION">

<INPUT TYPE=HIDDEN NAME=BUTTON_TOOLSET_Navigation VALUE="">
 <INPUT TYPE="HIDDEN" NAME="LANGUAGE" VALUE="fr-CA">

<table style="margin: 0px;position: relative;">
<tr><td style="text-align: left;">
<div id="NavToolsLayer" name="NavToolsLayer">
  <table border="0" cellspacing="4" cellpadding="0">
    <tr>
      <!-- ZOOMIN -->
      <td><IMG NAME="cwcimage_3" ID="cwcimage_3" SRC="http://localhost/chameleon//skins/default/buttons/button_zoomin_3.png" ALT="Zoom avant" TITLE="Zoom avant" BORDER="0" WIDTH="24" HEIGHT="24"></td>

      <!-- ADD WMS LAYER -->
      <td><IMG NAME="cwcimage_4" ID="cwcimage_4" SRC="http://localhost/chameleon//skins/default/buttons/button_add_1.png" ALT="Ajout d'une couche WMS" TITLE="Ajout d'une couche WMS" BORDER="0" WIDTH="24" HEIGHT="24"></td>
 

    </tr>
  </table>
</div>
</td>
</tr>
<tr><td style="vertical-align: top;">
<div id="ImageLayer" name="ImageLayer">
<table cellpadding="0" cellspacing="0" border="0">
<tr>
    <td bgcolor="#000000"><img src="http://localhost/chameleon//skins/default/images/a_pixel.gif" galleryimg="no" width="1" height="1" id="mapFrameTL" name="mapFrameTL"></td>
    <td bgcolor="#000000"><img src="http://localhost/chameleon//skins/default/images/a_pixel.gif" galleryimg="no" width="1" height="1"></td>
    <td bgcolor="#000000"><img src="http://localhost/chameleon//skins/default/images/a_pixel.gif" galleryimg="no" width="1" height="1" id="mapFrameTR" name="mapFrameTR"></td>
  </tr>
  <tr>
    <td bgcolor="#000000"><img src="http://localhost/chameleon//skins/default/images/a_pixel.gif" galleryimg="no" width="1" height="1"></td>
    <td><a name="mapanchor" ><IMG SRC="http://localhost/chameleon//skins/default/images/a_pixel.gif" galleryimg="no" WIDTH="600" HEIGHT="450" NAME="mapimage" id="mapimage" border="0"></a></td>
    <td bgcolor="#000000"><img src="http://localhost/chameleon//skins/default/images/a_pixel.gif" galleryimg="no" width="1" height="1"></td>
  </tr>
  <tr>
    <td bgcolor="#000000"><img src="http://localhost/chameleon//skins/default/images/a_pixel.gif" galleryimg="no" width="1" height="1" id="mapFrameBL" name="mapFrameBL"></td>
    <td bgcolor="#000000"><img src="http://localhost/chameleon//skins/default/images/a_pixel.gif" galleryimg="no" width="1" height="1"></td>
    <td bgcolor="#000000"><img src="http://localhost/chameleon//skins/default/images/a_pixel.gif" galleryimg="no" width="1" height="1" id="mapFrameBR" name="mapFrameBR"></td>
  </tr>
</table>
</div></td><td style="vertical-align: top; text-align:left;">
        <table border="0" cellpadding="0" cellspacing="3">
            <tr>
              <td valign="bottom"><IMG NAME="cwcimage_6" ID="cwcimage_6" SRC="http://localhost/msp//images/icon_mapsize_small_normal.png" ALT="Petite carte" TITLE="Petite carte" BORDER="0" WIDTH="10" HEIGHT="10"></td>
              <td valign="bottom"><IMG NAME="cwcimage_7" ID="cwcimage_7" SRC="http://localhost/msp//images/icon_mapsize_medium_normal.png" ALT="Moyenne carte" TITLE="Moyenne carte" BORDER="0" WIDTH="15" HEIGHT="15"></td>
              <td valign="bottom"><IMG NAME="cwcimage_8" ID="cwcimage_8" SRC="http://localhost/msp//images/icon_mapsize_large_active.png" ALT="Grande carte" TITLE="Grande carte" BORDER="0" WIDTH="20" HEIGHT="20"></td>
            </tr>
        </table>

      <!-- MapSize widget hidden -->
</td></tr><tr>
<td style="vertical-align: top;">
<table>

  <tr>
 <td><IMG NAME="cwcimage_10" ID="cwcimage_10" SRC="http://localhost/chameleon//skins/default/buttons/button_update_1.png" ALT="Mise &agrave; jour de la carte" TITLE="Mise &agrave; jour de la carte" BORDER="0" WIDTH="24" HEIGHT="24"></td>
    <td><IMG NAME="cwcimage_11" ID="cwcimage_11" SRC="http://localhost/chameleon//skins/default/buttons/button_promote_1.png" ALT="Promouvoir la couche s&eacute;lectionn&eacute;e" TITLE="Promouvoir la couche s&eacute;lectionn&eacute;e" BORDER="0" WIDTH="24" HEIGHT="24"></td>
    <td><IMG NAME="cwcimage_12" ID="cwcimage_12" SRC="http://localhost/chameleon//skins/default/buttons/button_demote_1.png" ALT="R&eacute;trograder la couche s&eacute;lectionn&eacute;e" TITLE="R&eacute;trograder la couche s&eacute;lectionn&eacute;e" BORDER="0" WIDTH="24" HEIGHT="24"></td>
    <td colspan="2"><IMG NAME="cwcimage_13" ID="cwcimage_13" SRC="http://localhost/chameleon//skins/default/buttons/button_delete_1.png" ALT="Effacer la couche s&eacute;lectionn&eacute;e" TITLE="Effacer la couche s&eacute;lectionn&eacute;e" BORDER="0" WIDTH="24" HEIGHT="24"></td>

  </tr>
  
  <tr bgcolor="#ffffff" id="LAYERORDER_Québec_-_Base_de_données_topographiques_du_Québec-VEGETATION">
    <td><input type="radio" name="my_legend" onclick="CWCSelectLayer('Québec_-_Base_de_données_topographiques_du_Québec-VEGETATION', true)" ></td>
    <td align="center" width=20><input type="checkbox" name="legendlayername[]" 
value="Québec_-_Base_de_données_topographiques_du_Québec-VEGETATION"
    CHECKED
    ></td>
    <td><img src="/ms_tmp/1202745835_11_0_20_18_.png" width="20" height="20"></td>
    
    
    <td><a href="#" onclick="javascript:LegendTemplateLayerInfo('Québec_-_Base_de_données_topographiques_du_Québec-VEGETATION');"><span class="label">Végétation</span></a></td>
  </tr>
    

  <tr bgcolor="#ffffff" id="LAYERORDER_Québec_-_Base_de_données_topographiques_du_Québec-HYDROGRAPHIE">
    <td><input type="radio" name="my_legend" onclick="CWCSelectLayer('Québec_-_Base_de_données_topographiques_du_Québec-HYDROGRAPHIE', true)" ></td>
    <td align="center" width=20><input type="checkbox" name="legendlayername[]" 
value="Québec_-_Base_de_données_topographiques_du_Québec-HYDROGRAPHIE"
    CHECKED
    ></td>
    <td><img src="/ms_tmp/1202745835_10_0_20_18_.png" width="20" height="20"></td>
    
    
    <td><a href="#" onclick="javascript:LegendTemplateLayerInfo('Québec_-_Base_de_données_topographiques_du_Québec-HYDROGRAPHIE');"><span class="label">Hydrographie</span></a></td>
  </tr>
    

  <tr bgcolor="#ffffff" id="LAYERORDER_habit_p_point">
    <td><input type="radio" name="my_legend" onclick="CWCSelectLayer('habit_p_point', true)" ></td>
    <td align="center" width=20><input type="checkbox" name="legendlayername[]" 
value="habit_p_point"
    CHECKED
    ></td>
    <td><img src="/ms_tmp/1202745835_9_0_20_18_s0_ff0000_ffffffff_0_6_68616269740000000000000000000000_360.png" width="20" height="20"></td>
    
    
    <td><a href="#" onclick="javascript:LegendTemplateLayerInfo('habit_p_point');"><span class="label">Villes</span></a></td>
  </tr>
    

  <tr bgcolor="#ffffff" id="LAYERORDER_route_l_arc">
    <td><input type="radio" name="my_legend" onclick="CWCSelectLayer('route_l_arc', true)" ></td>
    <td align="center" width=20><input type="checkbox" name="legendlayername[]" 
value="route_l_arc"
    CHECKED
    ></td>
    <td><img src="/ms_tmp/1202745835_8_0_20_18_s0_ff0000_ffffffff_ffffffff_1_6c696e655f736f6c6964000000000000_360.png" width="20" height="20"></td>
    
    
    <td><a href="#" onclick="javascript:LegendTemplateLayerInfo('route_l_arc');"><span class="label">Routes</span></a></td>
  </tr>
    

  <tr bgcolor="#ffffff" id="LAYERORDER_trans_l_arc">
    <td><input type="radio" name="my_legend" onclick="CWCSelectLayer('trans_l_arc', true)" ></td>
    <td align="center" width=20><input type="checkbox" name="legendlayername[]" 
value="trans_l_arc"
    
    ></td>
    <td><img src="/ms_tmp/1202745835_7_0_20_18_s0_4da8_ffffffff_ffffffff_4_74697265746531000000000000000000_360.png" width="20" height="20"></td>
    
    
    <td><a href="#" onclick="javascript:LegendTemplateLayerInfo('trans_l_arc');"><span class="label">Traversier, Voie ferrée</span></a></td>
  </tr>
    

  <tr bgcolor="#ffffff" id="LAYERORDER_energ_l_arc">
    <td><input type="radio" name="my_legend" onclick="CWCSelectLayer('energ_l_arc', true)" ></td>
    <td align="center" width=20><input type="checkbox" name="legendlayername[]" 
value="energ_l_arc"
    
    ></td>
    <td><img src="/ms_tmp/1202745835_6_0_20_18_s0_828282_ffffffff_ffffffff_0__360.png" width="20" height="20"></td>
    
    
    <td><a href="#" onclick="javascript:LegendTemplateLayerInfo('energ_l_arc');"><span class="label">Ligne de transport d'énergie</span></a></td>
  </tr>
    

  <tr bgcolor="#ffffff" id="LAYERORDER_hydro_l_arc">
    <td><input type="radio" name="my_legend" onclick="CWCSelectLayer('hydro_l_arc', true)" ></td>
    <td align="center" width=20><input type="checkbox" name="legendlayername[]" 
value="hydro_l_arc"
    CHECKED
    ></td>
    <td><img src="/ms_tmp/1202745835_5_0_20_18_s0_a9e6_ffffffff_ffffffff_0__360.png" width="20" height="20"></td>
    
    
    <td><a href="#" onclick="javascript:LegendTemplateLayerInfo('hydro_l_arc');"><span class="label">Rivières</span></a></td>
  </tr>
    

  <tr bgcolor="#ffffff" id="LAYERORDER_BDGA_HYDRO_S_POLY">
    <td><input type="radio" name="my_legend" onclick="CWCSelectLayer('BDGA_HYDRO_S_POLY', true)" ></td>
    <td align="center" width=20><input type="checkbox" name="legendlayername[]" 
value="BDGA_HYDRO_S_POLY"
    CHECKED
    ></td>
    <td><img src="/ms_tmp/1202745835_4_0_20_18_s0_bee8ff_ffffffff_ffffffff_0__360.png" width="20" height="20"></td>
    
    
    <td><a href="#" onclick="javascript:LegendTemplateLayerInfo('BDGA_HYDRO_S_POLY');"><span class="label">Fleuve, Lac</span></a></td>
  </tr>
    

  <tr bgcolor="#ffffff" id="LAYERORDER_PROVINCE_QC">
    <td><input type="radio" name="my_legend" onclick="CWCSelectLayer('PROVINCE_QC', true)" ></td>
    <td align="center" width=20><input type="checkbox" name="legendlayername[]" 
value="PROVINCE_QC"
    CHECKED
    ></td>
    <td><img src="/ms_tmp/1202745835_3_0_20_18_s0_ffffffff_ffffffff_900000_0__360.png" width="20" height="20"></td>
    
    
    <td><a href="#" onclick="javascript:LegendTemplateLayerInfo('PROVINCE_QC');"><span class="label">Région administrative</span></a></td>
  </tr>
    

  <tr bgcolor="#ffffff" id="LAYERORDER_provinces_etats">
    <td><input type="radio" name="my_legend" onclick="CWCSelectLayer('provinces_etats', true)" ></td>
    <td align="center" width=20><input type="checkbox" name="legendlayername[]" 
value="provinces_etats"
    CHECKED
    ></td>
    <td><img src="/ms_tmp/1202745835_2_0_20_18_s0_ffffffff_ffffffff_b9d3ee_0__360.png" width="20" height="20"></td>
    
    
    <td><a href="#" onclick="javascript:LegendTemplateLayerInfo('provinces_etats');"><span class="label">Provinces et États</span></a></td>
  </tr>
    

  <tr bgcolor="#ffffff" id="LAYERORDER_MNE">
    <td><input type="radio" name="my_legend" onclick="CWCSelectLayer('MNE', true)" ></td>
    <td align="center" width=20><input type="checkbox" name="legendlayername[]" 
value="MNE"
    CHECKED
    ></td>
    <td><img src="/ms_tmp/1202745835_1_0_20_18_.png" width="20" height="20"></td>
    
    
    <td><a href="#" onclick="javascript:LegendTemplateLayerInfo('MNE');"><span class="label">Altitude</span></a></td>
  </tr>
    

  <tr bgcolor="#ffffff" id="LAYERORDER_Ombrage">
    <td><input type="radio" name="my_legend" onclick="CWCSelectLayer('Ombrage', true)" CHECKED ></td>
    <td align="center" width=20><input type="checkbox" name="legendlayername[]" 
value="Ombrage"
    CHECKED
    ></td>
    <td><img src="/ms_tmp/1202745835_0_0_20_18_.png" width="20" height="20"></td>
    
    
    <td><a href="#" onclick="javascript:LegendTemplateLayerInfo('Ombrage');"><span class="label">3D</span></a></td>
  </tr>
    

  <tr>

  </tr>
    <tr>
    <td colspan="4">
        <table cellpadding="0" cellspacing="0" border="0">
<tr>
    <td bgcolor="000000"><img src="http://localhost/chameleon//skins/default/images/a_pixel.gif" width="1" height="1" id="keymapFrameTL" name="keymapFrameTL"></td>
    <td bgcolor="000000"><img src="http://localhost/chameleon//skins/default/images/a_pixel.gif" width="1" height="1"></td>
    <td bgcolor="000000"><img src="http://localhost/chameleon//skins/default/images/a_pixel.gif" width="1" height="1" id="keymapFrameTR" name="keymapFrameTR"></td>
  </tr>
  <tr>
    <td bgcolor="000000"><img src="http://localhost/chameleon//skins/default/images/a_pixel.gif" width="1" height="1"></td>
    <td><a name="mapanchor"  HREF="javascript:KeyMapClicked()"><IMG SRC="/chameleon//common//wrapper/drawmap.php?map_session_mode=1&REQUEST=KEYMAP&sid=47b071dc1a852" WIDTH=120 HEIGHT=90 NAME="KeyMapImage"  border="0" onmouseover="KeyMapCaptureMouse()" onmouseout="KeyMapReleaseMouse()"></a></td>
    <td bgcolor="000000"><img src="http://localhost/chameleon//skins/default/images/a_pixel.gif" width="1" height="1"></td>
  </tr>
  <tr>
    <td bgcolor="000000"><img src="http://localhost/chameleon//skins/default/images/a_pixel.gif" width="1" height="1" id="keymapFrameBL" name="keymapFrameBL"></td>
    <td bgcolor="000000"><img src="http://localhost/chameleon//skins/default/images/a_pixel.gif" width="1" height="1"></td>
    <td bgcolor="000000"><img src="http://localhost/chameleon//skins/default/images/a_pixel.gif" width="1" height="1" id="keymapFrameBR" name="keymapFrameBR"></td>
  </tr>
</table>
    </td>
  </tr>
</table>
</td></tr>

</table>
</form>

</body>

<script LANGUAGE="JavaScript" type="text/javascript">

oButton =  new CWCButton("cwcimage_4", 0, "null", clickWMSBrowser, null, "http://localhost/chameleon//skins/default/buttons/button_add_1.png", "http://localhost/chameleon//skins/default/buttons/button_add_3.png", "http://localhost/chameleon//skins/default/buttons/button_add_2.png", null);
oButton.oForm = document.forms[0];
oButton.szDivName = ""
;goCWCButtonManager.AddButton( oButton );

var gMapDHTMLForm = document.forms[0];

MapWidgetInitVariables();

oButton =  new CWCButton("cwcimage_11", 0, "null", clickLayerOrder, "UP", "http://localhost/chameleon//skins/default/buttons/button_promote_1.png", "http://localhost/chameleon//skins/default/buttons/button_promote_2.png", "http://localhost/chameleon//skins/default/buttons/button_promote_3.png", null);
oButton.oForm = document.forms[0];
oButton.szDivName = ""
;goCWCButtonManager.AddButton( oButton );

oButton =  new CWCButton("cwcimage_12", 0, "null", clickLayerOrder, "DOWN", "http://localhost/chameleon//skins/default/buttons/button_demote_1.png", "http://localhost/chameleon//skins/default/buttons/button_demote_2.png", "http://localhost/chameleon//skins/default/buttons/button_demote_3.png", null);
oButton.oForm = document.forms[0];
oButton.szDivName = ""
;goCWCButtonManager.AddButton( oButton );

oButton =  new CWCButton("cwcimage_13", 2, "legende", clickRemoveLayer, null, "http://localhost/chameleon//skins/default/buttons/button_delete_1.png", "http://localhost/chameleon//skins/default/buttons/button_delete_2.png", "http://localhost/chameleon//skins/default/buttons/button_delete_3.png", null);
oButton.oForm = document.forms[0];
oButton.szDivName = ""
;goCWCButtonManager.AddButton( oButton );

goEventManager.registerEventID( 'NAV_TOOL_CHANGED' );

goEventManager.registerEventID( 'LAYER_SELECTION_CHANGED' );

oButton =  new CWCButton("cwcimage_6", 2, "mapsizes", mapSizeSmall, null, "http://localhost/msp//images/icon_mapsize_small_normal.png", null, "http://localhost/msp//images/icon_mapsize_small_active.png", null);
oButton.oForm = document.forms[0];
oButton.szDivName = ""
;goCWCButtonManager.AddButton( oButton );

oButton =  new CWCButton("cwcimage_7", 2, "mapsizes", mapSizeMedium, null, "http://localhost/msp//images/icon_mapsize_medium_normal.png", null, "http://localhost/msp//images/icon_mapsize_medium_active.png", null);
oButton.oForm = document.forms[0];
oButton.szDivName = ""
;goCWCButtonManager.AddButton( oButton );

oButton =  new CWCButton("cwcimage_8", 2, "mapsizes", mapSizeLarge, null, "http://localhost/msp//images/icon_mapsize_large_normal.png", null, "http://localhost/msp//images/icon_mapsize_large_active.png", null);
oButton.oForm = document.forms[0];
oButton.szDivName = ""
;goCWCButtonManager.AddButton( oButton );

oButton =  new CWCButton("cwcimage_10", 0, "null", clickUpdateMap, null, "http://localhost/chameleon//skins/default/buttons/button_update_1.png", "http://localhost/chameleon//skins/default/buttons/button_update_2.png", "http://localhost/chameleon//skins/default/buttons/button_update_3.png", null);
oButton.oForm = document.forms[0];
oButton.szDivName = ""
;goCWCButtonManager.AddButton( oButton );

oButton =  new CWCButton("cwcimage_3", 2, "Navigation", NavSetActiveTool, new Array("3","ZOOM_IN","1","0","AUTO","1"), "http://localhost/chameleon//skins/default/buttons/button_zoomin_1.png", "http://localhost/chameleon//skins/default/buttons/button_zoomin_2.png", "http://localhost/chameleon//skins/default/buttons/button_zoomin_3.png", null);
oButton.oForm = document.forms[0];
oButton.szDivName = ""
;goCWCButtonManager.AddButton( oButton );

</script>
</HTML>