function fnValidateForm(me)
{
	with(me)
	{
		//check either the email or telephone fields are populated
		if(user_email.value.length<1 && user_phone.value.length<1)
		{
			alert('Please enter an email address, telephone number, or both, to which we can reply')
			user_email.focus();
			return false;
		}
		//check email address for validity
		if(!user_email.value=='')
		{
			var ep = /^([a-zA-Z0-9_.-])+@(([a-zA-Z0-9-])+\.)+([a-zA-Z0-9]{2,4})$/;
			var b=ep.test(user_email.value);
			if(!b)
			{
				alert('This email address appears to be invalid');
				user_email.focus();
				return false;
			}
			//check email for consistency
			b=false;
			ep = new RegExp(check_email.value);
			b=ep.test(user_email.value);
			if(b)
			{
				ep = new RegExp(user_email.value);
				b=ep.test(check_email.value);
			}
			if(!b)
			{
				alert('Please check the spelling of your email address');
				user_email.focus();
				return false;
			}
		}		
		if(mail_subject.value.length<1)
		{
			alert('Please enter a subject line');
			mail_subject.focus();
			return false;
		}
					
		if(mail_text.value.length<1)
		{
			alert('Please enter your message text');
			mail_text.focus();
			return false;
		}
					
		if(!user_phone.value=='')
		{
			//check phone number for consistency
			b=false;
			ep = new RegExp(check_phone.value);
			b=ep.test(user_phone.value);
			if(b)
			{
				ep = new RegExp(user_phone.value);
				b=ep.test(check_phone.value);
			}
			if(!b)
			{
				alert('Please make sure the phone number is correct');
				user_phone.focus();
				return false;
			}
		}		
	}
	//alert('Finished Checking Form');
	return true;
}
