n6 = (document.getElementById&&!document.all) ? 1:0
ie = (document.all) ? 1:0
n = (document.layers) ? 1:0

/*  APRE/CHIUDE SOTTOMENU



*/

function dropDown(nRiga)
{
  if(!n)
  {
    r = document.getElementById(nRiga);
    if(r.className=="Cl")
      r.className = "Op";
    else
      r.className = "Cl";
  }
}


/*  ROLLOVER TRA IMMAGINE E TESTO

    Sincronizza il rollover tra immagine
    e testo aventi lo stesso link per
    creare un effetto grafico coerente.

*/

function mRollOver(nOggetto,tipo)
{
  if(!n)
  {

    ogg = document.getElementById(nOggetto);
    if(tipo)
    {
      ogg.oldColor    = ogg.style.color;
      ogg.style.color = "#FF0000";
    }
    else ogg.style.color = ogg.oldColor;
  }
  else
  {
    if(tipo) nOggetto.color = "#FF0000";
    else nOggetto = "#000000";
  }
}


/*  APRE SOTTOMENU RELATIVO ALLA PAGINA STESSA

    Se il link nel menu tree relativo alla pagina
    è nascosto in un sottomenu, apre il sottomenu
    fino al livello che rende visibile il link
    alla pagina.

*/

function collapser()
{
  if(!n)
  {
    args  = collapser.arguments;
    argsLen = args.length;
    for(i=0; i < argsLen; i++) document.getElementById(args[i]).className = 'Op';
  }

}


/*  MESSAGGIO IN STATUS BAR SU NODO MENU

    Visualizza un messaggio in status bar
    se il link è un nodo per aprire e
    chiudere un sottomenu. Va fatto seguire
    da "return true;" nell'attributo che
    lo richiama.


*/
function stMsg(stato)
{
  if(stato) self.status = 'apri/chiudi sottomenu';
  else      self.status = '';
}