var attempts = 0

function submitentry(){
password = document.TheForm.ThePassword.value
username = document.TheForm.TheUserName.value
passcode = 1
usercode = 1
while (attempts < 3){
for(i = 0; i < password.length; i++){
passcode *= password.charCodeAt(i);
}
for(x = 0; x < username.length; x++){
usercode *= username.charCodeAt(x);
}
if(usercode==2.8277671739967526e+24&&passcode==2148091106834217400){
window.location=password+"/"}
return TheFormCheck()
}
}

function TheFormCheck(){
if (document.TheForm.TheUserName.value=="" && document.TheForm.ThePassword.value=="") 
{
alert("Username and password null.  Please enter your username and password.");
document.TheForm.TheUserName.focus();return false
}
if (document.TheForm.TheUserName.value=="") 
{
alert("Username null.  Please enter your username.");
document.TheForm.TheUserName.focus();return true
}
if (document.TheForm.ThePassword.value=="") 
{
alert("Password null.  Please enter your password.");
document.TheForm.ThePassword.focus();return true
}
if(usercode!=2.8277671739967526e+24||passcode!=2148091106834217400){
alert("Username or password incorrect!  Please try again.")
attempts+=1
if (attempts == 3){
attempts=0
window.location="denied.html"
}
else{
document.TheForm.ThePassword.value=""
document.TheForm.TheUserName.value=""
document.TheForm.TheUserName.focus();return true;
}
}
}

function EraseBoxes(){
document.TheForm.ThePassword.value=""
document.TheForm.TheUserName.value=""
}

function selectAll(theField){
var tempval=eval("document."+theField)
tempval.focus()
tempval.select()
}

// -->