function MostraMenu(numerooggetto) {
 i=1;
 while ( document.getElementById("quadro" + i) && (i < 20) ) {
   if (i != numerooggetto) { valore='none'; }
    else { valore='inline'; };
   document.getElementById("quadro" + i).style.display=valore;
   i++;
 };
};

function aMostraMenu(oggetto) {
 var numeromenu = 6
 for (i = 1; i < (numeromenu + 1); i++) { document.getElementById("quadro" + i).style.display='none'}
  document.getElementById("quadro" + oggetto).style.display='inline'
  return true
};

function ModuloValido(Modulo)
{
 valido=false;
 if ((Modulo.nome.value!="")&&(Modulo.telefono.value!="")&&(Modulo.testo.value!="")) {valido=true;};
 if (valido) {Modulo.submit();} else alert("Attenzione: Inserire tutti i dati");
 return false;
};

function controllapwd()
{
  valido=false;
  if ((utenti.oldpwd.value!="") && (utenti.reppwd.value!="") && (utenti.newpwd.value!="") && (utenti.newpwd.value==utenti.reppwd.value) ) {valido=true;};
  if (valido) {utenti.submit();} else alert("Attenzione: La password di controllo è diversa da quella scelta");
  return false;
};

function Nascondi(oggetto) {
  document.getElementById(oggetto).style.display='none'
  return true
};

function Mostra(oggetto) {
  document.getElementById(oggetto).style.display='inline'
  return true
};

function TrasferisciValore(a,b) {
  document.getElementById(b).value=document.getElementById(a).value;
  return true
};


function Blocca(oggetto,fuoco) {
  document.getElementById(fuoco).focus();
  document.getElementById(oggetto).disabled=true;
  return true
};

function Sblocca(oggetto,fuoco) {
  document.getElementById(oggetto).disabled=false;
  document.getElementById(fuoco).focus();
  return true
};

function DisabilitaCasellaTesto(cb,abbr)
{
 var txtpath=document.getElementById('tst'+abbr);
 if (cb.checked) { txtpath.disabled=false; txtpath.focus(); }
  else { txtpath.disabled=true; }
}

function DisabilitaTestoeDescr(cb,abbr)
{
 var txtpath=document.getElementById('tst'+abbr);
 var aerpath=document.getElementById('atst'+abbr);
 if (cb.checked) { txtpath.disabled=false; aerpath.disabled=false; txtpath.focus(); }
  else { txtpath.disabled=true; aerpath.disabled=true;}
}

