
function publiON()
{publi.style.display = "block";
 normas.style.display = "none";
 otraslistas.style.display = "none";
}
function normasON()
{publi.style.display = "none";
 normas.style.display = "block";
 otraslistas.style.display = "none";
}
function otrasON()
{publi.style.display = "none";
 normas.style.display = "none";
 otraslistas.style.display = "block";
}


function movepic(img_name,img_src) {
document[img_name].src=img_src;
}

function Alternar(img,Seccion){
    if (Seccion.style.display == "none")
    {
     Seccion.style.display = "";
     document[img].src = "img/raya.gif";
    }
    else
    {
     Seccion.style.display = "none"
     document[img].src = "img/cruz.gif";
    }
}

function SoloLetras(palabra){
      pal = false;
      if(event.keyCode > 63 && event.keyCode < 91)   pal = true;
      if(event.keyCode > 96 && event.keyCode < 123)  pal = true;
      if(event.keyCode == 32)  pal = true;
      if((event.keyCode == 209) || (event.keyCode == 241))  pal = true;
      if(pal == false){event.returnValue = false;}
 }


function SoloNumeros(cifra){
      num = false;
      if(event.keyCode > 47 && event.keyCode < 58)   num = true;
     // if(event.keyCode == 46) num = true;
      if(num == false){event.returnValue = false;}
 }

function confirmar_borrar(que,numero)
{
var que
var numero

var vale=confirm("Esta operación eliminará definitivamente "+que+" numero: "+numero+".\n\¿Está seguro de que desea hacerlo?");
if (vale)
        return true ;
else
        return false ;
}


function calculanif(n){
     t=n%23;
     if (t==0) imp(n,"T");
     if (t==1) imp(n,"R");
     if (t==2) imp(n,"W");
     if (t==3) imp(n,"A");
     if (t==4) imp(n,"G");
     if (t==5) imp(n,"M");
     if (t==6) imp(n,"Y");
     if (t==7) imp(n,"F");
     if (t==8) imp(n,"P");
     if (t==9) imp(n,"D");
     if (t==10) imp(n,"X");
     if (t==11) imp(n,"B");
     if (t==12) imp(n,"N");
     if (t==13) imp(n,"J");
     if (t==14) imp(n,"Z");
     if (t==15) imp(n,"S");
     if (t==16) imp(n,"Q");
     if (t==17) imp(n,"V");
     if (t==18) imp(n,"H");
     if (t==19) imp(n,"L");
     if (t==20) imp(n,"C");
     if (t==21) imp(n,"K");
     if (t==22) imp(n,"E");
     if (t==23) imp(n,"T");
}
function imp(nu,le){
document.formdocumento.letra.value = le;
}