function validate_form (theform) {

var validform = true;

if ( (theform.yourname.value.length == 0) && validform ) {
	validform = false;
	window.alert("Please enter your Name.");
	theform.yourname.focus();
}

if ( (theform.yourpostalcode.value.length == 0) && validform ) {
	validform = false;
	window.alert("Please enter your Postal Code.");
	theform.yourpostalcode.focus();
}


if ( (theform.to.value.length == 0) && validform ) {
	validform = false;
	window.alert("You must supply a valid email address.");
	theform.to.focus();
}

if ( (theform.to.value.indexOf(" ") != -1) && validform ) {
	validform = false;
	window.alert("Your email address cannot contain spaces. Please correct the address.");
	theform.to.focus();
}

if ( (theform.to.value.indexOf("@") == -1) && validform ) {
	validform = false;
	window.alert("Your email address must contain the '@' symbol. Please correct the address.");
	theform.to.focus();
}

if ( (theform.to.value.indexOf(".") == -1) && validform ) {
	validform = false;
	window.alert("Your email address must contain at least 1 '.'. Please correct the address.");
	theform.to.focus();
}

if ( (theform.to.value.length > 50) && validform ) {
	validform = false;
	window.alert("Your email address cannot be more than 50 characters.");
	theform.to.focus();
}



return(validform);


} // end function validate_form //
