/*
Validate the email address in the Newsletter Subscribe form
*/

//-----------------------------------------------------------------------------
//	validate the form	
//-----------------------------------------------------------------------------
function subscribeValidator(theForm)
{
	var error = "";

//	if (theForm.email.value != "") {	
		var emailFilter=/^.+@.+\..{2,3}$/;
		if (!(emailFilter.test(theForm.email.value))) { 
       error += "Please enter a valid email address.\n";
		}
//	}

	var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\]]/
	if (theForm.email.value.match(illegalChars)) {
  	 error += "Please remove illegal characters from the email address.\n";
	}

	
	if (error != "")
	{
		alert(error);
		return (false);
	} else {
		theForm.submit();
		return (true);
		}
}
