// JavaScript Document


function contactus(theForm) {
	var errormess = "";
	var theValue;
	theValue = document.forms[theForm].elements['name'].value;
	if (alltrim(theValue) == "") {
			errormess += "Please tell us your name.\n\n";
	}
	
	theValue = document.forms[theForm].elements['address'].value + document.forms[theForm].elements['telephone'].value + document.forms[theForm].elements['email'].value;
	if (alltrim(theValue) == "") {
			errormess += "Please give us a telephone number, E:mail or postal address so we can contact you.\n\n";
	}
	
	theValue = document.forms[theForm].elements['email'].value;
	if (alltrim(theValue) !== "") {
		if (!isValidEmail(alltrim(theValue))) {
			errormess += "Your E:mail address is not correct.\n\n";
		}
	}
	
	theValue = document.forms[theForm].elements['strCAPTCHA'].value;
	if (alltrim(theValue) == "") {
			errormess += "Please enter the code number.\nThis helps prevent automated submissions.\n\n";
	}
	
	if (errormess) {
		alert("Please check your message form.\n\n" + errormess);
		return;
	}
	else { 
		document.getElementById(theForm).submit();
		
	}


}// end saveBrandForm



