// $Header: /HBI Websites/websites/beta/BETA.HIREDIVERSITY.COM/_client/js/validate_email.js 1     9/06/07 11:49a Ricardo.peinado $
// requires include.js
include("is_valid_email");

function validate_email(form)
{	var aok = true;
	var alert_text = "";

	if (!is_valid_email(form.email.value))
	{	var confirm_prompt =
			"The email address you entered:\n" +
			form.email.value + "\n" +
			"appears invalid.  Use anyway?";
		if (!confirm(confirm_prompt))
		{	aok = false;
			alert_text += "Please check your email address and retry.\n"
		}
	}

	if (!aok)
	{	alert(alert_text);
	}

	return aok;
}
