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