function validateForm() {
      var okSoFar=true  //*** Changes to false when bad field found.
	  
	  
	 
      
	    //** Check the  field.
      if (document.myForm.fname.value=="" && okSoFar) {
         okSoFar=false
         alert("Veuillez compléter l’espace intitulé 'Prénoms'.")
         document.myForm.fname.focus()
      }
	  
	  
	      //** Check the  field.
      if (document.myForm.lname.value=="" && okSoFar) {
         okSoFar=false
         alert("Veuillez compléter l’espace intitulé 'Nom de famille'.")
         document.myForm.lname.focus()
      }

	        //** Check the  field ad1.
      if (document.myForm.ad1.value=="" && okSoFar) {
         okSoFar=false
         alert("Veuillez compléter l’espace intitulé 'Adresse ligne 1'.")
         document.myForm.ad1.focus()
      }
	  
	        //** Check the  field.
      if (document.myForm.city.value=="" && okSoFar) {
         okSoFar=false
         alert("Veuillez compléter l’espace intitulé 'Ville'.")
         document.myForm.city.focus()
      }
	  
	        //** Check the  field.
      if (document.myForm.prov.value=="" && okSoFar) {
         okSoFar=false
         alert("Veuillez compléter l’espace intitulé 'Province/État'.")
         document.myForm.prov.focus()
      }
  
	          //** Check the  field.
      if (document.myForm.country.value=="" && okSoFar) {
         okSoFar=false
         alert("Veuillez compléter l'espace intitulé 'Pays'.")
         document.myForm.country.focus()
      }
	  
	            //** Check the  field.
      if (document.myForm.postcode.value=="" && okSoFar) {
         okSoFar=false
         alert("Veuillez compléter l’espace intitulé 'Code postal'.")
         document.myForm.postcode.focus()
      }
	  
      	  
     	  	    
		  
      //** Check the field.
      if (document.myForm.membtype.value==null || document.myForm.membtype.value=="" && okSoFar) {
         okSoFar=false
         alert("Veuillez choisir une 'Catégorie de membre'.")
         document.myForm.membtype.focus()
      }
       	
		
	if (isNumeric(document.myForm.FAF.value) == false && okSoFar) 
      {
	  okSoFar = false 
      alert("Désolé, les Donations doivent être une valeur numérique.");
	   document.myForm.FAF.focus()
      }
	  
	  if (isNumeric(document.myForm.SMMF.value) == false && okSoFar) 
      {
	  okSoFar = false 
      alert("Désolé, les Donations doivent être une valeur numérique. ");
	   document.myForm.SMMF.focus()
      }
	  
    if (isNumeric(document.myForm.RAMP.value) == false && okSoFar) 
      {
	  okSoFar = false 
      alert("Désolé, les Donations doivent être une valeur numérique. ");
	   document.myForm.RAMP.focus()
      }
	  
   
	
	

	

      //** If all fields OK go ahead and submit the form and put up a message.
      if (okSoFar==true) {
         //-- Normally, the document.myForm.submit() method would execute the METHOD= and ACTION= 
         //-- attributes of the FORM tag to actually send the form to some CGI script and/or email address.
         //-- That stateent is commented out below because I don't really want to submit the
         //-- form data anywhere. This is just an example of using JavaScript to validate form field entries.
    document.myForm.submit()
         //alert ("Form has been sent. Thank you!")

      }

   }  



var numbers=".0123456789"; 
function isNumeric(x) { 
// is x a String or a character? 
if(x.length>1) { 
// remove negative sign 
x=Math.abs(x)+""; 
for(j=0;j<x.length;j++) { 
// call isNumeric recursively for each character 
number=isNumeric(x.substring(j,j+1)); 
if(!number) return number; 
} 
return number; 
} 
else { 
// if x is number return true 
if(numbers.indexOf(x)>=0) return true; 
return false; 
} 
} 
   