<!--
	function isAlpha(rstrTest) {
		if (rstrTest + "" == "undefined" ||
			rstrTest + "" == "null" ||
			rstrTest + "" == "")
		{
			return false;
		}

		var isValid = true;

		rstrTest += "";

		for (i = 0; i < rstrTest.length; i++)
			{
				if (!(((rstrTest.charAt(i) >= "a") && (rstrTest.charAt(i) <= "z")) ||
				((rstrTest.charAt(i) >= "A") && (rstrTest.charAt(i) <= "Z"))))
				{
					isValid = false;
					break;
				}
			}
				return isValid;
								}

	function isValidEmail(rstrEmail) {
		var blnValid = true;
		rstrEmail += "";

		strName = rstrEmail.substring(0, rstrEmail.indexOf("@"));
		strDomain = rstrEmail.substring(rstrEmail.indexOf("@")+1, rstrEmail.length); // everything after the '@'

		if (strName.length < 1 ||
			strDomain.indexOf(".") <= 0 ||
			strDomain.indexOf("@") != -1 ||
			(!isAlpha(strDomain.substring(strDomain.length - 3, strDomain.length)) && !isAlpha(strDomain.substring(strDomain.length - 2, strDomain.length))) ||
			(strDomain.charAt(strDomain.length - 5) != '.' && strDomain.charAt(strDomain.length - 4) != '.' && strDomain.charAt(strDomain.length - 3) != '.'))
			{
				blnValid = false;
			}

			//check for spaces in the email address.
			for (i = 0; i < strName.length; i++)
				{
					if (strName.charAt(i) == " ")
					{
						alert("Spaces are not allowed in your email address.");
						blnValid = false;
						break;
					}
				
				}


				return blnValid;
			}

	function validate(theForm)
		{

		if (theForm.txtEmail.value == "")
			{
				alert("Please enter a value for the \"Email\" field.");
				theForm.txtEmail.focus();
				return (false);
			}
			else
			{
				if (!isValidEmail(theForm.txtEmail.value))
			{
				alert("The Email address is invalid.\nPlease enter a valid email address.");
				theForm.txtEmail.focus();
				return (false);
			}
			}
				return (true);
			}

	
	function validateemails(theForm)
		{
		if (theForm.txtEmail.value == "")
			{
				alert("Please enter a value for the \"Email\" fields.");
				theForm.txtEmail.focus();
				return (false);
			}
			else
			{
				if (!isValidEmail(theForm.txtEmail.value))
			{
				alert("The Email address is invalid.\nPlease enter a valid email address.");
				theForm.txtEmail.focus();
				return (false);
			}
				else
				{
					if (theForm.txtEmail.value.toUpperCase() != theForm.txtEmail2.value.toUpperCase())
					{
						alert("The Email addresses you entered are not the same, please re-Enter the addresses.");
						theForm.txtEmail.focus();
						return (false);
					}
				}
			}
				return (true);
			}
//-->
