﻿function displayCSWPPopUp(CSWPID,zindex) {
    //dimOn();
    var elID = 'divCSWPPopUP' + CSWPID;
    document.getElementById(elID).style.zIndex = "" + zindex;
    document.getElementById(elID).style.display = 'block';
    //window.scrollTo(10, 10);
}

function hideCSWPPopUp(CSWPID, updateOption, CSWPOptionID) {
    var elID = 'divCSWPPopUP' + CSWPID;
    document.getElementById(elID).style.display = 'none';
    dimOff();
    if (updateOption == 1) {
        updateCSWPDefaultOption(CSWPID);
        //select default option
    }
    else { updateCSWPOption(CSWPID, CSWPOptionID); }
    //updateDefaultOption(CSWPID);

}

function hideCSWPMsgPopUp(CSWPID) {
    var elID = 'divCSWPPopUP' + CSWPID;
    document.getElementById(elID).style.display = 'none';
    dimOff();
    }
function selectCSWPOption(CSWPID, CSWPOptionID) {
    var elID = 'divCSWPPopUP' + CSWPID;
    document.getElementById(elID).style.display = 'none';
   // dimOff();
   updateCSWPOption(CSWPID, CSWPOptionID);

}
/*
function dimOff() {

    document.getElementById("darkLayer").style.display = "none";
}
function dimOn() {
    document.getElementById("darkLayer").style.width = pageWidth();
    document.getElementById("darkLayer").style.height = pageHeight();
    document.getElementById("darkLayer").style.display = "block";
}
function pageWidth() { return window.innerWidth != null ? window.innerWidth : document.body != null ? document.body.clientWidth : null; }
function pageHeight() { return window.innerHeight != null ? window.innerHeight : document.body != null ? document.body.clientHeight : null; } 
*/
