
<!--
function Form1_Validator(theForm)
{

var alertsay = ""; // define for long lines
// alertsay is not necessary for your code,
// but I need to break my lines in multiple lines
// so the code won't extend off the edge of the page


// check to see if the field is blank
if (theForm.f_name.value == "")
{
alertsay = "Please fill in the following field" + "\n"
alertsay = alertsay + "First Name"
alert(alertsay);
theForm.f_name.focus();
return (false);
}

// check to see if the field is blank
if (theForm.l_name.value == "")
{
alertsay = "Please fill in the following field" + "\n"
alertsay = alertsay + "Last Name"
alert(alertsay);
theForm.l_name.focus();
return (false);}

// check to see if the field is blank
if (theForm.Phone_Number.value == "")
{
alertsay = "Please fill in the following field" + "\n"
alertsay = alertsay + "Phone Number"
alert(alertsay);
theForm.Phone_Number.focus();
return (false);}


// check to see if the field is blank
if (theForm.Email.value == "")
{
alertsay = "Please fill in the following field" + "\n"
alertsay = alertsay + "Email"
alert(alertsay);
theForm.Email.focus();
return (false);}

// check to see if the field is blank
if (theForm.Guests.value == "")
{
alertsay = "Please fill in the following field" + "\n"
alertsay = alertsay + "Number of guests"
alert(alertsay);
theForm.Guests.focus();
return (false);}

// check to see if the field is blank
if (theForm.Tour_Date.value == "")
{
alertsay = "Please fill in the following field" + "\n"
alertsay = alertsay + "Tour Date"
alert(alertsay);
theForm.Tour_Date.focus();
return (false);}

// because this is a sample page, don't allow to exit to the post action
// comes in handy when you are testing the form validations and don't
// wish to exit the page
//alertsay = "All questions have been answered, thank you. " + "\n"
//alertsay = alertsay + "Please click OK"
//alert(alertsay);
//return (true);
// replace the above with return(true); if you have a valid form to submit to
}
//-->