<!--

 function chk_form(theForm)
 {

   if (theForm.equipcost.value == '')      { alert('Please enter the Equipment Cost');        theForm.equipcost.focus();	return (false); }

   if (theForm.validate.value == 'Y')
   { 

     if (theForm.customer.value == '')       { alert('Please enter your Company Name');         theForm.customer.focus();	return (false); }
     if (theForm.custaddr.value == '')       { alert('Please enter your Address');              theForm.custaddr.focus();	return (false); }
     if (theForm.custcity.value == '')       { alert('Please enter your City');                 theForm.custcity.focus();	return (false); }
     if (theForm.custprov.value == '')       { alert('Please enter your Province');             theForm.custprov.focus();	return (false); }
     if (theForm.custpostcode.value == '')   { alert('Please enter your Postal Code');          theForm.custpostcode.focus();	return (false); }
     if (theForm.custtel.value == '')        { alert('Please enter your Telephone Number');     theForm.custtel.focus();	return (false); }
     if (theForm.custcontact.value  == '')   { alert('Please enter your Contact Name');         theForm.custcontact.focus();	return (false); }
     if (theForm.custemail.value == '')      { alert('Please enter your Email Address');        theForm.custemail.focus();	return (false); }
     if (theForm.equipdesc.value == '')      { alert('Please enter the Equipment Description'); theForm.equipdesc.focus();	return (false); }
     if (theForm.vcontact.value == '')       { alert('Please select a Sales Representative');   theForm.vcontact.focus();	return (false); }

     if (!theForm.custtel.value == '')
     {

       if (theForm.custtel.value.length < 10)
       {
         alert("Telephone Number too short (10 numerics)");
         theForm.custtel.focus();
         return (false);
       }

       var checkOK = "0123456789 -()";
       var checkStr = theForm.custtel.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 (!allValid)
       {
         alert("Telephone Number field contains non-numeric characters - Allowed: numerics, spaces and ( ) -");
         theForm.custtel.focus();
         return (false);
       }
     }

     var checkOK = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789_-.@";
     var checkStr = theForm.custemail.value;
     var allValid  = true;
     var allemailatFormat = false;
     var allemaildotFormat = false;
     var allNum = "";
     for (i = 0;  i < checkStr.length;  i++)
       {
       ch = checkStr.charAt(i);
       if (ch == "@")
       {
        allemailatFormat = true;
       }
       if (ch == ".")
       {
        allemaildotFormat = true;
       }
       for (j = 0;  j < checkOK.length;  j++)
         if (ch == checkOK.charAt(j))
           break;
       if (j == checkOK.length)
       {
         allValid = false;
         break;
       }
     }
     if (!allValid)
     {
       alert("Email field contains non-numeric characters");
       theForm.custemail.focus();
       return (false);
     }
     if (!allemailatFormat)
     {
       alert("Email field format is invalid '@ missing': yourname@yourdomain.yourdomainextention");
       theForm.custemail.focus();
       return (false);
     }
     if (!allemaildotFormat)
     {
       alert("Email field format is invalid '. missing': yourname@yourdomain.yourdomainextention");
       theForm.custemail.focus();
       return (false);
     }

     if (!theForm.custpostcode.value == '')
     {
       if (theForm.custpostcode.value.length < 6)
       {
         alert("Postal Code too short (6 characters without space or 7 characters with space)");
         theForm.custpostcode.focus();
         return (false);
       }
     }
   }  
 }

//-->