function isblank(s)
{
	for(var i = 0; i < s.length; i++)
	{
		var c = s.charAt(i);
		if ((c != ' ') && (c != '\n') && (c != '\t')) return false;
	}
	return true;
}

function verify(f)
{
	var msg;
	var errors = "";
	var valemail = /^[\w-]+(\.[\w-]+)*@([\w-]+\.)+[a-zA-Z]{2,7}$/;
	
	if (isblank(document.list.email.value))
	 errors = "You cannot leave the email address field blank.\n";
	if ((!isblank(document.list.email.value)) && (!document.list.email.value.match(valemail)))
		errors = "You must enter a valid email address (user@domain.name).\n";
	if (!errors) return true;
	msg = "______________________________________________________________\n\n";
	msg += "The form was not submitted because of the following error(s).\n";
	msg += "Please correct your entries and re-submit.\n";
	msg += "______________________________________________________________\n\n";
	msg += errors;
	alert(msg);
	return false;
}

function readCookie()
{
	var cemail = getCookie("email");
	document.list.email.value = (cemail == null || cemail == "") ? "" : cemail;
	document.list.email.focus();
}
