function Validate(theForm){
  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.Title){
	  if (theForm.Title.value == "" || theForm.Title.value.search(invalChars)!=-1 || theForm.Title.value.search(invalStrs)!=-1 || theForm.Title.value.length<2 || theForm.Title.value.length>10){
		alert("Please enter your Title.");
		theForm.Title.select();
		return (false);
	  }
  }
  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.Name){
	  if (theForm.Name.value == "" || theForm.Name.value.search(invalChars)!=-1 || theForm.Name.value.search(invalStrs)!=-1 || theForm.Name.value.length<2){
		alert("Please enter your Name.");
		theForm.Name.select();
		return (false);
	  }
  }
//  if (theForm.Company){
//	  if (theForm.Company.value == "" || theForm.Company.value.search(invalChars)!=-1 || theForm.Company.value.length<2){
//		alert("Please enter your Company name.");
//		theForm.Company.select();
//		return (false);
//	  }
//  }
  if (theForm.Address1){
	  if (theForm.Address1.value == "" || theForm.Address1.value.search(invalChars)!=-1 || theForm.Address1.value.search(invalStrs)!=-1 || theForm.Address1.value.length<2){
		alert("Please enter your Street Address.");
		theForm.Address1.select();
		return (false);
	  }
  }
  if (theForm.Town){
	  if (theForm.Town.value == "" || theForm.Town.value.search(invalChars)!=-1 || theForm.Town.value.search(invalStrs)!=-1 || theForm.Town.value.length<2){
		alert("Please enter your Town.");
		theForm.Town.select();
		return (false);
	  }
  }
  if (theForm.Phone){
	  if (theForm.Phone.value == "" || theForm.Phone.value.search(invalChars)!=-1 || theForm.Phone.value.search(invalTel)!=-1 || theForm.Phone.value.search(invalStrs)!=-1 || theForm.Phone.value.length<11){
		alert("Please enter a valid Phone Number.");
		theForm.Phone.select();
		return (false);
	  }

  }
  if (theForm.email){
	  if (theForm.email.value == ""){
		alert("Please enter a valid email address.");
		theForm.email.select();
		return (false);
	  }

  }
  if (theForm.Website){
	  if (theForm.Website.value == "" || theForm.Website.value.length<12){
		alert("Please enter a valid website address.");
		theForm.Website.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.codeEntry){
	  if (theForm.codeEntry.value == "" || theForm.codeEntry.value.search(invalChars)!=-1 || theForm.codeEntry.value.search(invalStrs)!=-1 || theForm.codeEntry.value.length<5 || theForm.codeEntry.value.length>5){
		alert("Please enter the code exactly as shown below.");
		theForm.codeEntry.select();
		return (false);
	  }
  }
  if (theForm.myKey){
	  if (theForm.myKey.value == "" || theForm.myKey.value.search(invalChars)!=-1 || theForm.myKey.value.search(invalStrs)!=-1 || theForm.myKey.value.length<6 || theForm.myKey.value.length>12){
		alert("Please enter the verification code exactly as shown in your email.");
		theForm.myKey.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);
	  }
  }



//	Enable this for radio buttons if required

//  if (!(theForm.radioname[0].checked || theForm.radioname[1].checked)){
//    alert("Please indicate your radioname.");
//    theForm.radioname[0].focus();
//    return (false);
//  }


  if (theForm.email){
  	return (emailCheck(theForm.email.value)); 								//validate using routines in validemail.js
  }
  return (true);
}
