function Validator(theForm)
{
if (theForm.Name.value == "")
{
alert("Please enter a value for the \"Name\" field.");
theForm.Name.focus();
return (false);
}
if (theForm.Name.value.length < 2)
{
alert("Please enter at least 2 characters in the \"Contact Name\" field.");
theForm.ContactName.focus();
return (false);
}
if (theForm.Name.value.length > 100)
{
alert("Please enter at most 100 characters in the \"Contact Name\" field.");
theForm.Name.focus();
return (false);
}
if (theForm.EmailAddress.value == "")
{
alert("Please enter a value for the \"Email Address\" field.");
theForm.EmailAddress.focus();
return (false);
}
if (theForm.EmailAddress.value.length < 2)
{
alert("Please enter at least 2 characters in the \"Email Address\" field.");
theForm.EmailAddress.focus();
return (false);
}
if (theForm.EmailAddress.value.length > 100)
{
alert("Please enter at most 100 characters in the \"Email Address\" field.");
theForm.EmailAddress.focus();
return (false);
}
if (theForm.Comments.value == "")
{
alert("Please enter a value for the \"Comments\" field.");
theForm.Comments.focus();
return (false);
}
if (theForm.Comments.value.length < 2)
{
alert("Please enter at least 2 characters in the \"Comments\" field.");
theForm.Comments.focus();
return (false);
}
if (theForm.Comments.value.length > 1000)
{
alert("Please enter at most 1000 characters in the \"Comments\" field.");
theForm.Comments.focus();
return (false);
}
return (true);
}
