function submitform() {
	// copy all fields in hidden form
	document.hidden_form.title.value = document.user_form.title.value;
	document.hidden_form.name.value = document.user_form.name.value;
	document.hidden_form.firstname.value = document.user_form.firstname.value;
	document.hidden_form.address.value = document.user_form.address.value;
	document.hidden_form.postcode.value = document.user_form.postcode.value;
	document.hidden_form.city.value = document.user_form.city.value;
	document.hidden_form.telephone.value = document.user_form.telephone.value;
	document.hidden_form.mobile.value = document.user_form.mobile.value;
	document.hidden_form.fax.value = document.user_form.fax.value;
	document.hidden_form.email.value = cleanedemail;
	document.hidden_form.remarks.value = document.user_form.remarks.value;

	document.hidden_form.submit();
}
// controls this is a valid email (if there is one) and returns the cleaned email
function ctrlemail(emailtxt) {
	// removes %20, %0A, \r and \n
	forbid = new Array("%0A","%0a","%20","\r","\n","\R","\N");
	for(i=0;i<forbid.length;i++) {
		pos = emailtxt.indexOf(forbid[i]);
		emailtxt = (pos>=0?emailtxt.substring(0,pos):emailtxt);
	}

	if(emailtxt=="") {
		return '';
	}

	if(emailtxt.search(' ')>=0) {
		return false;
	}
	posarobace = emailtxt.search('@');
	poslastdot = emailtxt.lastIndexOf('.');
	if((poslastdot<0)||(poslastdot<posarobace)||(posarobace<0)) {
		return false;
	}

	return(emailtxt);
}
function ctrlmsg() {
	if((document.user_form.name.value + document.user_form.firstname.value + document.user_form.remarks.value)=='') {
		return false;
	}
	return true;
}