function submitIt(seminarForm) {

// check to see if the user has filled in the name text input field
	if (seminarForm.name.value == "") {   // if the user didn't enter anything
		alert("Please enter your name")
		return false
	}

// check to see if the user has filled in a valid e-mail address
// If the user didn't fill in an e-mail address, an alert message appears
	if (seminarForm.email.value == "") {
		alert ("Please enter your e-mail address")
		return false
	}
// This is a simple check for errors in the e-mail address. However it won't catch every mistake.
	invalidChars = " /:,;"
	for (i=0; i<invalidChars.length; i++) {
		badChar = invalidChars.charAt(i)
		if (seminarForm.email.value.indexOf(badChar,0) > -1) {
			alert("Please check your e-mail address and correct any errors")
			return false
		}
	}
	if (seminarForm.email.value.indexOf ('@',0) == -1 ||   // check for the "at" sign in the address
		seminarForm.email.value.indexOf ('.',0) == -1 &&   // check for at least one period
		seminarForm.email.value != "") {   // however, the e-mail form field isn't empty
			alert("Please check your e-mail address and correct any errors")
			return false
	}

// check to see if the user has indicated his or her COE Department or Division
	affiliation = -1
	for (i=0; i<seminarForm.status.length; i++) {
		if (seminarForm.status[i].checked) {
			affiliation = i
		}
	}
	if (affiliation == -1) {
		alert("Please indicate your UCB affiliation.")
		return false
	}

// check to see if the user has filled in the name text input field
	if (seminarForm.department.value == "") {   // if the user didn't enter anything
		alert("Please indicate your department or major")
		return false
	}

// check to see if the user has indicated his or her UCB status using the radio buttons
	serviceType = -1
	for (i=0; i<seminarForm.service.length; i++) {
		if (seminarForm.service[i].checked) {
			serviceType = i
		}
	}
	if (serviceType == -1) {
		alert("Please indicate the type of service that you would like: course, workshop, tour, or individual consultation.")
		return false
	}

// check to see if the user has filled in the topic or description text input field
	if (seminarForm.topic.value == "") {   // if the user didn't enter anything
		alert("Please describe your topic or assignment")
		return false
	}

// check to see if the user has filled in the date, time, and location text input field
	if (seminarForm.location.value == "") {   // if the user didn't enter anything
		alert("Please indicate when and where you would like this instruction")
		return false
	}


	return true
}
