function Validate(theForm){
  if (theForm.Name.value == ""){
    document.getElementById("nmsg").innerHTML = "Please enter your Name.";
    theForm.Name.focus();
	return(false);
 }
	  if (theForm.Name.value.length < 6){
		document.getElementById("nmsg").innerHTML = "Please provide your Full Name.";
		theForm.Name.focus();
		return(false);
	  }
  if (theForm.Address.value == ""){
    document.getElementById("amsg").innerHTML = "Please enter your Address.";
    theForm.Address.focus();
 	return(false);
}
	  if (theForm.Address.value.length < 15){
		document.getElementById("amsg").innerHTML = "Please check your Address.";
		theForm.Address.focus();
		return(false);
	  }

  if (theForm.City.value == ""){
    document.getElementById("cszmsg").innerHTML = "Please enter your City.";
    theForm.City.focus();
 	return(false);
}
	  if (theForm.City.value.length < 2){
		document.getElementById("cszmsg").innerHTML = "Please check your City.";
		theForm.Address.focus();
		return(false);
	  }
theForm.Zip.value = strip(theForm.Zip.value) + "";
  if (theForm.Zip.value == ""){
    document.getElementById("cszmsg").innerHTML = "Please enter your Zip Code.";
    theForm.Zip.focus();
 	return(false);
}

	  if (theForm.Zip.value.length < 5){
		document.getElementById("cszmsg").innerHTML = "Please check your Zip Code.";
		theForm.Zip.focus();
		return(false);
	  }

  if ((theForm.MnPhone.value=="") && (theForm.AltPhone.value=="")) {
    document.getElementById("pmsg").innerHTML = "Please enter a Telephone Number.";
    theForm.MnPhone.focus();
	return(false);
  }
	theForm.MnPhone.value = strip(theForm.MnPhone.value) + "";
	theForm.AltPhone.value = strip(theForm.AltPhone.value) + "";
	
  if ((theForm.MnPhone.value!="") && (theForm.MnPhone.value.length < 10)) {
    document.getElementById("pmsg").innerHTML = "Please check your main number.";
    theForm.MnPhone.focus();
	return(false);
  }
  if ((theForm.AltPhone.value!="") && (theForm.AltPhone.value.length < 10)) {
    document.getElementById("pmsg").innerHTML = "Please check your alternate number.";
    theForm.AltPhone.focus();
	return(false);
  }
  if (theForm.Email.value == ""){
    document.getElementById("emsg").innerHTML = "Please provide your Email Address.";
    theForm.Email.focus();
	return(false);
  }
  if (theForm.Email.value.length < 5)  {
    document.getElementById("emsg").innerHTML = "Please enter at least 5 characters for the Email Address.";
    theForm.Email.focus();
    return (false);
  }

  	var EMValue = theForm.Email.value;	
	var delim1 = EMValue.indexOf("@");
if (delim1 < 2) {
	document.getElementById("emsg").innerHTML = "Please fix the Email Address.";
	theForm.Email.focus();
    return (false);
}		

  var checkOK = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789@.-_";
  var checkStr = theForm.Email.value;
  var allValid = true;
  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)  {
    document.getElementById("emsg").innerHTML = "The Email Address contains characters we don't recognize.";
    theForm.Email.focus();
    return (false);
  }

  	var wwValue = theForm.Email.value;	
	var delim3 = wwValue.indexOf("www.");
if (delim3 >-1) {
	document.getElementById("emsg").innerHTML = "Please fix the Email Address.";
	theForm.Email.focus();
    return (false);
}		
theForm.CCNbr.value = strip(theForm.CCNbr.value) + "";
	  if (theForm.CCNbr.value.length < 15){
		document.getElementById("cmsg").innerHTML = "You have not enter enough numbers for your credit card";
		theForm.CCNbr.focus();
		return(false);
	  }

theForm.ccv.value = strip(theForm.ccv.value) + "";
	  if (theForm.ccv.value == ""){
		document.getElementById("cmsg").innerHTML = "Please enter the security code on your card.";
		theForm.ccv.focus();
		return(false);
	  }
	  if (theForm.ccv.value.length < 3){
		document.getElementById("cmsg").innerHTML = "Please check the security code on your card.";
		theForm.ccv.focus();
		return(false);
	  }
  return(true);
}
