//PrenClienti.php
function riempi(maxposti)
 {
  if ((maxposti == "") || (maxposti == "undefined")) maxposti=0;

  with (document.f.Npostiridotti)
   {
    while (options.length > 1)    //L'opzione 0 non viene cancellata per mantenere le dimensioni della casella
     options[1]=null;

    for (i=1; i <= maxposti; i++)
     options[i]=new Option(i,i);
    }

   }

//conferma.php
var stampato = 0;
var uscita = "index.php";
function esci(Operatore) {
 if (Operatore == "C") uscita= "PrenEventi.php";
  else if (Operatore == "V") uscita= "admin/GestioneEventi.php";
 if((Operatore == "C") || (Operatore == "W")){      //se l'operatore è la cassa o il cliente web, avverto che non hanno stampato
 if(stampato != 1){
 OK=confirm("Non è stato usato il pulsante di stampa.\nPremere Annulla per tornare al documento e procedere alla stampa.\nPremere OK per uscire comunque.");
           if (OK){
           self.location.href = uscita;
           }
   } else self.location.href = uscita;
  }else self.location.href = uscita;
}

function stp()
   {
   bb=document.layers?document.layers['aa']:document.getElementById?document.getElementById('aa').style:document.all['aa'].style;
   bb.visibility="hidden"
   self.print();
   stampato = 1;
   bb.visibility="visible"
   }

//ListaPrenotazioni.php
function VisualizzaLista(Lista)
   {
   if(Lista == "Cognome"){
    document.getElementById('Posto').style.display="none"
    document.getElementById('Cognome').style.display="inline"
    document.getElementById('ButtonPosto').style.display="inline"
    document.getElementById('ButtonCognome').style.display="none"

    } else {
     document.getElementById('Posto').style.display="inline"
     document.getElementById('Cognome').style.display="none"
     document.getElementById('ButtonPosto').style.display="none"
     document.getElementById('ButtonCognome').style.display="inline"

    }
   }