<!-- Code after this will be ignored by older browsers

var dom = document.getElementById;
var ie = document.all;
var ns4 = document.layers;
var intSubmitCount = 0;

function SubmitOnce()
{
	if (intSubmitCount == 0)
	{
		intSubmitCount++;
		
		return true;
	}
	else 
	{
		return false;
	}
}

function validateForm(theform)
{
	var strEmail = theform.email.value;
	var strVerifyEmail = theform.verifyemail.value;
	var strAuthEmail = theform.authemail.value;
	var strPassword = theform.password.value;
	var strVerify = theform.verify.value;
	var strFirstName = theform.firstname.value;
	var strLastName = theform.lastname.value;
	var strInitials = theform.initials.value;
	var strCode = theform.authcode.value;
	var strErrorMsg = '';
		
	if ((!strEmail) || (!strVerifyEmail) || (!strPassword) || (!strVerify) || (!strFirstName) || (!strLastName) || (!strInitials) || (!strCode))
	{
		if (!strEmail)
		{
			strErrorMsg = strErrorMsg + '- You have not entered your email address.\n';
		}
		if (!strVerifyEmail)
		{
			strErrorMsg = strErrorMsg + '- You have not verified your email address.\n';
		}
		if (!strPassword)
		{
			strErrorMsg = strErrorMsg + '- You have not entered a password.\n';
		}
		if (!strVerify)
		{
			strErrorMsg = strErrorMsg + '- You have not verified your password.\n';
		}
		if (!strFirstName)
		{
			strErrorMsg = strErrorMsg + '- You have not entered your first name.\n';
		}
		if (!strLastName)
		{
			strErrorMsg = strErrorMsg + '- You have not entered your last name.\n';
		}
		if (!strInitials)
		{
			strErrorMsg = strErrorMsg + '- You have not entered your initials.\n';
		}
		if (!strCode)
		{
			strErrorMsg = strErrorMsg + '- You have not entered the authentication code.\n';
		}
	}
		
	if ((strEmail) && (strVerifyEmail) && (strEmail != strVerifyEmail))
	{
		strErrorMsg = strErrorMsg + '- The email address and verify email values do not match.\n';
	}

	if ((strPassword) && (strVerify) && (strPassword != strVerify))
	{
		strErrorMsg = strErrorMsg + '- The password and verify password values do not match.\n';
	}
	
	if (strPassword)
	{
		if ((strPassword.length < 8) || (strPassword.length > 20))
		{
			strErrorMsg = strErrorMsg + '- The password must be between 8 and 20 characters in length.\n';
		}
	}
			
	if (!strErrorMsg)
	{
		if ((strAuthEmail) && (strAuthEmail!=strEmail))
		{
			userResponse = confirm("Your email address has changed - are you sure you want to save these details?\n\nPlease ensure the new email address entered is correct and accessible.");

			if (userResponse)
			{	
				return SubmitOnce();
			}
			else
			{
				return false;
			}
		}
		else
		{
			return SubmitOnce();
		}
	}
	else
	{
		alert ('Unable to submit your registration details:\n\n' + strErrorMsg);
		
		return false;
	}
}

function setInitials()
{
	var strFirstName = document.userform.firstname.value;
	var strLastName = document.userform.lastname.value;
	var strInitials = "";
		
	if ((strFirstName) || (strLastName))
	{
		if (strFirstName)
		{
			strInitials = strFirstName.substring(0, 1)
		}
	
		if (strLastName)
		{
			strInitials += strLastName.substring(0, 1)
		}

		if (strInitials)
		{
			document.userform.initials.value = strInitials;
		}
	}
}

// Stop hiding the code here -->
