// JavaScript Document function screenPage(){ if (document.body.parentNode.scrollHeight <= document.body.offsetHeight){ document.getElementById('page_screen').style.height = '100%'; } else { document.getElementById('page_screen').style.height = document.body.parentNode.scrollHeight + "px"; //MAXIMUM PAGE SCREEN - FOR LONG PAGES WITH SCROLL } //document.getElementById('page_screen').style.visibility = 'visible'; document.getElementById('page_screen').style.display = 'block'; //Effect.Grow('page_screen'); //return true; } function displayDialogBox(boxVer, contentData, title, height, closeButton){ screenPage(); var dialogBox = document.getElementById('dialogWindow'); if (boxVer == 1){ dialogBox.className = "dlgBox402"; width = 402; } else { dialogBox.className = "dlgBox804"; width = 804; } mainBoxHTML = "
"+ "
"; if (closeButton == 1){ mainBoxHTML += "Close"; } mainBoxHTML += "

" + title + "

"+ contentData + "
"+ "
"; //"\n"; dialogBox.innerHTML = mainBoxHTML; dialogBox.style.display = 'block'; yc = Math.round((document.body.clientHeight/2)-(dialogBox.clientHeight/2)); xc = Math.round((document.body.clientWidth/2)-(width/2)); dialogBox.style.left = xc + "px"; dialogBox.style.top = yc + "px"; //document.getElementById('dialogWindow').style.visibility = 'visible'; //Effect.Grow('dialogWindow'); } function displayWarningBox(contentData, title, height, closeButton){ screenPage(); var dialogBox = document.getElementById('dialogWindow'); dialogBox.className = "dlgBoxWarning"; width = 402; mainBoxHTML = "
"+ "
"; if (closeButton == 1){ mainBoxHTML += " Close"; } mainBoxHTML += "

" + title + "

"+ contentData + "
"+ "
"; //"\n"; dialogBox.innerHTML = mainBoxHTML; dialogBox.style.display = 'block'; yc = Math.round((document.body.clientHeight/2)-(dialogBox.clientHeight/2)); xc = Math.round((document.body.clientWidth/2)-(width/2)); dialogBox.style.left = xc + "px"; dialogBox.style.top = yc + "px"; } function displayErrorBox(contentData, title, height){ screenPage(); var dialogBox = document.getElementById('dialogWindow'); dialogBox.className = "dlgBoxError"; width = 402; mainBoxHTML = "
"+ "
"+ "

" + title + "

"+ contentData + "
"+ "
"; //"\n"; dialogBox.innerHTML = mainBoxHTML; dialogBox.style.display = 'block'; yc = Math.round((document.body.clientHeight/2)-(dialogBox.clientHeight/2)); xc = Math.round((document.body.clientWidth/2)-(width/2)); dialogBox.style.left = xc + "px"; dialogBox.style.top = yc + "px"; } function displayStatusBox(contentData, title, height){ screenPage(); var dialogBox = document.getElementById('dialogWindow'); dialogBox.className = "dlgBox402"; width = 402; mainBoxHTML = "
"+ "
"+ "

" + title + "

"+ "

"+ contentData + "
"+ "
"; //"\n"; dialogBox.innerHTML = mainBoxHTML; dialogBox.style.display = 'block'; yc = Math.round((document.body.clientHeight/2)-(dialogBox.clientHeight/2)); xc = Math.round((document.body.clientWidth/2)-(width/2)); dialogBox.style.left = xc + "px"; dialogBox.style.top = yc + "px"; } function closeDialogWindow(divBox){ document.getElementById('page_screen').style.display = 'none'; document.getElementById(divBox).style.display = 'none'; } function showLogin(){ data = "

Please enter your username and password to login.

"; //data += "

Username:" + txtUsername + "

"; //data += "

Password:" + txtPassword + "

"; data += "

Username:

"; data += "

Password:

"; data += "

"; //data += "

"; displayDialogBox(1, data, "Login", 300, 0); //txtPassword.refresh(); //txtUsername.refresh(); btnLogin.refresh(); btnAddUser_Cancel.refresh(); document.getElementById('txtUsername1').focus(); //txtPassword.setControlText(""); } function checkLoginKey(e){ var keynum if (window.event){ keynum = e.keyCode; } else { keynum = e.which; } if (keynum == 13){ btnLogin.onControlClicked(); } }