
function allUsers() {
	for (i=0; i < document.SubmitEmail.userSend.length; i++) {
		document.SubmitEmail.userSend.options[i].selected = true;
	}
}

function _CF_onError(form_object, input_object, object_value, error_message) {
	alert(error_message);
	return false;
}

function _CF_hasValue(obj, obj_type) {
	if (obj_type == "TEXT") {
		if (obj.value.length == 0)
			return false;
		else
			return true;
	} else if (obj_type == "SELECT") {
		for (i=0; i < obj.length; i++) {
			if (obj.options[obj.selectedIndex].value == "00")
				return false;
			}
		return true;
	}
}

function sendOut(theForm, notifyEm) {
	if  (!_CF_hasValue(theForm.emailtext, "TEXT" )) {
		if  (!_CF_onError(theForm, theForm.emailtext, theForm.emailtext.value, "You have not typed in a message in the lower text box to send to your users. Please do so before submitting this form.")) {
			return false;
		}
	}
	
	return true;
}
