﻿
function IsNumeric(sText) {
    var ValidChars = "0123456789";
    var IsNumber = true;
    var Char;


    for (i = 0; i < sText.length && IsNumber == true; i++) {
        Char = sText.charAt(i);
        if (ValidChars.indexOf(Char) == -1) {
            IsNumber = false;
        }
    }
    return IsNumber;

}


function popupWindow(strUrl, strWidth, strHeight) {
    //'scrollbars=0, status=1, width=240, height=320, resizable=0'
    window.open(strUrl, "", "width=" + strWidth + ",height=" + strHeight + ",scrollbars=1,status=1,resizable=0,location=no,menubar=no,directories=no")
    return true;
}


function popupPrint(strUrl) {
    var myPopupPrintText
    myPopupPrintText = document.getElementById('popupTransferText').innerHTML;
    window.open(strUrl,"", "width=640,height=480,scrollbars=yes,status=no,toolbar=no,resizable=no,location=no,menubar=no,directories=no")
}


function popupFileupload(strUrl) {
    var myFilename
    myFilename = document.getElementById('ctl00_pageDebug_popupFileuploadFilename').innerHTML;
    windowHeight = 220;
    windowWidth = 360;
    myleft=(screen.width)?(screen.width-windowWidth)/2:100;
    mytop=(screen.height)?(screen.height-windowHeight)/2:100;
    strUrl = strUrl + '?filename=' + myFilename 
    window.open(strUrl, "", "width="+ windowWidth +",height="+windowHeight+",top="+mytop+",left="+myleft+",scrollbars='no',status=no,toolbar=no,resizable='no',location=no,menubar=no,directories=no")
}

function CopyToClipboard(data) {
    window.clipboardData.setData('Text', data);
}


function showLayer(Id) {
    if (document.all) {
        document.all[Id].style.visibility = "visible";
        document.all[Id].style.display = "block";
    } else if (document.layers) {
        document.layers[Id].visibility = "show";
        document.layers[Id].display = "block";
    } else if (document.getElementById) {
        document.getElementById(Id).style.display = "block";
        document.getElementById(Id).style.visibility = "visible";

    }
}
function hideLayer(Id) {
    if (document.all) {
        document.all[Id].style.visibility = "hidden";
        document.all[Id].style.display = "none";
    } else if (document.layers) {
        document.layers[Id].visibility = "hide";
        document.layers[Id].display = "none";
    } else if (document.getElementById) {
        document.getElementById(Id).style.visibility = "hidden";
        document.getElementById(Id).style.visibility = "none";
    }
}






