<!-- //hide the script
function checkEmail(strng) {
	var error = "";

	var emailFilter=/^.+@.+\..{2,6}$/;

	if (!(emailFilter.test(strng))) {
		return false;
	}

	var illegalChars= /[\(\)\<\>\,\;\:\\\/\"\[\] ']/

	if (strng.match(illegalChars)) {
		return false;
	}

	return true;
}

function form_validator(theForm)
{

 	if(theForm.SName.value == "") {
 		 alert("Please enter your full name.");
 		 theForm.SName.focus();
 		 return(false);
 	}

	if(!checkEmail(theForm.SEmail.value)) {
		 alert("Please enter a valid email address for yourself.");
		theForm.SEmail.focus();
		 return false;
	}

 	if(theForm.RName.value == "") {
 		 alert("Please enter a full name for your friend.");
 		 theForm.RName.focus();
 		 return(false);
 	}

	if(!checkEmail(theForm.REmail.value)) {
		 alert("Please enter a valid email address for your friend.");
		theForm.REmail.focus();
		 return false;
	}

	return (true);
}
// end script hiding -->