function validate() {
	if (document.layers) {
		var form = document.layers['form1'];
	} else {
		var form = document.all('form1');
	}

	//check to
	if (form.recipient.value == "unselected") {
		alert("Please select department to send message to.");
		return false;
	}

	//check contact
	if (form.realname.value == "") {
		alert("Please enter a contact name.");
		return false;
	}

	//check email
	if (form.email.value == "" || form.email.value.indexOf('@') == -1) {
		alert("Please enter a valid email address.");
		return false;
	}

	//if all above passes, return true so form will be submitted
	return true;
}