    function validate() {

	    var theMessage = "Please complete the following fields: \n--------------------------------------------\n";
	    var noErrors = theMessage

		if (document.frm.domain.value=="") {
		theMessage = theMessage + "\n The Domain Name is Required";
		}

		//if (!FSfncValidateDomain(document.frm.domain)) {return false}

	    if (theMessage == noErrors) {
	 
	    } else {
	
	    // Si une erreur est trouvee, envoyez le message d'alerte.
	    alert(theMessage);
	    return false;
	    }
    }

	var knownDomsPat=/^(com|net|org|edu|int|mil|gov|arpa|biz|aero|name|coop|info|pro|museum|co|uk)$/;
	
	function FSfncValidateDomain(FormField,NoWWW,CheckTLD) {
		// NoWWW and CheckTLD are optional, both accept values of true, false, and null.
		// NoWWW is used to check that a domain name does not begin with 'www.', eg. for WHOIS lokkups.
		DomainName=FormField.value.toLowerCase();
		if (CheckTLD==null) {CheckTLD=true}
		var specialChars="/\\(\\)><@,;:\\\\\\\"\\.\\[\\]";
		var validChars="\[^\\s" + specialChars + "\]";
		var atom=validChars + '+';
		var atomPat=new RegExp("^" + atom + "$");
		var domArr=DomainName.split(".");
		var len=domArr.length;
		if (len==1) {alert(FormField.title + " Invalid Domain"); FormField.focus(); return false}
		for (i=0;i<len;i++) {if (domArr[i].search(atomPat)==-1) {alert(FormField.title + " Invalid Domain"); FormField.focus(); return false}}
		if ((CheckTLD) && (domArr[domArr.length-1].length!=2) && (domArr[domArr.length-1].search(knownDomsPat)==-1)) {alert(FormField.title + " must end in a well-known domain or two letter country."); FormField.focus(); return false}
		if ((NoWWW) && (DomainName.substring(0,4).toLowerCase()=="www.")) {alert(FormField.title + " invalid: starts with www."); FormField.focus(); return false}
		return true;
		}


   function validate2() {

	    var theMessage = "Please complete the following fields: \n--------------------------------------------\n";
	    var noErrors = theMessage

		if (document.form.Name.value=="") {
		theMessage = theMessage + "\n Your Name is Required";
		}

		if (document.form.Address1.value=="") {
		theMessage = theMessage + "\n Your Address is Required";
		}

		if (document.form.Postcode.value=="") {
		theMessage = theMessage + "\n Your Postcode is Required";
		}

		if (document.form.Telephone.value=="") {
		theMessage = theMessage + "\n Your Telephone is Required";
		}

		if (document.form.Email.value=="") {
		theMessage = theMessage + "\n Your Email is Required";
		} else {
			filter = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;
			if (!filter.test(document.form.Email.value)) {
				theMessage = theMessage + "\n A valid Email Address is Required";
			}
		}

	    if (theMessage == noErrors) {
	 
	    } else {
	
	    // Si une erreur est trouvee, envoyez le message d'alerte.
	    alert(theMessage);
	    return false;
	    }
    }

    function validate3() {

	    var theMessage = "Please complete the following fields: \n--------------------------------------------\n";
	    var noErrors = theMessage

		if (document.form.Card_Holders_Name.value=="") {
		theMessage = theMessage + "\n The Card Holders Name is Required";
		}

		if (document.form.Card_Number.value=="") {
		theMessage = theMessage + "\n The Card Number is Required";
		}

		if (document.form.Card_CCV.value=="") {
		theMessage = theMessage + "\n The Card CCV is Required";
		}

		if (document.form.Card_ValidM.value=="") {
		theMessage = theMessage + "\n The Card Valid Month is Required";
		}

		if (document.form.Card_ValidY.value=="") {
		theMessage = theMessage + "\n The Card Valid Year is Required";
		}

		if (document.form.Card_ExpiryM.value=="") {
		theMessage = theMessage + "\n The Card Expiry Month is Required";
		}

		if (document.form.Card_ExpiryY.value=="") {
		theMessage = theMessage + "\n The Card Expiry Year is Required";
		}

	    if (theMessage == noErrors) {
	 
	    } else {
	
	    // Si une erreur est trouvee, envoyez le message d'alerte.
	    alert(theMessage);
	    return false;
	    }
    }


	function NumberValidation(value){
	var value;
	if (isNaN(value)) {
	      alert("Value is not a number: " + value);
	      return false;
	      }
	}
	
	function checkform (The_Variable,The_Length)
	{
	
	  if (The_Variable.length != The_Length) {
	    alert( "This must be "+The_Length+" digits." );
	    return false ;
	  }
	  return true ;
	} 
	
	function checkform2 (The_Variable,The_Length,The_Length2)
	{
	
	  if (The_Variable.length < The_Length || The_Variable.length > The_Length2) {
	    alert( "This must be between "+The_Length+" and "+The_Length2+" digits." );
	    return false ;
	  }
	  return true ;
	}
