function checkform() {

	if (document.lost_form.your_name.value.length < 4){
	alert("Sorry, you must enter your full name");
	return false;
	}
	
	if (document.lost_form.your_area.selectedIndex == 0){
	alert("Sorry, you must enter your location");
	return false;
	}
		
	rePhone = new RegExp(/[1-9]/);
	if (!rePhone.test(lost_form.your_phone.value)) {
	alert("Sorry, you must enter a valid telephone number");
	return false;
	}
	
	if (document.lost_form.your_email.value.length < 6){
	alert("Sorry, you must enter your email address");
	return false;
	}
	if (!/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(lost_form.your_email.value)){
	alert("Sorry, you must enter a valid email address");
	return false;
	}
	
		
	var myRegExp = /http|www|url|fuck|twat|wanker/;
	var value_a = document.lost_form.dogs_desc.value;
		var string1 = value_a;
		var matchPos1 = string1.search(myRegExp);
		if((matchPos1 != -1) || (document.lost_form.dogs_desc.value == ""))
		  {
	alert("You need to input a comment or your comment contains illegal characters or words, you cannot use http language, url links, emails or abusive words or references which we feel is un suitable for this post.\r As an example: Fido is aged 5, he is a tri-coloured border collie. His front right leg is pure white all the others are tan coloured, his left ear flops down. He goes mad when he sees a tennis ball. He was last seen in the area of Belthorn near Blackburn in Lancashire. His chip number is 0123456789.");
	return false;
	}
	if (document.lost_form.uploadedfile.value.length < 3){
	alert("Sorry, you must a a photograph of your dog");
	return false;
	}
return ray.ajax();
}
