﻿// JScript File

function checkComboSelection(sender, args){
    if(args.Value == "0")
    {
        args.IsValid = false;
    }
    else
    {
        args.IsValid = true;
    }
    return;
}


function fixMenuSize() {
    var myWidth = 0, myHeight = 0;
    if (typeof (window.innerWidth) == 'number') {
        //Non-IE
        myWidth = window.innerWidth;
        myHeight = window.innerHeight;
    } else if (document.documentElement && (document.documentElement.clientWidth || document.documentElement.clientHeight)) {
        //IE 6+ in 'standards compliant mode'
        myWidth = document.documentElement.clientWidth;
        myHeight = document.documentElement.clientHeight;
    } else if (document.body && (document.body.clientWidth || document.body.clientHeight)) {
        //IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
    }
    var adiv;
    adiv = document.getElementById("left");

    if ((myHeight - 139 - 22)>0)
      adiv.style.height = myHeight - 139 - 22;
    else
      adiv.style.height = 0;
    //adiv.style.top = 139;

}


function Measure() {
    if (document.getElementById("content").clientHeight > window.clientHeight) {
        document.body.style.paddingRight = "0px";
    } else {
    document.body.style.paddingRight = "15px";
    document.getElementById("head").paddingRight = "15px";
    }
}


function DatePicker(ctl) {
    var PopupWindow = null;
    PopupWindow = window.open('DatePicker.aspx?ctl=' + ctl, '', 'width=250,height=250');
    PopupWindow.focus();
}


function PageIsValid() {
  var result = true;
  if (typeof (Page_ClientValidate) == 'function') {
    result = Page_ClientValidate();
    }
  return result;
}
