function validateForm(form) 

{ 

   if (form.OrderNo.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your order number."); //Informs user of empty field
   form.OrderNo.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   

   if (form.OrderDate.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your order date."); //Informs user of empty field
   form.OrderDate.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.Name_of_Purchaser.value == "") { //This checks to make sure the field is not empty
   alert("Please enter the name of the person who purchased the order."); //Informs user of empty field
   form.Name_of_Purchaser.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
      
   if (form.email_from.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your email."); //Informs user of empty field
   form.email_from.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.Telephone.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your telephone number."); //Informs user of empty field
   form.Telephone.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
  
   if(form.agree.checked == false)
   {alert("Please read our shipping policies and check the box below"); 
   return false; } 

      
   {
checkEmail = form.email_from.value
if ((checkEmail.indexOf('@') < 0) || ((checkEmail.charAt(checkEmail.length-4) != '.') && (checkEmail.charAt(checkEmail.length-3) != '.'))) 
{alert("You have entered an invalid email address. Please try again.");
form.email_from.select();
return false;
}

} 

}
