// JavaScript Document
function MM_openBrWindow(theURL,winName,features) { //v2.0
  window.open(theURL,winName,features);
}

function addPage() {
if ((navigator.appName=="Microsoft Internet Explorer")&&
(parseInt(navigator.appVersion)>=4)) {
window.external.addFavorite
(document.location.href, document.title);
} else {
var msg = "Info: Il tuo browser non supporta lo script '" +
document.location.href + "' ai preferiti!";
if (navigator.appName=="Netscape") msg += " (CTRL-D)";
alert(msg);
}
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}


  function controlla(){
if(form_news.email.value==""){
alert("Inserisci un indirizzo email");
form_news.email.focus();
return false;
}
var popup = window.open('newsletter.php','popup','toolbar=no,location=yes,directories=no,status=no,menubar=no,scrollbars=no,resizable=no,width=500,height=480,left=0,top=0');
form_news.submit();
return false;
}

function Modulo() {

        if ((document.modulo.nome.value == "")) {
           alert("Il campo Nome è obbligatorio");
           document.modulo.nome.focus();
           return false;
        }
else if ((document.modulo.cognome.value == "")) {
           alert("Il campo Cognome è obbligatorio");
           document.modulo.cognome.focus();
           return false;
        }
 else if        ((document.modulo.telefono.value == "")) {
           alert("Il campo Telefono è obbligatorio");
           document.modulo.telefono.focus();
           return false;
        }
 else if        ((document.modulo.email.value == "")) {
           alert("Il campo Email è obbligatorio");
           document.modulo.email.focus();
           return false;
        }
else if        ((document.modulo.persone.value == "")) {
           alert("Il campo Numero persone è obbligatorio");
           document.modulo.persone.focus();
           return false;
        }
 else if        ((document.modulo.privacy.value == "")) {
           alert("Il campo Privacy è obbligatorio");
           document.modulo.privacy.focus();
           return false;
        }
        else {
           document.modulo.action = "invia-prenotazioni.php";
           document.modulo.submit();
        }
  }