function isBlank(s) {
	var foundAt = s.search(/\w/);
	if (foundAt < 0) return true;
	return false;
}

function badEmail(s) {
	var foundAt = s.search(/^\s*[a-zA-Z0-9\-_\.]+@[a-zA-Z0-9\-_\.]+\.[a-zA-Z0-9\-_\.]+\s*$/);
	if (foundAt < 0) return true;
	return false;
}

function verify(f) {
	// Require name.
	if ((f.name.value == null) || (f.name.value == "") || isBlank(f.name.value)) {
		alert("Please provide your name.");
		f.name.focus();
		f.name.select();
		return false;
	}

	// Suggest email.
	var bad = false;
	var msg = "You did not enter your email address, which means I won't be able to reply to this message. Is that okay? (Click CANCEL to try again.)";
	if ((f.email.value == null) || (f.email.value == "") || isBlank(f.email.value)) {
		bad = true;
	} else if (badEmail(f.email.value)) {
		msg = "You did not enter a conventional-appearing email address (yourname@organization.nnn), which means I may not be able to reply to this message. Is that okay? (Click CANCEL to try again.)";
		bad = true;
	}
	if (bad) {
		if (!confirm(msg)) {
			f.email.focus();
			f.email.select();
			return false;
		}
	}

	// Require comments.
	if ((f.comments.value == null) || (f.comments.value == "") || isBlank(f.comments.value)) {
		alert("Please enter your comments now.");
		f.comments.focus();
		f.comments.select();
		return false;
	}

	// All okay if code reaches here.
	return true;
}
 
