function checkform()
{
	var thisForm = document.bes3form;
	// reg exp values
	var emailreg = /^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;
	var telreg = /^([+0-9 ]{8,32})$/;
	
	// check name is not empty
	if (thisForm.name.value == "" || thisForm.name.value == null)
	{
		
		alert('You must enter your name.');
		thisForm.name.focus();
		return false;
	}
	
	// check company name is not empty
	if (thisForm.company.value == "" || thisForm.company.value == null)
	{
		alert('You must enter your company name.');
		thisForm.company.focus();
		return false;
	}
	
	// check email address is not empty
	if (thisForm.email.value == "" || thisForm.email.value == null)
	{
		alert('You must enter your email address.');
		thisForm.email.focus();
		return false;
	}
	// check email address in valid format
	if (emailreg.test(thisForm.email.value) == false)
	{
		alert('The email address does not appear to be valid.\nPlease check and try again.');
		thisForm.email.focus();
		return false;
	}
	
	// check telephone number is not empty
	if (thisForm.telephone.value == "" || thisForm.telephone.value == null)
	{
		alert('You must enter your telephone number.');
		thisForm.telephone.focus();
		return false;
	}
	// check telephone number is in valid format
	if (telreg.test(thisForm.telephone.value) == false)
	{
		alert('The telephone number does not appear to be valid.\nPlease check and try again.');
		thisForm.telephone.focus();
		return false;
	}
}