
function validateForm(form) 

{ 
   
   if (form.Company.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your company name."); //Informs user of empty field
   form.Company.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
         
   if (form.TaxID.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your federal tax ID."); //Informs user of empty field
   form.TaxID.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
         
   if (form.ResaleNo.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your resale number."); //Informs user of empty field
   form.ResaleNo.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
 
   if (form.BillFirst.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your first name."); //Informs user of empty field
   form.BillFirst.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.BillLast.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your last name."); //Informs user of empty field
   form.BillLast.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.BillEmail.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your email address."); //Informs user of empty field
   form.BillEmail.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.BillAddress1.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your billing address."); //Informs user of empty field
   form.BillAddress1.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.BillCity.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your billing city."); //Informs user of empty field
   form.BillCity.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.BillState.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your billing state."); //Informs user of empty field
   form.BillState.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.BillZip.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your billing zip code."); //Informs user of empty field
   form.BillZip.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.BillCountry.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your billing country."); //Informs user of empty field
   form.BillCountry.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }

   if (form.BillPhone.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your billing telephone number."); //Informs user of empty field
   form.BillPhone.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
      
   if (form.ShipFirst.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your first name."); //Informs user of empty field
   form.ShipFirst.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.ShipLast.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your last name."); //Informs user of empty field
   form.ShipLast.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.ShipEmail.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your email address."); //Informs user of empty field
   form.ShipEmail.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }   
   
   if (form.ShipAddress1.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your shipping address."); //Informs user of empty field
   form.ShipAddress1.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.ShipCity.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your shipping city."); //Informs user of empty field
   form.ShipCity.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.ShipState.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your shipping state."); //Informs user of empty field
   form.ShipState.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.ShipZip.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your shipping zip code."); //Informs user of empty field
   form.ShipZip.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.ShipCountry.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your shipping country."); //Informs user of empty field
   form.ShipCountry.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }

   if (form.ShipPhone.value == "") { //This checks to make sure the field is not empty
   alert("Please enter your shipping telephone number."); //Informs user of empty field
   form.ShipPhone.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.UserName.value == "") { //This checks to make sure the field is not empty
   alert("Please enter a username."); //Informs user of empty field
   form.UserName.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
   
   if (form.Password.value == "") { //This checks to make sure the field is not empty
   alert("Please enter a password."); //Informs user of empty field
   form.Password.focus( ); //This focuses the cursor on the empty field
   return false; //This prevents the form from being submitted
   }
 
   {
checkEmail = form.ShipEmail.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.ShipEmail.select();
return false;
}

} 

}
