ed anche:
theForm.txtMail.focus(); invece di: theForm.txtFrom.focus();
a meno che il campo non si chiami txtMail, in quel caso l'errore è:
var strMail = document.frmMail.txtFrom.value; (sbagliato)
var strMail = document.frmMail.txtMail.value; (giusto)
HTH
Zappa