function form_check() {
	var sub = 0;
	var claimval = '';
	var error_message = "Please correct the following form errors:\n";
	var temp = new Array();
	var consolidation = new Array();
	if (document.getElementById('contactform').nameinput.value.length < 1) { error_message += "Name is a required field\n"; sub++; }
	var email = /^[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~](\.?[-!#$%&'*+\/0-9=?A-Z^_a-z{|}~])*@\S+$/;
	if (document.getElementById('contactform').emailinput.value.length > 0) { if (!document.getElementById('contactform').emailinput.value.match(email)) { error_message += "Please enter a valid email address\n"; sub++; } } else { error_message += "Email address is a required field\n"; sub++; }
	var emailwww = /^www\..+/;
	if (document.getElementById('contactform').emailinput.value.match(emailwww)) { alert("While it is possible for your email address to start with www. it's unlikey that it does. You should try sending yourself a test message before submitting the form."); }
	if (document.getElementById('contactform').telephoneinput.value.length < 1) { error_message += "Telephone contact number is a required field\n"; sub++; }
	if (document.getElementById('contactform').contactinput.value.length < 1) { error_message += "Message is a required field\n"; sub++; }
	if (sub==0) { document.getElementById('contactform').submit(); } else { alert(error_message); return false; }
}

