function validateRegistration() {
	if(document.getElementById('mailing_name').value == "") {
		alert('You need to enter your name');
		document.getElementById('mailing_name').focus();
		return false;
	}
	if(document.getElementById('mailing_email').value == "") {
		alert('You need to enter your email address');
		document.getElementById('mailing_email').focus();
		return false;
	}
	if (validate_email(document.getElementById('mailing_email'),'The email address you entered is not valid') == false){
		return false;
	}
	return true;
}

function validate_email(field,alerttxt)
{
with (field)
{
apos=value.indexOf("@");
dotpos=value.lastIndexOf(".");
if (apos<1||dotpos-apos<2) 
  {alert(alerttxt);return false;}
else {return true;}
}
}
