function check(str) {
	validate = new String(str.value);
	re = /<|>|&/g;
	if (validate.search(re)>-1){
		alert("Sorry, special characters are not allowed.");
		str.value="";
		str.focus();
	}
}


function isubscriberEmailAddr(email) {
	var result = false
	var theStr = new String(email)
	var index = theStr.indexOf("@");
	if (index > 0) {
		var pindex = theStr.indexOf(".",index);
		if ((pindex > index+1) && (theStr.length > pindex+1))
		result = true;
	}
	return result;
}


function validateForm(theForm) {
	if (theForm.subscriberFirstName.value == "" ) {
		alert("Please enter your first name.");
		theForm.subscriberFirstName.focus();
		return (false);
	} 
  
	if (theForm.subscriberLastName.value == "" ) {
		alert("Please enter your last name.");
		theForm.subscriberLastName.focus();
		return (false);
	} 
  
	if (theForm.subscriberEmail.value == "" ) {
		alert("Please enter your email address.");
		theForm.subscriberEmail.focus();
		return (false);
	}

	if (theForm.subscriberEmail.value == "" || !isubscriberEmailAddr(theForm.subscriberEmail.value)) {
		alert("Please enter your email address.");
		theForm.subscriberEmail.focus();
		return (false);
	}  

	return (true);
}


