
// Function to validate Event Submission form
	function checkForm(thisForm){
		var error = 0
		
		// this statement makes sure the email address is valid
		if((thisForm.strNewsLetterEmail.value.indexOf("@") < 1)   ||  							
			(thisForm.strNewsLetterEmail.value.lastIndexOf(".") <= thisForm.strNewsLetterEmail.value.indexOf("@") +1) ||      
    		(thisForm.strNewsLetterEmail.value.lastIndexOf(".") == thisForm.strNewsLetterEmail.value.length - 1) ||          	
			(thisForm.strNewsLetterEmail.value.indexOf(" ")  != -1)){ 
			
			if (error == 0){
				thisForm.strNewsLetterEmail.focus();
			}
			//document.getElementById("strNewsLetterEmail").setAttribute("class", "error");
     		error = 1	
		} else {
			document.getElementById("strNewsLetterEmail").setAttribute("class", "");
			//alert(" at else")
			}	
		if (error == 1){
			thisForm.strNewsLetterEmail.setAttribute("class", "errorNewsLetter");
			thisForm.strNewsLetterEmail.value="Please Enter a Valid Email Address";
			//alert("not ok");
			return false;
		}else{
			//alert("form ok");
			return true;
		}
	}

