
	function killReturns(strMessage){
		var results = strMessage.replace(/\s+$/,"");
		return results;
	}
	//this check the subject field for a value
	function formval_subject() {
	  if(document.mail2.subject.value=="" || document.mail2.subject.value.length==0) {
		alert("Please enter a subject.");
		setTimeout("document.mail2.subject.focus(); document.mail2.subject.select()", 0);
		return false;
	  }
	}
	//this checks the message box for being empty
	function formval_message() {
	  if(document.mail2.message.value=="" || document.mail2.message.value.length==0) {
		alert("Please enter a message.");
		setTimeout("document.mail2.message.focus(); document.mail2.message.select()", 0);
		return false;
	  }
	  //add code here to strip unwanted characters from the message
	}
	//this check to make sure the email field is not blank and contains an @ symbol and a period
	function formval_email() {
	  if (document.mail2.userEmail.value=="" || document.mail2.userEmail.value.indexOf("@") == -1 || document.mail2.userEmail.value.indexOf(".") == -1) {
		alert("Please enter a valid e-mail address.")
		setTimeout("document.mail2.userEmail.focus(); document.mail2.userEmail.select()", 0);
		return false;
	  }
	}
	// this function focuses the cursor on page load to the first field in the form
	function cursor(){
		var where;
		where = location.href.split("=");
		if(where[1] != "send"){
			document.mail2.subject.focus();
		}
	}
