// JavaScript Document
<!--

/*
    VALIDATE.JS Script Ver 2.0.0
    Created by Salvatore Mete.
    Copyright 2000-2005 by Salvatore Mete. All rights reserved.

    You can contact me with any questions:
        smete@saturnstation.com or smete@dls.net

    LICENCE TERMS
    
    1. Use of this script can only be used by permission 
    from Salvatore Mete.
    
    2. You may NOT distribute or republish this script,
    whether modified or not. The script can only be
    distributed by the author, Salvatore Mete.
    
    3. THE SCRIPT AND ITS DOCUMENTATION ARE PROVIDED
    "AS IS", WITHOUT WARRANTY OF ANY KIND, NOT EVEN THE
    IMPLIED WARRANTY OF MECHANTABILITY OR FITNESS FOR A
    PARTICULAR PURPOSE. YOU AGREE TO BEAR ALL RISKS AND
    LIABILITIES ARISING FROM THE USE OF THE SCRIPT,
    ITS DOCUMENTATION AND THE INFORMATION PROVIDED BY THE
    SCRIPTS AND THE DOCUMENTATION.

    If you cannot agree to any of the above conditions, you
    may not use the script. 
    

*/


function formEdit(myform) {
   var x;
   var okay;
   var missingInfo;
   var errorFlag;
   
   missingInfo = "An error occurred, please see messages below: \n\r \n\r";
   errorFlag = false;
   
   if (!myform.wname.value) {
      missingInfo += "Missing Name Information \n\r";
      errorFlag = true;
   }

   //if (!myform.busz.value) {
   //   missingInfo += "Missing Business Information \n\r";
   //   errorFlag = true;
   //}   
   
   if (!myform.phone.value) {
      missingInfo += "Missing Phone Information \n\r";
      errorFlag = true;
   }

   if (!myform.email.value) {
      missingInfo += "Missing Email Address \n\r";
	  errorFlag = true;
   } else {
      if (myform.email.value.length >= 1 && (myform.email.value.indexOf("@") < 0 || myform.email.value.indexOf(".") < 0 )) {
         missingInfo += "Invalid Email Address\n\r";  
		 errorFlag = true;
      } 
   } 

   if (errorFlag == true) {
      alert (missingInfo);
	  return false;
   } else {
     okay = confirm("Would you like to submit this form? \n Press Ok to submit.  Press Cancel to make changes.");

     if (!okay) { return false; }
      myform.submit();
      return true;   
   }
     
}
-->
