﻿// JScript File
function CheckImgSize(rmp) {
    try
    {
        if (innerSizeWidth() > 780)
        {
            document.getElementById(rmp).width = "300";
            document.getElementById(rmp).height = "300";
            document.getElementById('Test01').className="txt01";
        }
        else
        {
            document.getElementById(rmp).width = "180";
            document.getElementById(rmp).height = "180";
            document.getElementById('Test01').className="txt02";
        }
    }
    catch (err) {}
}
function CheckImgReSize(lmp,rmp) {
    CheckImgSize(lmp);
    CheckImgSize(rmp);
}
function innerSizeWidth() {
  var myWidth = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myWidth = window.innerWidth;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myWidth = document.documentElement.clientWidth;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myWidth = document.body.clientWidth;
  }
  return myWidth;
}
function innerSizeHeight() {
  var myHeight = 0;
  if( typeof( window.innerWidth ) == 'number' ) {
    //Non-IE
    myHeight = window.innerHeight;
  } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
    //IE 6+ in 'standards compliant mode'
    myHeight = document.documentElement.clientHeight;
  } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
    //IE 4 compatible
    myHeight = document.body.clientHeight;
  }
  return myHeight;
}
function emergencyWindow() {
    window.open('emerge.aspx','Emergency','width=400,height=250,directories=no,status=no,location=no,toolbar=no,menubar=no');
    return true;
}
function Manage() {
    var elem1 = document.getElementById('passwordTextbox');
    var elem2 = document.getElementById('userNameTextBox');
    if (elem2.value=='Admin') {
        if (elem1.value=='robocop') {
            window.open('ChangeUp.aspx','ManageStaff','width=800,height=600,scrollbars=yes,resizable=yes,directories=no,status=no,location=no,toolbar=no,menubar=no');
        }
    }
}
function showLogin() {
    var elem = document.getElementById('loginDIV');
    if (elem.style.display == "none")
        elem.style.display = "block";
    else elem.style.display = "none";
}

