function openW(win,title,h,w,scroll) {
	var x;
	var y;
	var param;
	x = screen.width / 2 - w / 2;
	y = screen.height / 2 - (h / 2+20);
	param = "width="+w+",height="+h+",left="+x+",top="+y+",scrollbars="+scroll+",toolbar=0,location=0,directories=0,menuBar=0,resizable=0";
	windowDoPop=window.open(win,title,param);
	windowDoPop.focus();
}
function messaggio(testomessaggio) {
	alert(testomessaggio);
}
function validacommento(theForm){
	if (theForm.commento.value == "" || theForm.commento.value.length < 2){
		alert("E' necessario inserire il testo del messaggio.");
		theForm.commento.focus();
		return false;
	}
	myOption = -1;
	for (i=theForm.mailing.length-1; i > -1; i--) {
		if (theForm.mailing[i].checked) {
			myOption = i; i = -1;
		}
	}
	if (myOption == 1) {
		if (theForm.email.value == "" || theForm.email.value.indexOf('@',1)== -1 || theForm.email.value.indexOf('.',2)==-1){
			alert("E' necessario inserire una e-mail valida.");
			theForm.email.focus();
			return false;
		}
	}
return true;
}

