I have a simple login form and one submit button. I have replaced the standard
grey button with a costum made button using the appropiate Form>Image Field.
The problem is that it wont work. It just seem to reset the text fields. Here
is the code:

function submitentry(){
password = document.password1.password2.value.toLowerCase()
username = document.password1.username2.value.toLowerCase()
passcode = 1
usercode = 1
for(i = 0; i < password.length; i++) {
passcode *= password.charCodeAt(i);
}
for(x = 0; x < username.length; x++) {
usercode *= username.charCodeAt(x);
}
//CHANGE THE NUMBERS BELOW TO REFLECT YOUR USERNAME/PASSWORD
if(usercode==274514501128904340000&&passcode==1269 869750325)
//CHANGE THE NUMBERS ABOVE TO REFLECT YOUR USERNAME/PASSWORD
{
window.location=password+".html"}
else{
alert("password/username combination wrong")}
}
</script>
<form name="password1">
<span class="style57">username: </span>
<input name="username2" type="text" size="15">
<br>
<span class="style57">password: </span>
<input name="password2" type="password" size="15">

<input name="submit" type="image" onclick="submitentry()"
value="Submit" src="img/submit.gif" />


</label>
<label></label>
</form>

Now if I rename type="image" back to "type="button" then all is ok and it
work. Where am I going worng here?

Thanks

Kris