function validateForm() {
      var okSoFar=true  //*** Changes to false when bad field found.
	  
	  
	 
      
	    //** Check the  field.
      if (document.myForm.fname.value=="" && okSoFar) {
         okSoFar=false
         alert("Please fill in your First Name")
         document.myForm.fname.focus()
      }
	  
	  
	      //** Check the  field.
      if (document.myForm.lname.value=="" && okSoFar) {
         okSoFar=false
         alert("Please fill in your Last Name")
         document.myForm.lname.focus()
      }
	  
	        //** Check the  field ad1.
      if (document.myForm.ad1.value=="" && okSoFar) {
         okSoFar=false
         alert("Please fill in your Address Line 1")
         document.myForm.ad1.focus()
      }
	  
	        //** Check the  field.
      if (document.myForm.city.value=="" && okSoFar) {
         okSoFar=false
         alert("Please fill in your City")
         document.myForm.city.focus()
      }

	        //** Check the  field.
      if (document.myForm.prov.value=="" && okSoFar) {
         okSoFar=false
         alert("Please fill in your Province / State")
         document.myForm.prov.focus()
      }

	  
	          //** Check the  field.
      if (document.myForm.country.value=="" && okSoFar) {
         okSoFar=false
         alert("Please fill in your Country")
         document.myForm.country.focus()
      }
	  
	            //** Check the  field.
      if (document.myForm.postcode.value=="" && okSoFar) {
         okSoFar=false
         alert("Please fill in your Postal Code")
         document.myForm.postcode.focus()
      }
       	  
	  
      //** Check the field.
      if (document.myForm.membtype.value==null || document.myForm.membtype.value=="" && okSoFar) {
         okSoFar=false
         alert("Please pick a Type of Membership")
         document.myForm.membtype.focus()
      }
       	
		
	if (isNumeric(document.myForm.FAF.value) == false && okSoFar) 
      {
	  okSoFar = false 
      alert("Sorry, Donations must be a numeric value.");
	   document.myForm.FAF.focus()
      }
	  
	  if (isNumeric(document.myForm.SMMF.value) == false && okSoFar) 
      {
	  okSoFar = false 
      alert("Sorry, Donations must be a numeric value.");
	   document.myForm.SMMF.focus()
      }
	  
    if (isNumeric(document.myForm.RAMP.value) == false && okSoFar) 
      {
	  okSoFar = false 
      alert("Sorry, Donations must be a numeric value.");
	   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; 
} 
} 
   