<!--
function ValidateEmailForm(objForm)
{
	if(objForm.elements["txtEmailAddress"].value.length == 0)
	{
		alert("please provide a valid email address.");
		return false;
	}
	else
	{
		if(!IsValidEmailAddress(objForm.elements["txtEmailAddress"].value))
		{
			alert("please provide a valid email address.");
		return false;
		}
		
		return true;
	}
}

function ValidateRegisterForm(objForm)
{
	var strErrors = "";
	
	if(objForm.elements["txtForename"].value.length == 0)
	{
		strErrors += "Please provide your forename.\n";
	}
	
	if(objForm.elements["txtSurname"].value.length == 0)
	{
		strErrors += "Please provide your surname.\n";
	}
	
	if(objForm.elements["txtEmailAddress"].value.length == 0)
	{
		strErrors += "Please provide your email addrress.\n";
	}
	
	if(strErrors)
	{
		alert("Please correct the following errors:\n\n" + strErrors);
		return false;
	}
	else
	{
		return true;
	}
}

function IsValidEmailAddress(strEmailAddressToCheck)
{
	var strEmailAddress = new String(strEmailAddressToCheck)
	if(strEmailAddress.indexOf("@") < 1 || strEmailAddress.indexOf("@") == (strEmailAddress.length - 1) || strEmailAddress.indexOf(".") == -1)
	{
		return false;
	}
	else
	{
		return true;
	}
}

function Clear(objTextBox)
{
	objTextBox.value = "";
}
//-->