// JavaScript Document

// handles double-clicking the submission
bolClicked = false;

function validateForgotPasswordForm (objForm)
{
	var strError = "";
	var objFocus = null;
	
	if ( !trim(objForm.EmailAddress.value) )
	{
		strError += " - Missing Email Address\t\n";
		if (objFocus == null) objFocus = objForm.EmailAddress;
	}
	else if ( !validateEmailAddress(trim(objForm.EmailAddress.value)) )
	{
		strError += " - Invalid Email Address\t\n";
		if (objFocus == null) objFocus = objForm.EmailAddress;
	}
	
	if ( strError )
	{
		window.alert("Your submission has the following error(s):\t\n\n" + strError + "\nPlease correct and resubmit.");
		objFocus.focus();
		return false;
	}
	
	if ( bolClicked )
		return false;
	else
		bolClicked = true;
		
	return true;
	
} //() :boolean