// Form Validation Script

<!--
function FrontPage_Form1_Validator(theForm)
{

 if (theForm.Name.value == "")
  {
    alert("Please enter a value for the \"Your name\" field.");
    theForm.Name.focus();
    return (false);
  }
  /*
  //take out?...rj
   if (theForm.Company.value == "")
  {
    alert("Please enter a value for the \"Company Name\" field.");
    theForm.Company.focus();
    return (false);
  }
  */
  
if (theForm.Address1.value == "")
  {
    alert("Please enter a value for the \"Address 1\" field.");
    theForm.Address1.focus();
    return (false);
  }
  
if (theForm.City.value == "")
  {
    alert("Please enter a value for the \"City\" field.");
    theForm.City.focus();
    return (false);
  }
  
  
  if (theForm.State.value == "")
  {
    alert("Please enter a value for the \"State\" field.");
    theForm.State.focus();
    return (false);
  }
  
if (theForm.Zip.value == "")
  {
    alert("Please enter a value for the \"Zip Code\" field.");
    theForm.Zip.focus();
    return (false);
  }
  
/*
  //take out? ...rj
  if (theForm.ProjectName.value == "")
  {
    alert("Please enter a value for the \"Project Name\" field.");
    theForm.ProjectName.focus();
    return (false);
  }
  */
if (theForm.Phone_no.value == "")
  {
    alert("Please enter a value for the \"Phone Number\" field.");
    theForm.Phone_no.focus();
    return (false);
  }
 
if (theForm.email.value == "")
  {
    alert("Please enter a value for the \"Your Email Address\" field.");
    theForm.email.focus();
    return (false);
  }
  
if (!(/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(theForm.email.value))) 
	{
		alert("The email you entered is not a valid email address.");
	    theForm.email.focus();
	    return (false);
	}
/*test of google email*/
if (theForm.email.value == 'google@google.com') 
	{
		alert("The email you entered is not a valid email address.");
	    theForm.email.focus();
	    return (false);
	}

if (theForm.How_Found.value == "")
  {
    alert("Please let us know how you found Digital Printing Center.");
    theForm.How_Found.focus();
    return (false);
  }
	
if (theForm.Job_description.value == "")
  {
    alert("Please enter a value for the \"Job_description\" field.");
    theForm.Job_description.focus();
    return (false);
  }
  
 if (theForm.Quantity.value == "")
  {
    alert("Please enter a value for the \"Quantity\" field.");
    theForm.Quantity.focus();
    return (false);
  }

if (theForm.ink_coverage.value == "")
  {
    alert("Please select an \"Ink Coverage\" value.");
    theForm.ink_coverage.focus();
    return (false);
  }
  
/* not required...rj
  if (theForm.flat_size.value == "")
  {
    alert("Please enter a value in the \"Flat Size\" field.");
    theForm.flat_size.focus();
    return (false);
  }
  
 
 if (theForm.finished_size.value == "")
  {
    alert("Please enter a value in the \"Finished Size\" field.");
    theForm.finished_size.focus();
    return (false);
  }
  
  
  if (theForm.stock.value == "")
  {
    alert("Please enter a value in the \"Stock\" field.");
    theForm.stock.focus();
    return (false);
  }
 
if (theForm.finishing.value == "")
  {
    alert("Please enter a value in the \"Finishing\" field.");
    theForm.finishing.focus();
    return (false);
  }
  */
postIt();

  return (true);
}
//-->