function addLoadListener(fn)
{
	if (typeof window.addEventListener != 'undefined')
	{
		window.addEventListener('load', fn, false);
	}
	else if (typeof document.addEventListener != 'undefined')
	{
		document.addEventListener('load', fn, false);
	}
	else if (typeof window.attachEvent != 'undefined')
	{
		window.attachEvent('onload', fn);
	}
	else
	{
		var oldfn = window.onload;
		if (typeof window.onload != 'function')
		{
			window.onload = fn;
		}
		else
		{
			window.onload = function()
			{
				oldfn();
				fn();
			};
		}
	}
}


addLoadListener(validateForgotPasswordForm)

function validateForgotPasswordForm()
{
var submitClicked = document.getElementById("request_password");
var varEmail = document.getElementById("member_email");

submitClicked.onclick = function()
{
if (varEmail.value == "")
	{
	alert('Please enter an email address');
	return false;
	}

if (varEmail.value == "" || /^\s+$/.test(varEmail.value))
	{
	alert('Please enter an email address')
	return false;
	}

if (!/^[\w\.\-]+@([\w\-]+\.)+[a-zA-Z]+$/.test(varEmail.value))
	{
	alert("Please enter a valid email address");
	return false;
	}

return true;

}

}