function isFilled(string) {
    if (string.search(/\S( \S)?/) != -1)
        return true;
    else
        return false;
} 

function isEmail(string) {
    if (string.search(/^\w+((-\w+)|(\.\w+))*\@[A-Za-z0-9]+((\.|-)[A-Za-z0-9]+)*\.[A-Za-z0-9]+$/) != -1)
        return true;
    else
        return false;
}

function validateForm(form){

var nameTest=/^\S+.*\S+$/; 

if (isFilled(form.event_name.value) == false) {							// do the check
		alert('Please Enter an Event Name!');		// if not, alert the user
		form.event_name.focus();								// focus in form field
		return false;											// return false
	}
	
if (isFilled(form.event_date.value) == false) {							// do the check
		alert('Please Enter an Event Date!');		// if not, alert the user
		form.event_date.focus();								// focus in form field
		return false;											// return false
	}
	
if (isFilled(form.event_contact.value) == false) {							// do the check
		alert('Please Enter an Event Contact!');		// if not, alert the user
		form.event_contact.focus();								// focus in form field
		return false;											// return false
	}
	
if (isFilled(form.event_summary.value) == false) {							// do the check
		alert('Please Enter an Event Summary!');		// if not, alert the user
		form.event_summary.focus();								// focus in form field
		return false;											// return false
	}
	
if (isFilled(form.your_name.value) == false) {							// do the check
		alert('Please Enter a Name!');		// if not, alert the user
		form.your_name.focus();								// focus in form field
		return false;											// return false
	}
	
if (isEmail(form.your_email.value) == false) {							// do the check
		alert('Please Enter a valid Email Address!');		// if not, alert the user
		form.your_email.focus();								// focus in form field
		return false;											// return false
	}		
	
return true;
}
