function mostrar(){
  document.getElementById("sel0").style.visibility = "visible";
  document.getElementById("sel1").style.visibility = "visible";
  document.getElementById("sel2").style.visibility = "visible";
  document.getElementById("sel3").style.visibility = "visible";
  document.getElementById("sel4").style.visibility = "visible";
  document.getElementById("sel5").style.visibility = "visible";
  document.getElementById("sel6").style.visibility = "visible";
  document.getElementById("sel7").style.visibility = "visible";
  document.getElementById("sel8").style.visibility = "visible";
  document.getElementById("sel9").style.visibility = "visible";
}

function ocultar(){
  document.getElementById("sel0").style.visibility = "hidden";
  document.getElementById("sel1").style.visibility = "hidden";
  document.getElementById("sel2").style.visibility = "hidden";
  document.getElementById("sel3").style.visibility = "hidden";
  document.getElementById("sel4").style.visibility = "hidden";
  document.getElementById("sel5").style.visibility = "hidden";
  document.getElementById("sel6").style.visibility = "hidden";
  document.getElementById("sel7").style.visibility = "hidden";
  document.getElementById("sel8").style.visibility = "hidden";
  document.getElementById("sel9").style.visibility = "hidden";
}

over = function() {
    var sfEls = document.getElementById("nav").getElementsByTagName("LI");
    for (var i=0; i<sfEls.length; i++) {
        sfEls[i].onmouseover=function() {
            this.className+=" over";
            ocultar();
        }
        sfEls[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" over\\b"), "");
            mostrar();
        }
    }
    var sfEls1 = document.getElementById("nav1").getElementsByTagName("LI");
    for (var i=0; i<sfEls1.length; i++) {
        sfEls1[i].onmouseover=function() {
            this.className+=" over";
            ocultar();
        }
        sfEls1[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" over\\b"), "");
            mostrar();
        }
    }
    var sfEls2 = document.getElementById("nav2").getElementsByTagName("LI");
    for (var i=0; i<sfEls2.length; i++) {
        sfEls2[i].onmouseover=function() {
            this.className+=" over";
            ocultar();
        }
        sfEls2[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" over\\b"), "");
            mostrar();
        }
    }
    var sfEls3 = document.getElementById("nav3").getElementsByTagName("LI");
    for (var i=0; i<sfEls3.length; i++) {
        sfEls3[i].onmouseover=function() {
            this.className+=" over";
            ocultar();
        }
        sfEls3[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" over\\b"), "");
            mostrar();
        }
    }
    var sfEls4 = document.getElementById("nav4").getElementsByTagName("LI");
    for (var i=0; i<sfEls4.length; i++) {
        sfEls4[i].onmouseover=function() {
            this.className+=" over";
            ocultar();
        }
        sfEls4[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" over\\b"), "");
            mostrar();
        }
    }
    var sfEls5 = document.getElementById("nav5").getElementsByTagName("LI");
    for (var i=0; i<sfEls5.length; i++) {
        sfEls5[i].onmouseover=function() {
            this.className+=" over";
            ocultar();
        }
        sfEls5[i].onmouseout=function() {
            this.className=this.className.replace(new RegExp(" over\\b"), "");
            mostrar();
        }
    }
}

if (window.attachEvent){ window.attachEvent("onload", over); }

function abrir(URL){
   window.open(URL, "popup", "scrollbars=yes, status=no, width=750, height=600, top=55, left=200, resizable=no");
}

function abrirCom(URL){
   window.open(URL, "popup", "scrollbars=yes, status=no, width=450, height=250, top=55, left=200, resizable=no");
}

function abrirMail(URL){
   window.open(URL, "popup", "scrollbars=yes, status=no, width=450, height=400, top=55, left=200, resizable=no");
}
