
// Function to validate Event Submission form
	function checkForm(thisForm){
		var error = 0
		if(thisForm.strFirstName.value == ""){
			thisForm.strFirstName.focus();
			document.getElementById("tdFirstName").setAttribute((document.all ? 'className' : 'class'), "error");
			error = 1
		} else {
			document.getElementById("tdFirstName").setAttribute((document.all ? 'className' : 'class'), "");
		}
		if(thisForm.strLastName.value == ""){
			if (error == 0){
				thisForm.strLastName.focus();
			}
			document.getElementById("tdLastName").setAttribute((document.all ? 'className' : 'class'), "error");
			error = 1
		} else {
			document.getElementById("tdLastName").setAttribute((document.all ? 'className' : 'class'), "");
		}
	
		// this statement makes sure the email address is valid
		if((thisForm.strEmail.value.indexOf("@") < 1)   ||  							
			(thisForm.strEmail.value.lastIndexOf(".") <= thisForm.strEmail.value.indexOf("@") +1) ||      
    		(thisForm.strEmail.value.lastIndexOf(".") == thisForm.strEmail.value.length - 1) ||          	
			(thisForm.strEmail.value.indexOf(" ")  != -1)){ 
			
			if (error == 0){
				thisForm.strEmail.focus();
			}
			document.getElementById("tdEmail").setAttribute((document.all ? 'className' : 'class'), "error");
     		error = 1	
		} else {
			document.getElementById("tdEmail").setAttribute((document.all ? 'className' : 'class'), "");
			}	
		if(thisForm.txtComments.value == ""){
			if (error == 0){
				thisForm.txtComments.focus();
			}			
			document.getElementById("tdComments").setAttribute((document.all ? 'className' : 'class'), "error");
			error = 1
		} else {			
			document.getElementById("tdComments").setAttribute((document.all ? 'className' : 'class'), "");
		}
		if (error == 1){
			document.getElementById("tdHead").setAttribute((document.all ? 'className' : 'class'), "error");
			document.getElementById("tdHead").innerHTML = "Please Enter Required Fields"
			return false;
		}else{
			//alert("form ok");
			return true;
		}
	}


