	function ShowErrorMessage() {
		var errorSpan = document.getElementById('ErrorMessage');

		if (errorSpan == null) return;

		errorSpan.style.display = 'inline';
	}
	
	function EmailIsValid(email)
	{
		return (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(email));
	}
	
	function isValid()
	{
		var form = document.forms['EmailSubscriptionForm'];
	
		if(!form) return;
		
		with(form)
		{	
			var emailInput = elements['EmailAddress'];
	
			if(!emailInput) return;
		
			if(!EmailIsValid(emailInput.value))
			{
				ShowErrorMessage();
				/*emailInput.focus();*/			
				return false;
			}
			
			return true;
		}
	}
