function check(pw) {
var params=new Array(4); 
var alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI"; 
var choice="a|2579|UPPBUW'"; 
choice=choice+"|"; 
p=0; 
for (i=0;i<3;i++) {
a=choice.indexOf("|",p); 
params[i]=choice.substring(a,p); 
p=a+1;} 
mult=3; 
pass=pw.toUpperCase(); 
hash=0; 
len=pw.length;
for (i=0;i<len;i++) { 
letter=pass.substring(i,i+1); 
c=alpha.indexOf(letter,0)+1; 
hash=hash*mult+c;} 
h1 = hash; 
mult = 10; 
hash=0; 
for (i=0;i<len;i++) {
letter=pass.substring(i,i+1); 
c=alpha.indexOf(letter,0)+1;	
hash=hash*mult+c;} 
h2=hash+" "; 
if (h1!=params[1]) {
alert("Incorrect Password!"); 
top.location="top.htm"; } 
}

