function trim(cText) {
	while (cText.substring(0,1) == ' ') { cText = cText.substring(1,cText.length); }
	while (cText.substring(cText.length-1,cText.length) == ' ') { cText = cText.substring(0,cText.length-1); }
	return cText;
}
function emailCheck(f) {
	var filter=/^.+@.+\..{2,4}$/;
	var em = trim(f.email.value);
	
		
if (!filter.test(em)) {
		alert('Please enter a VALID email address.\n\nThis MUST NOT include spaces and is likely to be in the format yourname@yourhost.co.uk');
		return false;
	} 
	
		
	return true;
}
