var ns4 = (document.layers)? true:false var ie4 = (document.all)? true:false var iwpSK = null function OpenWindow(url,parms) { if (iwpSK != null){ if(ie4) iwpSK.close() iwpSK = null } iwpSK = window.open(url,"iwpSK",parms) iwpSK.focus(); } function PopGetSKLogin() { var loginurlSK = srcAddr & "/PopAuth.asp" OpenWindow(loginurlSK,"resizable=no,scrollbars=no,width=200,height=100") } function loginSK() { var frm = document.skLoginForm if( checkIt("Username",frm.skUsername,5,20,false) ) { alert("Please enter a username between 5 and 20 characters in length") return false } if( checkIt("Password",frm.skPassword,5,20,true) ) { alert("Please enter a password between 5 and 20 characters in length") return false } return true } function isEmpty(str) { if( str == null || str == "" ) return true return false } function checkIt(what,where,minlen,maxlen,notify) { tmp = where.value if( isEmpty(tmp) || tmp.length < minlen || tmp.length > maxlen ) { if( notify ) alert("Invalid " + what) where.focus() where.select() return true } return false } function trim() { //Match spaces at beginning and end of text and replace with empty strings. Use is text.trim() return this.replace(/^\s+/,'').replace(/\s+$/,''); }