﻿/// <reference assembly="ESRI.ArcGIS.ADF.Web.UI.WebControls" name="ESRI.ArcGIS.ADF.Web.UI.WebControls.Runtime.JavaScript.references.js"/>

function checkScale(scale) {

    var p = $get('HunterToolBarPanel');
    var z = $get('ZoomInnPanelText');
    var r = $get('RegisterPanelText');
    
    if (scale < 100000) {
        p.style.display = "block";
        z.style.display = "none";
        r.style.display = "block";
    }
    else {
        p.style.display = "none";
        z.style.display = "block";
        r.style.display = "none";
    }
}

function hideRegisterPanel() {
    $get('AnimalRegistrationDiv').style.display = "none";
}

function showRegisterPanel() {
    $get('AnimalRegistrationDiv').style.display = "block";
}

function setPanTool() {
    var toolbar = Toolbars['Toolbar1'];
    var currentTool = $get(toolbar.currentToolField);
    currentTool.value = 'MapPan';
    toolbar.selectTool();
    toolbar.refreshGroup();

    var clientAction = toolbar.items['MapPan'].clientAction;
    var clientFunction = clientAction + "('Map1', 'MapPan', true, '')";
    eval(clientFunction);
}
