function checkInput(theForm) {
	var email_reg_exp = /^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-]{2,})+\.)+([a-zA-Z0-9]{2,})+$/;

	if ((theForm.nome.value==0) && (theForm.nome.value.length<=0)) {
		alert("Non hai inserito il nome !");
		theForm.nome.focus();
		return false
	}

	if ((theForm.email.value==0) && (theForm.email.value.length<=0)) {
		alert("Non hai inserito l'e-mail !");
		theForm.email.focus();
		return false
	}

	else if (!email_reg_exp.test(theForm.email.value)){
		alert("E-mail non corretta !");
		theForm.email.focus();
		return false
		}

	if ((!theForm.articoli.checked) && (!theForm.news.checked) && (!theForm.labs.checked)) {
		alert("Non hai selezionato l'argomento !");
		theForm.articoli.focus();
		return false
	}

}

function tutti(theForm) {
	if (theForm.elements[5].checked) {
		for (j=2; j<=4; j++) {
			if (!theForm.elements[j].checked) {
				theForm.elements[j].click();
			}
		}
	}
}

function alcuni(theForm) {
	for (ii=2; ii<=4; ii++) {
		if (theForm.elements[5].checked) {
			theForm.elements[5].click();
		}
	}
}