// JavaScript Document
var state = 'none'; 

function showhide(layer_ref) { 

if (state == 'block') { 
state = 'none'; 
} 
else { 
state = 'block'; 
} 
if (document.all) { //IS IE 4 or 5 (or 6 beta) 
eval( "document.all." + layer_ref + ".style.display = state"); 
} 
if (document.layers) { //IS NETSCAPE 4 or below 
document.layers[layer_ref].display = state; 
} 
if (document.getElementById &&!document.all) { 
hza = document.getElementById(layer_ref); 
hza.style.display = state; 
} 
}

function hidediv() { 
  if (document.getElementById) { // DOM3 = IE5, NS6 
    document.getElementById('hideShow').style.display = 'none'; 
  } 
  else { 
    if (document.layers) { // Netscape 4 
      document.hideShow.display = 'none'; 
    } 
    else { // IE 4 
      document.all.hideShow.style.display = 'none'; 
    } 
  } 
} 
function showdiv() { 
  if (document.getElementById) { // DOM3 = IE5, NS6 
    document.getElementById('hideShow').style.display = 'block'; 
  } 
  else { 
    if (document.layers) { // Netscape 4 
      document.hideShow.display = 'block';
    } 
    else { // IE 4 
      document.all.hideShow.style.display = 'block'; 
    } 
  } 
}



function switchType(tipo){
if (tipo=="Pagina") {
    if (document.getElementById) { // DOM3 = IE5, NS6 
      document.getElementById('urltype').style.display = 'none'; 
    } 
    else { 
      if (document.layers) { // Netscape 4 
        document.urltype.display = 'none'; 
      } 
      else { // IE 4 
      document.all.urltype.style.display = 'none'; 
      } 
    }
    if (document.getElementById) { // DOM3 = IE5, NS6 
      document.getElementById('paginatype').style.display = 'block'; 
    } 
    else { 
      if (document.layers) { // Netscape 4 
        document.paginatype.display = 'block'; 
      } 
      else { // IE 4 
        document.all.paginatype.style.display = 'block'; 
      } 
    } 
}
if (tipo=="URL") {
    if (document.getElementById) { // DOM3 = IE5, NS6 
      document.getElementById('urltype').style.display = 'block'; 
    } 
    else { 
      if (document.layers) { // Netscape 4 
        document.urltype.display = 'block'; 
      } 
      else { // IE 4 
      document.all.urltype.style.display = 'block'; 
      } 
    }
    if (document.getElementById) { // DOM3 = IE5, NS6 
      document.getElementById('paginatype').style.display = 'none'; 
    } 
    else { 
      if (document.layers) { // Netscape 4 
        document.paginatype.display = 'none'; 
      } 
      else { // IE 4 
        document.all.paginatype.style.display = 'none'; 
      } 
    } 
}
}
function del_paginaSw(s,p) {
  var answer = confirm("Sei sicuro di voler eliminare questa pagina? La pagina non sarą pił recuperabile")
  if (answer){  
    window.location = "admin.asp?blocco=Software&ID_sw="+s+"&id="+p+"&op=elimina"
  }
  else{
    return false;
  }
}
function del_paginaSez(s,p) {
  var answer = confirm("Sei sicuro di voler eliminare questa pagina? La pagina non sarą pił recuperabile")
  if (answer){  
    window.location = "admin.asp?blocco=Sezioni&ID_sez="+s+"&id="+p+"&op=elimina"
  }
  else{
    return false;
  }
}

function del_paginaFor(s,p) {
  var answer = confirm("Sei sicuro di voler eliminare questa pagina? La pagina non sarą pił recuperabile")
  if (answer){  
    window.location = "admin.asp?blocco=Formazione&ID_for="+s+"&id="+p+"&op=elimina"
  }
  else{
    return false;
  }
}

function del_caratteristica(s,p) {
  var answer = confirm("Sei sicuro di voler eliminare questa caratteristica? La caratteristica non sarą pił recuperabile")
  if (answer){  
    window.location = "admin.asp?blocco=ConfrontoSoftware&prodotto="+s+"&id="+p+"&op=elimina"
  }
  else{
    return false;
  }
}

function del_user(s) {
  var answer = confirm("Sei sicuro di voler eliminare questo utente? L'utente non sarą pił recuperabile")
  if (answer){  
    window.location = "admin.asp?blocco=Utenti&op=elimina&id="+s
  }
  else{
    return false;
  }
}