function validate (f) {
		var error="";
		
		if(checkBlanks(f.question)) {
			error+="Please answer the question\n";
		}
		if(checkBlanks(f.firstname)) {
			error+="Please enter your first name\n";
		} 
		if(checkBlanks(f.surname)) {
			error+="Please enter your second name\n";
		}
		if(checkBlanks(f.address)) {
			error+="Please enter your address\n";
		}
		if(checkBlanks(f.post)) {
			error+="Please enter your postcode\n";
		}
		if(checkBlanks(f.tele)) {
			error+="Please enter your telephone number\n";
		}   
		if(checkBlanks(f.email)) {
			error+="Please enter your email address\n";
		} else {
			if(isemail(f.email)) {
				error+="The email address you have entered is not valid\n";
			}
		}
		if(!f.tandc.checked) {
			error+="You must read the terms and conditions before you can enter\n";
		}
		
	if(error!="") {
		alert(error);
		return false
	} else {
		return true;
	}
	
	}
	
	function checkBlanks(e) {
		if(e.value=="" ||e.value==" " || e.value=="\n") {
			return true;
		} else {
			return false;
		}	
	}
	
	function isemail(e){
		if(e.value.indexOf("@")==-1 ||e.value.indexOf(".")==-1) {
			return true;
		} else {
			return false;
		}	
	}