//Form Validator
   function validator(form)
	 {
      if((form.athlete.checked)==false){
         if((form.volunteer.checked)==false){          																																													
				      if((form.host.checked)==false){
										   if((form.sponsor.checked)==false){
  	              alert("Check at least one area of interest.");
																form.athlete.focus();
																return false;
													}
										}
							}
				}
													
				if(notEmpty(form.first.value)== false){
         alert("First name is required.");
         form.first.focus();
         return false;
      }
      
				if(notEmpty(form.last.value)== false){
         alert("Last name is required.");
         form.last.focus();
         return false;
      }
			 if(notEmpty(form.address1.value)== false){
         alert("Address is required.");
         form.address1.focus();
         return false;
      }
			
			if(notEmpty(form.city.value)== false){
         alert("City is required.");
         form.city.focus();
         return false;
      }
			
			if(validateZip(form.zip.value)== false)
			{
         alert("Enter a valid zip code.");
         form.zip.focus();
         return false;
     }
			
			if(validateState(form.state.value)== false)
			{
         alert("Enter your state.");
         form.state.focus();
         return false;
      }
							
			if(validateEMail(form.email.value)==false)
			{
         alert("Enter a valid E Mail address.");
         form.email.focus();
         return false;
      }
      form.email.value = 
        strip(" \n\r\t",form.email.value);	
			
			if(validateUSPhone(form.homephone.value)==false)
			{
         alert("Enter a valid phone number.");
         form.homephone.focus();
         return false;
      }
		 if((form.accept.checked)==false){
							alert("If you do not accept the terms, your request cannot be processed.");
     							form.accept.focus();
										return false;
				}
			       
   }
	 
//Validation Rules
   function notEmpty(str){
      if(strip(" \n\r\t",str).length ==0)
         return false;
      else
         return true;
   }
   function validateInteger(str){
      str = strip(' \n\r\t',str);
      //remove leading zeros, if any
      while(str.length > 1 && str.substring(0,1) == '0'){
         str = str.substring(1,str.length);
      }
      var val = parseInt(str);
      if(isNaN(val))
         return false;
      else
         return true;
   }
   
   function validateFloat(str){
      str = strip(' \n\r\t',str);
      //remove leading zeros, if any
      while(str.length > 1 && str.substring(0,1) == '0'){
         str = str.substring(1,str.length);
      }
      var val = parseFloat(str);
      if(isNaN(val))
         return false;
      else
         return true;
   }


   function validateUSPhone(str){
      str = strip("*() -./_\n\r\t\\",str);
      if(str.length == 10 || str.length == 7)
         return true;
      else
         return false;
   }
   
   function validateZip(str){
      str = strip("- \n\r\t",str);
      if(validateInteger(str) && (str.length==9 || 
         str.length==5))
      return true;
      else
         return false;
   }

	 function validateState(str){
	    if (str == "none")
							return false;
	 }
	 
	 
   function validateEMail(str){
      str = strip(" \n\r\t",str);
      if(str.indexOf("@") > -1 && str.indexOf(".") > -1)
         return true;
      else
         return false;
   }
   //End Validation Rules
