You should remove the following line and replace it with "return false;"
Further more, I would change the submit buttom from
document.form.action = 'http://formmail.dreamhost.com/cgi-bin/formmail.cgi';
to the following
<input type="submit" value="Send" name="B1" tabindex="10" onclick="checkPw();">
finally, I would add the following to the form declaration.
<input type="submit" value="Send" name="B1" tabindex="10">
your form declaration should now be