//---------------------------------------------------- // Page redirection v0.01 Kirk Bentley 7/24/2003 //---------------------------------------------------- function redirectFn(myUrl,myDelay){ self.setTimeout('doRedirectFn("' + myUrl + '")', myDelay); } function doRedirectFn(myUrl){ location.replace(myUrl); } //------------------------------------------------ // Popup window centered //------------------------------------------------ //Example: YourLinkText var win = null; function NewWindow(mypage,myname,w,h,scroll){ LeftPosition = (screen.width)?(screen.width-w)/2:100; TopPosition = (screen.height)?(screen.height-h)/2:100; settings = 'width=' + w + ',height=' + h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',location=no,directories=no,status=yes,menubar=no,toolbar=no,resizable=no'; win = window.open(mypage,myname,settings); } var forgotPass = null; function NewForgotWindow(mypage,myname,w,h,scroll){ LeftPosition = (screen.width)?(screen.width-w)/2:100; TopPosition = (screen.height)?(screen.height-h)/2:100; settings = 'width=' + w + ',height=' + h + ',top=' + TopPosition + ',left=' + LeftPosition + ',scrollbars=' + scroll + ',location=no,directories=no,status=no,menubar=no,toolbar=no,resizable=no'; forgotPass = window.open(mypage,myname,settings); } //------------------------------------------------------------ // Check for invalid char v0.01 [KB] 2/21/2003 //------------------------------------------------------------ function invalidCharSet(str,chars){ var result = true; for (var i = 0; i < str.length; i++){ for(var x = 0; x < chars.length; x++){ if(chars.substr(x,1) == str.substr(i,1)){ result = false; } } } return result; } //------------------------------------------------------------ // Check for empty field v0.01 [KB] 2/21/2003 //------------------------------------------------------------ function isNotEmptyFn(str){ result = true if(str.length == 0){ result = false; } return result; } //------------------------------------------------------------ // highLight field v0.01 [KB] 2/21/2003 //------------------------------------------------------------ function highLightFn(el,formId){ document.getElementById(el).style.backgroundColor = '#CCCCCC'; targetField = eval('document.forms[formId].' + el); targetField.value = ''; document.getElementById(el).onfocus = function(){ this.style.backgroundColor = '#FFFFFF'; } } //------------------------------------------------------------ // Session expired alert function v0.01 [KB] 7/24/2003 //------------------------------------------------------------ function loginFn(){ alert('Your session has expired!\r\nYou will now be redirected to the login page.'); window.location.href="index.php?pid=login&sid=&uhash="; }