function validateContactUs(theform)
{
  var totalstrerrors = "";
  
  if (validate(theform.Name.value,"req"))
  {
	totalstrerrors += "Please Enter your Name\n";
  }

  if (validate(theform.Email.value,"email"))
  {
	totalstrerrors += "Please Enter a Valid Email Address\n";
  }

  if (validate(theform.Message.value,"req"))
  {
	totalstrerrors += "Please Enter a Message\n";
  }
  
  if (totalstrerrors == "")
  {
    theform.Submit.disabled = true;
    return true;
  }
  else
  {
    alert(totalstrerrors);
    theform.Submit.disabled = false;
    return false;
  }
}

function validateLogin(theform)
{
  var totalstrerrors = "";
  
  if (validate(theform.Email.value,"email"))
  {
	totalstrerrors += "Please Enter your Email Address\n";
  }
  if (validate(theform.Password.value,"req"))
  {
	totalstrerrors += "Please Enter your Password\n";
  }
  
  if (totalstrerrors == "")
  {
    theform.Submit.disabled = true;
    return true;
  }
  else
  {
    alert(totalstrerrors);
    theform.Submit.disabled = false;
    return false;
  }
}

function validateNewCust(theform)
{
  var totalstrerrors = "";
  
  if (validate(theform.FirstName.value,"req"))
  {
	totalstrerrors += "Please Enter your First Name\n";
  }
  if (validate(theform.LastName.value,"req"))
  {
	totalstrerrors += "Please Enter your Last Name\n";
  }
  if (validate(theform.Email.value,"email"))
  {
	totalstrerrors += "Please Enter a Valid Email Address\n";
  }
  if (validate(theform.Phone.value,"req"))
  {
	totalstrerrors += "Please Enter a Valid Phone Number\n";
  }
  if (validate(theform.Address.value,"req"))
  {
	totalstrerrors += "Please Enter your Billing Address\n";
  }
  if (validate(theform.City.value,"req"))
  {
	totalstrerrors += "Please Enter your City\n";
  }
  if (validate(theform.Zipcode.value,"zip"))
  {
	totalstrerrors += "Please Enter your Zip Code\n";
  }
  
  if (totalstrerrors == "")
  {
    theform.Submit.disabled = true;
    return true;
  }
  else
  {
    alert(totalstrerrors);
    theform.Submit.disabled = false;
    return false;
  }
}

function validateShippingAddressForm(theform)
{
  var totalstrerrors = "";
  
  if (validate(theform.FirstName.value,"req"))
  {
	totalstrerrors += "Please Enter your First Name\n";
  }
  if (validate(theform.LastName.value,"req"))
  {
	totalstrerrors += "Please Enter your Last Name\n";
  }
  if (validate(theform.Address.value,"req"))
  {
	totalstrerrors += "Please Enter your Shipping Address\n";
  }
  if (validate(theform.City.value,"req"))
  {
	totalstrerrors += "Please Enter your City\n";
  }
  if (validate(theform.Zipcode.value,"zip"))
  {
	totalstrerrors += "Please Enter your Zip Code\n";
  }
  if (validate(theform.Phone.value,"req"))
  {
	totalstrerrors += "Please Enter your Phone Number\n";
  }
  
  if (totalstrerrors == "")
  {
    theform.Submit.disabled = true;
    return true;
  }
  else
  {
    alert(totalstrerrors);
    theform.Submit.disabled = false;
    return false;
  }
}

function validateCustUpdate(theform)
{
  var totalstrerrors = "";
  
  if (validate(theform.FirstName.value,"req"))
  {
	totalstrerrors += "Please Enter your First Name\n";
  }
  if (validate(theform.LastName.value,"req"))
  {
	totalstrerrors += "Please Enter your Last Name\n";
  }
  if (validate(theform.Email.value,"email"))
  {
	totalstrerrors += "Please Enter a Valid Email Address\n";
  }
  if (validate(theform.Phone.value,"req"))
  {
	totalstrerrors += "Please Enter a Valid Phone Number\n";
  }
  if (theform.Password.value > ""){
	  if (validate(theform.Password2.value,"req"))
	  {
		totalstrerrors += "Please Confirm your New Password\n";
	  }
  }
  
  if (totalstrerrors == "")
  {
    theform.Submit.disabled = true;
    return true;
  }
  else
  {
    alert(totalstrerrors);
    theform.Submit.disabled = false;
    return false;
  }
}

function validateAddAddress(theform)
{
  var totalstrerrors = "";
  
  if (validate(theform.FirstName.value,"req"))
  {
	totalstrerrors += "Please Enter your First Name\n";
  }
  if (validate(theform.LastName.value,"req"))
  {
	totalstrerrors += "Please Enter your Last Name\n";
  }
  if (validate(theform.Address.value,"req"))
  {
	totalstrerrors += "Please Enter your Address\n";
  }
  if (validate(theform.City.value,"req"))
  {
	totalstrerrors += "Please Enter your City\n";
  }
  if (validate(theform.Zipcode.value,"zip"))
  {
	totalstrerrors += "Please Enter your Zip Code\n";
  }
  if (validate(theform.Phone.value,"req"))
  {
	totalstrerrors += "Please Enter your Phone Number\n";
  }
  
  if (totalstrerrors == "")
  {
    theform.Submit.disabled = true;
    return true;
  }
  else
  {
    alert(totalstrerrors);
    theform.Submit.disabled = false;
    return false;
  }
}

