Prova cosi:
codice:
function check_valid(theForm) {
	for (i=0; i < theForm.elements.length; i++) {
		if (theForm.elements[i].value == "" && theForm.elements[i].className == "si") {
			alert (theForm.elements[i].name + ": campo vuoto non accettabile");
			theForm.elements[i].value = "";
			theForm.elements[i].focus();
			return false;
		}else if (theForm.elements[i].type=="checkbox" && theForm.elements[i].checked && theForm.elements[i].className == "si") {
			alert (theForm.elements[i].name + ": campo non spuntato");
			theForm.elements[i].focus();
			return false;
		}
	}
}