function validate_nl_sub ()
{
	var empty_fields = "";
	var errors = "";
	var msg;
	var num_errs = 0;

	var first = document.nl_sub_form.first_name.value;
	var last = document.nl_sub_form.last_name.value;
	var email = document.nl_sub_form.email.value;

	if (isblank (first)) {
		empty_fields += "\n* First name";
		num_errs++;
	}
	if (isblank (last)) {
		empty_fields += "\n* Last name";
		num_errs++;
	}
	if (isblank (email)) {
		empty_fields += "\n* Email address";
		num_errs++;
	}

	if (!isemail (email)) {
		errors += "\nThe email address is not valid.";
		num_errs++;
	}

	if (num_errs == 0)
		return (true);
	else {
		msg  = "__________________________________________________\n\n"
		msg += "The form was not submitted because of the following error(s).\n"
		msg += "Please correct these error(s) and re-submit.\n";
		msg += "__________________________________________________\n\n"
	}

	if (empty_fields) {
		msg += "The following required field(s) are empty:" + empty_fields + "\n";
		if (errors)
			msg += "\n";
	}
	msg += errors;
	alert (msg);

	return (false);
}
