i just view your code but i just give a one way for validation all this
like mail,web,no. etc u should use spry frame work of java script
this you can download after searching from google ok.
which include the file .js and .css for diffrent element like textbox,textarea,listbox,checkbox etc.
this use you can after some syntax which you can learn from the given help in this frame work