<!--
function MM_reloadPage(init) {  //reloads the window if Nav4 resized
  if (init==true) with (navigator) {if ((appName=="Netscape")&&(parseInt(appVersion)==4)) {
    document.MM_pgW=innerWidth; document.MM_pgH=innerHeight; onresize=MM_reloadPage; }}
  else if (innerWidth!=document.MM_pgW || innerHeight!=document.MM_pgH) location.reload();
}
MM_reloadPage(true);
//-->
  function validatelogin(path){
		username = document.generale.username.value;
		if ((username == "") || (username == "undefined")) {
			alert('La username inserita non e valida')
		   document.generale.username.focus();
			return false;
		}
		password = document.generale.password.value;
		if ((password == "") || (password == "undefined")) {
			alert('La password inserita non e valida')
		   document.generale.password.focus();
			return false;
		}
		document.generale.action=path+"verifica.php";
    document.generale.submit();
  }
  function popupform(){
    var w=500;
    var h=500;
    var l = Math.floor((screen.width-w)/2);
    var t = Math.floor((screen.height-h)/2);
	  window.open("page/form.php",'',"width="+w+",height="+h+",top="+t+",left="+l)
  }  
  function popupformamico(){
    var w=500;
    var h=450;
    var l = Math.floor((screen.width-w)/2);
    var t = Math.floor((screen.height-h)/2);
	  window.open("page/formamico.php",'',"width="+w+",height="+h+",top="+t+",left="+l)
  }  
  function validateform(){
		email = document.generale.newslettermail.value;
		if ((email == "") || (email == "undefined")) {
			alert('La e-mail inserita non e valida')
		   document.generale.newslettermail.focus();
			return false;
		}
		check = document.generale.privacy;
		//alert (check.checked);
		if (check.checked==false) {
			alert('Per iscriversi occorre accettare la privacy')
		   document.generale.newslettermail.focus();
			return false;
		}
		document.generale.action="inviamail.php";
    document.generale.submit();
  }

