<!--
function showDisclaimer()
{
   h = 260;
   w = 760;

   LeftPosition = (screen.width) ? (screen.width-w)/2 : 10;
   TopPosition = (screen.height) ? (screen.height-h)/3 : 10;
   settings = "height="+h+",width="+w+",top="+TopPosition+",left="+LeftPosition+",scrollbars=no,resizable=yes";

   window.open('disclaimer_pop.php','disclaimer',settings)
}

function validate(form)
{
   var thisDate = new Date();
   var addressLength = form.address.value.length;
   
   if(stripWhiteSpace(form.firstname.value)=="")
   {
      alert("Please enter your firstname");
	  form.firstname.focus();
	  return false;	  
   }
   else if(stripWhiteSpace(form.lastname.value)=="")
   {
      alert("Please enter your lastname");
	  form.lastname.focus();
	  return false;	  
   }
   genderSelected = false;
   for (counter = 0; counter < form.gender.length; counter++)
   {
      if (form.gender[counter].checked)
      genderSelected = true; 
   }
   if(!genderSelected)
   {
      alert("Please select your gender");
	  return false;
   }
   else if(stripWhiteSpace(form.day.value)=="")
   {
      alert("Please enter the day part of your date of birth");
	  form.day.select();
	  return false;	  
   }
   else if(!IsNumeric(form.day.value))
   {
      alert("The day part of your date of birth should contain numbers only");
	  form.day.select();
	  return false;	  
   }
   else if(stripWhiteSpace(form.month.value)=="")
   {
      alert("Please enter the month part of your date of birth");
	  form.month.focus();
	  return false;	  
   }
   else if(!IsNumeric(form.month.value))
   {
      alert("The month part of your date of birth should contain numbers only");
	  form.month.select();
	  return false;	  
   }
   else if(stripWhiteSpace(form.year.value)=="")
   {
      alert("Please enter the year part of your date of birth");
	  form.year.focus();
	  return false;	  
   }
   else if(!IsNumeric(form.year.value))
   {
      alert("The year part of your date of birth should contain numbers only");
	  form.year.select();
	  return false;	  
   }
   else if(form.month.value < 1 || form.month.value > 12)
   {
      alert("Please enter the month part of your Date of Birth in the range [1 - 12]");
	  form.month.select();
	  return false;
   }
   else if(form.year.value < thisDate.getUTCFullYear()-90 || form.year.value > thisDate.getUTCFullYear()-17)
   {
	  lowerDate = thisDate.getYear()-90+'';
	  upperDate = thisDate.getYear()-17+'';
	  
      alert("Please enter the year part of your Date of Birth in the range ["+lowerDate+" - "+upperDate+"]");
	  form.year.select();
	  return false;
   }
   else if(!checkValidDay(form))
   {
      return false;
   }
   else if (addressLength > 255)
   {
      alert("The address text cannot exceed 255 characters. It currently contains "+addressLength+" characters");
      form.address.select();
	  return false;
   }
   else if(stripWhiteSpace(form.mobile.value)=="")
   {
      alert("Please enter your mobile phone number");
	  form.mobile.focus();
	  return false;	  
   }
   else if(containsIllegalChars(form.mobile.value))
   {
      alert("The mobile number entered contains one or more instances of the following illegal characters: \" \' \\ /");
	  form.mobile.select();
	  return false;	  
   }
   else if(stripWhiteSpace(form.email.value)=="")
   {
      alert("Please enter your email address");
	  form.email.focus();
	  return false;	  
   }
   else if(!isEmailAddr(form.email.value))
   {
      alert("Please enter your email address in the format _@_._");
	  form.email.select();
	  return false;	
   }
   else if(containsIllegalChars(form.email.value))
   {
      alert("The email address entered contains one or more instances of the following illegal characters: \" \' \\ /");
	  form.email.select();
	  return false;	  
   }
   else if(form.countyID.value=="null")
   {
      alert("Please select the county you live in from the drop down menu");
	  form.countyID.focus();
	  return false;	
   }
   else if(form.countyWorkID.value=="null")
   {
      alert("Please select the county you work in from the drop down menu");
	  form.countyWorkID.focus();
	  return false;	
   }
   else if(stripWhiteSpace(form.username.value)=="")
   {
      alert("Please enter your preferred username");
	  form.username.focus();
	  return false;	  
   }
   else if(containsIllegalChars(form.username.value))
   {
      alert("The username entered contains one or more of the following illegal characters.\n\" \' \\ /. To proceed, please remove illegal characters");   
	  form.username.select();
	  return false;	
   }
   else if(stripWhiteSpace(form.password.value)=="")
   {
      alert("Please enter your login password");
	  form.password.focus();
	  return false;	  
   }
   else if(containsIllegalChars(form.password.value))
   {
      alert("The password entered contains one or more of the following illegal characters.\n\" \' \\ /. To proceed, please re-enter your login passwords");   
	  form.password.value="";
	  form.password.focus();
	  return false;	
   }
   else if(stripWhiteSpace(form.passwordC.value)=="")
   { 
      alert("Please confirm your login password");
	  form.passwordC.focus();
	  return false;	  
   }
   else if(containsIllegalChars(form.passwordC.value))
   {
      alert("The confirmed password entered contains one or more of the following illegal characters.\" \' \\ / space character. To proceed, please re-confirm your login passwords");   
	  form.passwordC.value="";
	  form.passwordC.focus();
	  return false;	
   }
   else if(form.password.value != form.passwordC.value)
   {
      alert("The two passwords entered do not match, please re-enter your login passwords");
	  form.password.value="";
	  form.passwordC.value="";
	  form.password.focus();
	  return false;
   }
   else if(stripWhiteSpace(form.txtsp.value)=="")
   {
      alert("Please enter the relevant numeric value in the Spam Control box");
	  form.txtsp.focus();
	  return false;	  
   }
   else if(!form.disclaimer.checked)
   {
      alert("Please check the box to confirm that you have read and accept our disclaimer");
	  return false;
   }
    
return true;
}

//function putFocus()
//{
//   document.form1.firstname.focus();
//}
//-->

