function Inicializa(localizacion)
{
    CompruebaLocation(localizacion);    
    if (document.all&&document.getElementById)
    {
        navRoot = document.getElementById("menu");
        for (i=0; i<navRoot.childNodes.length; i++)
        {
            node = navRoot.childNodes[i];
            if (node.nodeName=="LI")
            {
                node.onmouseover=function()
                {
                    this.className+=" over";
                }
                node.onmouseout=function()
                {
                    this.className=this.className.replace(" over", "");
                }
            }
        }
    }
}
function InicializaImagenes()
{
    document.img1.src='img/menu_01_a.gif';
    document.img2.src='img/menu_02_a.gif';
    document.img3.src='img/menu_03_a.gif';
    document.img4.src='img/menu_04_a.gif';
    document.img5.src='img/menu_05_a.gif';
    document.img6.src='img/menu_06_a.gif'; 
}
function RollOver(celdaId, opAct)
{            
    //Función que recibe dos parámetros:
    //celdaId: Parámetro que nos indica la imagen a cambiar
    //opAct: Parámetro que nos indica la imagen a poner
    //       Valores: !=0-->onMouseOut
    //                0-->onMouseOver o onClic
    //InicializaImagenes();
    switch(celdaId)
    {
        case "op1":
            if(opAct==1)
            {
                document.img1.src='img/menu_01_b.gif';   
            }
            else
            {
                document.img1.src='img/menu_01_a.gif';   
            }                    
            break;
        case "op2":
            if(opAct==1)
            {
                document.img2.src='img/menu_02_b.gif';   
            }
            else
            {
                document.img2.src='img/menu_02_a.gif';   
            }                    
            break;
        case "op3":
            if(opAct==1)
            {
                document.img3.src='img/menu_03_b.gif';   
            }
            else
            {
                document.img3.src='img/menu_03_a.gif';   
            }                    
            break;
        case "op4":
            if(opAct==1)
            {
                document.img4.src='img/menu_04_b.gif';   
            }
            else
            {
                document.img4.src='img/menu_04_a.gif';           
            }                    
            break;
        case "op5":
            if(opAct==1)
            {
                document.img5.src='img/menu_05_b.gif';   
            }
            else
            {
                document.img5.src='img/menu_05_a.gif';   
            }                    
            break;
        case "op6":
            if(opAct==1)
            {
                document.img6.src='img/menu_06_b.gif';   
            }
            else
            {
                document.img6.src='img/menu_06_a.gif';   
            }                    
            break;
        default:
            break;
    }
}
function CompruebaLocation(localizacion)
{
    switch(localizacion)
    {
        case 0:
            break;
        case 1:
            document.img1.src='img/menu_01_b.gif';
            break;
        case 2:            
            document.img2.src='img/menu_02_b.gif';
            break;
        case 3:
            document.img3.src='img/menu_03_b.gif';
            break;
        case 4:
            document.img4.src='img/menu_04_b.gif';
            break;
        case 5:
            document.img5.src='img/menu_05_b.gif';
            break;
        case 6:            
            document.img6.src='img/menu_06_b.gif';
            break;
        default:
            alert("index");
            break;        
    }
}
