function submitIt(askusForm) {

// check to see if the user has filled in the name text input field
	if (askusForm.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 (askusForm.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 (askusForm.email.value.indexOf(badChar,0) > -1) {
			alert("Please check your e-mail address and correct any errors")
			return false
		}
	}
	if (askusForm.email.value.indexOf ('@',0) == -1 ||   // check for the "at" sign in the address
		askusForm.email.value.indexOf ('.',0) == -1 &&   // check for at least one period
		askusForm.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 UCB status using the radio buttons
	affiliation = -1
	for (i=0; i<askusForm.status.length; i++) {
		if (askusForm.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 a subject
	if (askusForm.topic.value == "") {   // if the user didn't enter anything
		alert("Please enter a subject")
		return false
	}

// check to see if the user has filled in a question
	if (askusForm.question.value == "") {   // if the user didn't enter anything
		alert("Please enter a question")
		return false
	}

	return true
}
