function ValidateFB(theForm){ //used for feedback and job opportunities
  var invalDat="00/00/00";
  var valDat="^([0-9]{2})/([0-9]{2})/([0-9]{4})$";
  var invalTel=/[a-z|A-Z]/;
  var invalChars=/[\\\[\]@<>]/;
  var invalStrs="http|HTTP|www|WWW|viagra|VIAGRA";
  
  if (theForm.Forename){
	  if (theForm.Forename.value == "" || theForm.Forename.value.search(invalChars)!=-1 || theForm.Forename.value.search(invalStrs)!=-1 || theForm.Forename.value.length<2){
		alert("Please enter your Forename.");
		theForm.Forename.select();
		return (false);
	  }
  }
  if (theForm.Surname){
	  if (theForm.Surname.value == "" || theForm.Surname.value.search(invalChars)!=-1 || theForm.Surname.value.search(invalStrs)!=-1 || theForm.Surname.value.length<2){
		alert("Please enter your Surname.");
		theForm.Surname.select();
		return (false);
	  }
  }
  if (theForm.Phone){ // used for feedback
	  if (theForm.Phone.value.search(invalChars)!=-1 || theForm.Phone.value.search(invalTel)!=-1 || theForm.Phone.value.search(invalStrs)!=-1){
		alert("Please enter a valid Phone Number.");
		theForm.Phone.select();
		return (false);
	  }
  }
  if (theForm.Phone2){ // used for job opportunities
	  if (theForm.Phone2.value == "" || theForm.Phone2.value.search(invalChars)!=-1 || theForm.Phone2.value.search(invalTel)!=-1 || theForm.Phone2.value.search(invalStrs)!=-1){
		alert("Please enter a valid Phone Number.");
		theForm.Phone2.select();
		return (false);
	  }
  }
  if (theForm.Email){
	  if (theForm.Email.value == "" || theForm.Email.value == "Email Address"){
		alert("Please enter a valid email address.");
		theForm.Email.select();
		return (false);
	  }
  }
  if (theForm.Q1){
	  if (theForm.Q1.value == "" || theForm.Q1.value.search(invalChars)!=-1 || theForm.Q1.value.search(invalStrs)!=-1){
		alert("Please enter your answer to Q1 without any special characters or html mark-up.");
		theForm.Q1.select();
		return (false);
	  }
  }
  if (theForm.Q2){
	  if (theForm.Q2.value == "" || theForm.Q2.value.search(invalChars)!=-1 || theForm.Q2.value.search(invalStrs)!=-1){
		alert("Please enter your answer to Q2 without any special characters or html mark-up.");
		theForm.Q2.select();
		return (false);
	  }
  }
  if (theForm.Q3){
	  if (theForm.Q3.value == "" || theForm.Q3.value.search(invalChars)!=-1 || theForm.Q3.value.search(invalStrs)!=-1){
		alert("Please enter your answer to Q3 without any special characters or html mark-up.");
		theForm.Q3.select();
		return (false);
	  }
  }
  if (theForm.Q4){
	  if (theForm.Q4.value == "" || theForm.Q4.value.search(invalChars)!=-1 || theForm.Q4.value.search(invalStrs)!=-1){
		alert("Please enter your answer to Q4 without any special characters or html mark-up.");
		theForm.Q4.select();
		return (false);
	  }
  }
  if (theForm.Q5){
	  if (theForm.Q5.value == "" || theForm.Q5.value.search(invalChars)!=-1 || theForm.Q5.value.search(invalStrs)!=-1){
		alert("Please enter your answer to Q5 without any special characters or html mark-up.");
		theForm.Q5.select();
		return (false);
	  }
  }
  if (theForm.Q6){
	  if (theForm.Q6.value == "" || theForm.Q6.value.search(invalChars)!=-1 || theForm.Q6.value.search(invalStrs)!=-1){
		alert("Please enter your answer to Q6 without any special characters or html mark-up.");
		theForm.Q6.select();
		return (false);
	  }
  }
  if (theForm.Q7){
	  if (theForm.Q7.value == "" || theForm.Q7.value.search(invalChars)!=-1 || theForm.Q7.value.search(invalStrs)!=-1){
		alert("Please enter your answer to Q7 without any special characters or html mark-up.");
		theForm.Q7.select();
		return (false);
	  }
  }
  if (theForm.Q8){
	  if (theForm.Q8.value == "" || theForm.Q8.value.search(invalChars)!=-1 || theForm.Q8.value.search(invalStrs)!=-1){
		alert("Please enter your answer to Q8 without any special characters or html mark-up.");
		theForm.Q8.select();
		return (false);
	  }
  }
  if (theForm.Q9){
	  if (theForm.Q9.value == "" || theForm.Q9.value.search(invalChars)!=-1 || theForm.Q9.value.search(invalStrs)!=-1){
		alert("Please enter your answer to Q9 without any special characters or html mark-up.");
		theForm.Q9.select();
		return (false);
	  }
  }
  if (theForm.Q10){
	  if (theForm.Q10.value == "" || theForm.Q10.value.search(invalChars)!=-1 || theForm.Q10.value.search(invalStrs)!=-1){
		alert("Please enter your answer to Q10 without any special characters or html mark-up.");
		theForm.Q10.select();
		return (false);
	  }
  }
  if (theForm.Q11){
	  if (theForm.Q11.value == "" || theForm.Q11.value.search(invalChars)!=-1 || theForm.Q11.value.search(invalStrs)!=-1){
		alert("Please enter your answer to Q11 without any special characters or html mark-up.");
		theForm.Q11.select();
		return (false);
	  }
  }
  if (theForm.Q12){
	  if (theForm.Q12.value == "" || theForm.Q12.value.search(invalChars)!=-1 || theForm.Q12.value.search(invalStrs)!=-1){
		alert("Please enter your answer to Q12 without any special characters or html mark-up.");
		theForm.Q12.select();
		return (false);
	  }
  }
  if (theForm.Q13){
	  if (theForm.Q13.value == "" || theForm.Q13.value.search(invalChars)!=-1 || theForm.Q13.value.search(invalStrs)!=-1){
		alert("Please enter your answer to Q13 without any special characters or html mark-up.");
		theForm.Q13.select();
		return (false);
	  }
  }
  if (theForm.Comments){
	  if (theForm.Comments.value.search(invalChars)!=-1 || theForm.Comments.value.search(invalStrs)!=-1){
		alert("Please enter your comments without any special characters or html mark-up.");
		theForm.Comments.select();
		return (false);
	  }
  }
  if (theForm.About){
	  if (theForm.About.value == "" || theForm.About.value.search(invalChars)!=-1 || theForm.About.value.search(invalStrs)!=-1){
		alert("Please enter your information without any special characters or html mark-up.");
		theForm.About.select();
		return (false);
	  }
  }
  if (theForm.CV){
	  if (theForm.CV.value == ""){
		alert("Please select a recent CV to upload.");
		theForm.CV.select();
		return (false);
	  }
  }
  if (theForm.DPN){
	  if (theForm.DPN.checked == false){
		alert("Please make sure that you read and agree to the terms in our Data Protection Notice.");
		theForm.DPNText.select();
		return (false);
	  }
  }
  if (theForm.Email){
  	return (emailCheck(theForm.Email.value)); 								//validate using routines in validemail.js
  }
  return (true);
}
