
<!-- BEGIN REGISTRATION VALIDATION
function Validate(Contact)
{
	
// check to see if the field is blank
if (Contact.FirstName.value == "")
{
alert("You must enter your First Name.");
Contact.FirstName.focus();
return (false);
}

// require at least 2 characters be entered
if (Contact.FirstName.value.length < 2)
{
alert("Please enter at least 2 characters in the \"FirstName\" field.");
Contact.FirstName.focus();
return (false);
}

// check to see if the field is blank
if (Contact.LastName.value == "")
{
alert("You must enter your Last Name.");
Contact.LastName.focus();
return (false);
}

// check if email field is blank
var form_email = Contact.Email.value;
var invalidChars = " /:;,"
var badChar =""
if (form_email== "")
{
alert("You must enter your Email.");
 Contact.Email.focus();
 return (false);
}
for (i = 0;  i < invalidChars.length;  i++)
{
badChar=invalidChars.charAt(i);
if(form_email.indexOf(badChar,0)>-1)
{
alert("You cannot have a /:;, or a space");
Contact.Email.focus();
return (false);
}
}
atPos=form_email.indexOf("@",1)
if(atPos==-1)
{
alert("Your Email is not Valid, must have an @");
Contact.Email.focus();
return (false);
}
if(form_email.indexOf("@",atPos+1)>-1)
{
alert("You cannot have two @'s");
Contact.Email.focus();
return (false);
}
periodPos=form_email.indexOf(".",atPos)
if(periodPos==-1)
{
alert("There must be an . in your email address");
Contact.Email.focus();
return (false);
}
if(periodPos+3>form_email.length)
{
alert("There must be atleast two letters after .");
Contact.Email.focus();
return (false);
}

// check to see if the field is blank
if (Contact.Phone.value == "")
{
alert("You must enter your Phone number.");
Contact.Phone.focus();
return (false);
}

return (true);
}
//END REGISTRATION VALIDATION //-->   