function ForgotPassword(page)
{
	if( ValidateLogonForm() )
	{
		document.LogonForm.bRemindMe.value = "true";
		document.LogonForm.submit();
	}
}

function Logon()
{
	if( ValidateLogonForm() )
	{
		var sPwd1 = document.LogonForm.sPassword.value.Trim();
		if ( sPwd1 == '' )
		{
			alert( "You must enter a password!" );
			document.LogonForm.sPassword.focus();
			document.LogonForm.sPassword.select();
			return false;	
		}
		else
		{
			return true;
		}
	}
	else
		return false;
}

function ValidateLogonForm()
{
	var sEmail = document.LogonForm.sUserName.value.Trim();
	if ( sEmail == '' )
	{
		alert( "You must enter an email address!" );
		document.LogonForm.sUserName.focus();
		document.LogonForm.sUserName.select();
		return false;	
	}
	if ( !CheckValidEmail(sEmail) )
	{
		alert( "Invalid email address!" );
		document.LogonForm.sUserName.focus();
		document.LogonForm.sUserName.select();
		return false;	
	}
	return true;
}

function CheckValidEmail( sText )
{
	var strEmail = /^[a-z][\-\][a-z_0-9\.]+@[\-\][a-z_0-9\.]+\.[a-z]{1,3}$/i;
				
	if (sText != null && sText != "") 
	{ 
		if(! strEmail.test(sText)) 
		{ 
			return false; 
		} 
	} 
	return true;
}