//WARNING: THIS IS A COMPRESSED FILE AND SHOULD NOT BE EDITED!!!
var gstrRedirectPath = '/default.asp'
function displayLogin(strCurrentPath) {
gstrRedirectPath = strCurrentPath;
setTimeout("displayLogonStatus(true);",300);
oInterval = setInterval("animateLogonStatus();",300);
setTimeout("processLogonRequest(true,false);",300);
}
function displayLogoff() {
setTimeout("displayLogonStatus(false);",300);
oInterval = setInterval("animateLogonStatus();",300);
setTimeout("processLogonRequest(false,false);",300);
}
function processLogonRequest(blnLogon,blnProcessData) {
loadMiscValidateJScriptFile();
var objRequest = new Ajax();
var strPath, strQueryString
var strQueryString = 'remote=Y'
if (blnProcessData) {
updateLogonStatus(false,'Processing',true);
if (blnLogon) {
if (!ValidateRemoteLogon()) return false;
}
if (blnLogon) {
strQueryString += '&hidSubmitted=Y&txtUserID='+escape(document.frmRemoteLogon.txtUserID.value)+'&txtPassword='+escape(document.frmRemoteLogon.txtPassword.value)
}
else {
strQueryString += '&hidSubmitted=Y'
}
}
if (blnLogon) {
strPath = '/tools/accountinfo/acctpswd.asp'
}
else {
strPath = '/tools/accountinfo/logoff.asp'
}
if (objRequest) {
objRequest.doPost(strPath,strQueryString,handleLogonResponse);
}
else {
clearInterval(oInterval);
location.href = strPath;
}
}
function handleLogonResponse(strResponse) {
var reLogoff = /logoff.asp/
if (oInterval) {
clearInterval(oInterval);
}
if (strResponse.substr(0,5) == 'error') {
updateLogonStatus(true,strResponse.substr(6),false);
}
else if (strResponse.substr(0,7) == 'success') {
if (strResponse.substr(8,5) == 'logon') {
updateLogonStatus(false,'Logging In',true);
}
else {
updateLogonStatus(false,'Logging Out',true);
deleteD1SessionCookies('D1PIPESID','/');
}
if (reLogoff.test(gstrRedirectPath)) gstrRedirectPath = '/default.asp';
location.href = gstrRedirectPath; //'/default.asp'
}
else {
buildLogonForm(strResponse);
}
}
function buildLogonForm(strResponse) {
if (document.getElementById("mainDiv")) {
document.getElementById("mainDiv").innerHTML = strResponse
}
setTimeout("setLogonFocus();",500);
}
function updateLogonStatus(blnError,strMsg,blnAnimate) {
strMsg = (strMsg.substr(strMsg.length - 1,1) == '.')?strMsg.substr(0,strMsg.length-1):strMsg;
document.getElementById("promptDiv").className = (blnError)?'errPrompt':'basePrompt';
document.getElementById("promptDiv").innerHTML = strMsg + '<span id="dotSpan">.</span>'
if (blnAnimate) {
oInterval = setInterval("animateLogonStatus();",1000);
}
else {
clearInterval(oInterval);
}
}
function displayLogonStatus(blnLogon) {
var strHTML = '<div id="mainDiv"><div id="promptDiv" class=""basePrompt"" style="width:90%;border:1px solid #c4c4c4;margin:auto;margin-top:30px;margin-bottom:30px;">Loading<span id="dotSpan">.</span></div></div>'
var strCaption = (blnLogon)?'ABF Logon':'ABF Logoff';
var intX = (blnLogon)?100:420;
var intY = (blnLogon)?20:5;
var intHeight = (blnLogon)?230:100;
overlib_new(strHTML,STICKY,CLOSECLICK,CAPTION,strCaption,CLOSETEXT,'X',FIXX,intX,FIXY,intY,WIDTH,350,HEIGHT,intHeight);
}
function animateLogonStatus() {
var oDotSpan
var dots
if (document.getElementById("dotSpan")) {
oDotSpan = document.getElementById("dotSpan")
if (oDotSpan.firstChild) {
dots = oDotSpan.firstChild.nodeValue + '.';
oDotSpan.removeChild(oDotSpan.firstChild);
}
else {
dots = '.';
}
if (dots.length > 3) {
dots = '.';
}
oDotSpan.appendChild(document.createTextNode(dots));
}
}
function setLogonFocus() {
if (document.getElementById("overDivNew")) {
if (document.frmRemoteLogon) {
if (document.frmRemoteLogon.txtUserID) {
document.frmRemoteLogon.txtUserID.onkeyup = checkRemoteLogonKeyPress
if (document.frmRemoteLogon.txtPassword) {
document.frmRemoteLogon.txtPassword.onkeyup = checkRemoteLogonKeyPress
}
if (document.frmRemoteLogon.txtUserID) {  // we have already checked this, but the window could have been close by now...
document.frmRemoteLogon.txtUserID.focus();
}
}
}
if (document.frmRemoteLogoff) {
if (document.frmRemoteLogoff.logoffButton) {
document.frmRemoteLogoff.logoffButton.focus();
}
}
}
}
var checkRemoteLogonKeyPress = function (e) {
if (!e) {
e = window.event;
}
if (e.keyCode != 13) {
evalLogonFormFieldState();
}
else {
if (document.frmRemoteLogon.logonButton.disabled == false) {
document.frmRemoteLogon.logonButton.click();
}
}
}
function evalLogonFormFieldState() {
if (document.frmRemoteLogon) {
if (document.frmRemoteLogon.txtUserID.value.length > 0 && document.frmRemoteLogon.txtPassword.value.length > 0) {
document.frmRemoteLogon.logonButton.disabled = false;
}
else {
document.frmRemoteLogon.logonButton.disabled = true;
}
}
}
function ValidateRemoteLogon() {
if (isEmpty(document.frmRemoteLogon.txtUserID.value)) {
handleLogonResponse('error,A valid ABF User ID is required to logon.');
document.frmRemoteLogon.txtUserID.focus();
return false;
}
if (document.frmRemoteLogon.txtPassword.value == '') {
handleLogonResponse('error,A valid ABF User ID is Password to logon.');
document.frmRemoteLogon.txtPassword.focus();
return false;
}
return true;
}
function loadMiscValidateJScriptFile() {
var objElement
var strType = 'SCRIPT'
var strPath
if (document.getElementsByTagName("HEAD")[0]) {
strPath = '/ABFGlobal/include/misc_validate-STC.js'
if (!checkFiles(strType,strPath)) {
objElement = document.createElement(strType);
objElement.src = strPath
objElement.type = 'text/javascript'
document.getElementsByTagName("HEAD")[0].appendChild(objElement);
}
}
}
function getCookie(name) {
var sPos = document.cookie.indexOf(name + "=");
var len = sPos + name.length + 1;
if((!sPos) && (name != document.cookie.substring(0, name.length))){
return null;
}
if(sPos == -1){
return null;
}
var ePos = document.cookie.indexOf(';', len);
if(ePos == -1) ePos = document.cookie.length;
return unescape(document.cookie.substring(len, ePos));
}
function setCookie(name, value, expires, path, secure){
var today = new Date();
if(expires){
expires = expires * 1000 * 3600 * 24;
}
document.cookie = name+'='+escape(value) +
((expires) ? ';expires=' + new Date(today.getTime() + expires).toGMTString() : '') +
((path) ? ';path=' + path : '') +
((secure) ? ';secure' : '');
}
function deleteD1SessionCookies(name, path){
if(getCookie(name)){
setCookie(name, '', -30, path);
}
}