<HTML>
<HEAD>
<SCRIPT SRC=valid.js>
</SCRIPT>

<SCRIPT>
<!--
// custom validators
function validssn(fld)
  {
  rv=valid(fld,"Please enter your 9 digit Social Security Number",
    "^ *([0-9][0-9][0-9]) *-? *([0-9][0-9]) *-? *([0-9][0-9][0-9][0-9]) *$");
  if (rv) 
    fld.value=RegExp.$1 + "-" + RegExp.$2 + "-" + RegExp.$3;
  return rv;
  }

function validUSphone(fld)
  {
  rv=valid(fld,"Please enter your U.S. phone number with area code",
    "^ *\\(? *([0-9][0-9][0-9]) *\\)? *([0-9][0-9][0-9]) *-? *([0-9][0-9][0-9][0-9]) *$");
  if (rv)
    fld.value="(" + RegExp.$1 + ") " + RegExp.$2 + "-" + RegExp.$3;
  return rv;
  }

//-->
</SCRIPT>
</HEAD>
<BODY>
<H1>Enter your Information</H1>
<FORM Name=theForm ACTION=valid1.asp METHOD=POST 
  onsubmit='return onsubmit(theForm);'>
<TABLE><TR><TD>
Name: 
</TD><TD>
<INPUT NAME=UrName onChange='return valid(UrName,"Please enter your first and last name",
"^[a-zA-Z]+ +[a-zA-Z]+$");'>
</TD></TR><TR><TD>
E-mail:
</TD><TD>
<INPUT Name=email onChange='return valid(email,"Please enter a valid e-mail address",
   "^ *[-a-zA-Z0-9_]+@[-a-zA-Z0-9_]+\\.[a-zA-Z][a-zA-Z][a-zA-Z]?$");'>
</TD></TR><TR><TD>
Tel: 
</TD><TD>
<INPUT Name=Tel onChange='return validUSphone(Tel);'>
</TD></TR><TR><TD>
SSN:
</TD><TD>
<INPUT Name=SSN onChange='return validssn(SSN);'>
</TD></TR><TR><TD> </TD><TD>
<INPUT Name=Submit TYPE=Submit Value="OK">
</TD></TR></TABLE>
</FORM>

</HTML>