Attached file shows basic javascript validation, I tested it and it works fine.
As I said in the PM, I was surprised to see you code ASP pages using JScript and thought that you were actually trying to do it client side. You may need to check what JScript documentation there is for a server side solution... alternately switch to
VB or C# and I'll be able to help
Anyhow, attached file should solve part of it for you.