var pass=new Array()
var t3=""
var lim=8
pass[0]="i9zl198Sf7ayIEa"
pass[1]="Z17QBRsSy2DAn8"
pass[2]="gt6mywJgw321DYF"
pass[3]="s5s920esqDcd2ha"
pass[4]="8tnha3WuWkJeGIDW"
pass[5]="18tnha3WuWkJeGID"

//configure extension to reflect the extension type of the target web page (ie: .htm or .html)
var extension=".htm"
var enablelocking=0
var numletter="0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"
var temp3=''
var cur=0


function max(which){
return (pass[Math.ceil(which)+(3&15)].substring(0,1))
}

function testit(input){
temp=numletter.indexOf(input)
var temp2=temp^parseInt(pass[phase1-1+(1|3)].substring(0,2))
temp2=numletter.substring(temp2,temp2+1)
return (temp2)
}


function submitentry(){
t3=''
verification=document.password1.password2.value
verification2=document.password1.UserID.value  // AR Nov25 2007 to extract UserID
phase1=Math.ceil(Math.random())-6+(2<<2)
var indicate=true
for (i=(1&2);i<window.max(Math.LOG10E);i++)
t3+=testit(verification.charAt(i))
for (i=(1&2);i<lim;i++){
if (t3.charAt(i)!=pass[phase1+Math.round(Math.sin(Math.PI/2)-1)].charAt(i))
indicate=false
}
if (verification.length!=window.max(Math.LOG10E))
indicate=false
if (verification2!='green') // AR 25 Nov 2007
indicate=false
if (indicate)
window.location=verification+extension
else
alert("Invalid password. Please try again")
}

function guestentry(){
//window.location="HomePage.html"
window.open("HomePage.html")
}
