<!--

function isValidEmail(strEmail)
{
	// This function returns true if the email is valid and false if not
	validRegExp = /^[^@]+@[^@]+.[a-z]{2,}$/i;

   // Search email text for regular expression matches
    if (strEmail.search(validRegExp) == -1) {return false;} 
    return true; 
}

function validate_required(field,alerttxt)
{
	with (field)
	{
		if (value==null||value=="")
			{alert(alerttxt);return false}
		else {return true}
	}
}

function validate_login_form(thisform)
{
	with (thisform)
	{				
		if (validate_required(username,"Please enter your username.")==false)
			{username.focus();return false}

		if (validate_required(password,"Please enter your password.")==false)
			{password.focus();return false}
	}
}

function validate_reminder_form(thisform)
{
	with (thisform)
	{		
		if (validate_required(email,"Please provide the e-mail address registered with the system for administrative contact.")==false)
					{email.focus();return false}

		if (!isValidEmail(email.value))
					{alert("Sorry but the e-mail address provided isn't valid.\n\nPlease check it and try again.");
					email.focus();return false;}
	}
}

//-->