﻿///GLOBAL Variables to stop ppl performing actions on the page while it's submitting or loading.
var HAS_SUBMIT = 0;
var PROGRESS_WIN;
function showProgress() {
    var obj, objMain;
    obj = document.getElementById('progressBarGif');
    objMain = document.getElementById("MainContentDiv");
    if (obj) obj.style.visibility = 'visible';
    if (objMain) {
        objMain.style.visibility = 'hidden';
    }
    return 1;
}
function showProgressBarGif() {
    var obj, objMain;
    obj = document.getElementById("progressBarGif");
    objMain = document.getElementById("MainContentDiv");
    if (obj) {
        obj.style.visibility = 'visible';
        obj.style.left = '35%';
        obj.style.top = '35%';
        obj.style.width = '200px';
        obj.style.height = '50px';
    }
    if (objMain) {
        objMain.style.visibility = 'hidden';
    }
    return 0;
}
function hideProgressBarGif() {
    var obj, objMain;
    obj = document.getElementById('progressBarGif');
    objMain = document.getElementById("MainContentDiv");
    if (obj) {
        obj.style.visibility = 'hidden';
    }
    if (objMain) {
        objMain.style.visibility = 'visible';
    }
    return 0;
}
showProgressBarGif();
function pageload() {
    var manager = Sys.WebForms.PageRequestManager.getInstance();
    manager.add_beginRequest(OnBeginRequest);
    //manager.add_endRequest(OnEndRequest);
}
var currentPostBackElem1;
var currentPostBackElem2;
var currentPostBackElem3;
function OnBeginRequest(sender, args) {

    currentPostBackElem1 = document.getElementById('DIVReport');
    currentPostBackElem2 = document.getElementById('DIVTitle');
    currentPostBackElem3 = document.getElementById('DIVIns');
    currentPostBackElem4 = document.getElementById('ctl00_cph1_CheckBoxListLocation');
    currentPostBackElem1.style.display = 'none';
    currentPostBackElem2.style.display = 'none';
    if (currentPostBackElem3 != null)
        currentPostBackElem3.style.display = 'none';
    if(currentPostBackElem4!=null)
    currentPostBackElem4.disabled = 'true';
}

