function Validator(Frm)
{
// check to see if the field is blank
if (Frm.name.value == "")
{
alert("You must enter your name.");
Frm.name.focus();
return (false);
}

// check if email field is blank
if (Frm.email.value == "")
{
alert("Please enter a value for the Email field.");
Frm.email.focus();
return (false);
}


// test if valid email address, must have @ and .
var checkEmail = "@.";
var checkStr = Frm.email.value;
var EmailValid = false;
var EmailAt = false;
var EmailPeriod = false;
for (i = 0;  i < checkStr.length;  i++)
{
ch = checkStr.charAt(i);
for (j = 0;  j < checkEmail.length;  j++)
{
if (ch == checkEmail.charAt(j) && ch == "@")
EmailAt = true;
if (ch == checkEmail.charAt(j) && ch == ".")
EmailPeriod = true;
	  if (EmailAt && EmailPeriod)
		break;
	  if (j == checkEmail.length)
		break;
	}
	// if both the @ and . were in the string
if (EmailAt && EmailPeriod)
{
		EmailValid = true
		break;
	}
}
if (!EmailValid)
{
alert("The email field must contain an \"@\" and a \".\".");
Frm.email.focus();
return (false);
}

if (Frm.phone.value == "")
{
alert("You must enter a phone number.");
Frm.phone.focus();
return (false);
}

// only allow numbers to be entered
var checkOK = "0123456789";
var checkStr = Frm.phone.value;
var allValid = true;
var allNum = "";
for (i = 0;  i < checkStr.length;  i++)
{
ch = checkStr.charAt(i);
for (j = 0;  j < checkOK.length;  j++)
if (ch == checkOK.charAt(j))
break;
if (j == checkOK.length)
{
allValid = false;
break;
}
if (ch != ",")
allNum += ch;
}
if (!allValid)
{
alert("Please enter only numbers in the phone field.");
Frm.phone.focus();
Frm.phone.select();
return (false);
}

if (Frm.comments.value == "")
{
alert("You must enter some comments or enter a request.");
Frm.comments.focus();
return (false);
}

}
