//el estilo y el layer dependiendo del navegador
raiz = "http://www.rubikaz.com/";
//primero la función original metida desde aquí
document.write('<style type="text/css">');


document.write("@import url(\""+raiz+"general.css\");");



document.write('#Layera {');
document.write('	position:relative;');
document.write('	height:29px;');
document.write('	z-index:1;');
var browserType=navigator.userAgent;
document.write('}');


document.write('</style>');

document.write('<LINK REL="SHORTCUT ICON" HREF="http://www.rubikaz.com/imagenes/cubo.ico">');





activateMenu = function(nav) {

    /* currentStyle restricts the Javascript to IE only */
	if (document.all && document.getElementById(nav).currentStyle) {  
        var navroot = document.getElementById(nav);
        
        /* Get all the list items within the menu */
        var lis=navroot.getElementsByTagName("LI");  
        for (i=0; i<lis.length; i++) {
			
           /* If the LI has another menu level */
            if(lis[i].lastChild.tagName=="UL"){
							
            
                /* assign the function to the LI */
                if( lis[i].parentNode == navroot ) {
                   lis[i].onmouseover=function() {	
                     this.style.backgroundImage = "url("+raiz+"imagenes/menu/backgroundarribab.jpg)";
                     /* display the inner menu */
                     this.lastChild.style.display="block";
                  }
                  lis[i].onmouseout=function() {                       
                     this.style.backgroundImage = "url("+raiz+"imagenes/menu/backgroundarriba.jpg)";
                     this.lastChild.style.display="none";
                  }
                } else {
                   lis[i].onmouseover=function() {	
                     this.style.backgroundImage = "url("+raiz+"imagenes/menu/backgroundb.jpg)";
                     /* display the inner menu */
                     this.lastChild.style.display="block";
                  }
                  lis[i].onmouseout=function() {                       
                     this.style.backgroundImage = "url("+raiz+"imagenes/menu/background.jpg)";
                     this.lastChild.style.display="none";
                  }
                }
            } else {
              lis[i].onmouseover=function(){this.style.backgroundImage = "url("+raiz+"imagenes/menu/backgroundb.jpg)";};
              lis[i].onmouseout=function(){this.style.backgroundImage = "url("+raiz+"imagenes/menu/background.jpg)";};
            }
        }
    }
}


function init(){
    activateMenu('nav'); 

}
window.onload=init; 








//***************************************************************
//Variaciones mías para escribir el menu de forma sencilla
//***************************************************************


//

//
//


function iniciomenu()
	{
		document.write("<table cellspacing=\"0\" cellpadding=\"0\" align=\"center\"><tr><td><div id=\"Layera\">");
		document.write("<ul id=\"nav\" style=\"margin-top: 0px;margin-bottom: 0px\" >");
	};

function finmenu()
	{
		document.write("</ul>");
		document.write("</div></td></tr></table>");
	};
	
	
	
function item1(texto, direccion, size)
	{		
		document.write("<li><table width=\"125\" height=\"30\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"6\"></td><td width=\"105\" align=\"center\"><strong><font color=\"#FFFFFF\" size=\""+size+"\"><a href=\""+raiz+direccion+"\">"+texto+"</a></font></strong></td><td width=\"14\"></td></tr></table></li>");
	};
function itemout(texto, direccion, size)
	{		
		document.write("<li><table width=\"125\" height=\"30\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"6\"></td><td width=\"105\" align=\"center\"><strong><font color=\"#FFFFFF\" size=\""+size+"\"><a href=\""+direccion+"\">"+texto+"</a></font></strong></td><td width=\"14\"></td></tr></table></li>");
	};

function itemvariosarriba(texto, direccion, size)
	{		
		document.write("<li><table width=\"125\" height=\"45\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"6\" background=\""+raiz+"imagenes/menu/cuboizquierda.gif\"></td><td width=\"113\" align=\"center\"><strong><font color=\"#FFFFFF\" size=\""+size+"\"><a href=\""+raiz+direccion+"\">"+texto+"</a></font></strong></td><td width=\"6\" background=\""+raiz+"imagenes/menu/cuboderecha.gif\"></td></tr></table>");
		document.write("<ul>");
	};

function itemvariosarribaderecha(texto, direccion, size)
	{		
		document.write("<li><table width=\"125\" height=\"45\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"6\" background=\""+raiz+"imagenes/menu/cuboizquierda.gif\"></td><td width=\"107\" align=\"center\"><strong><font color=\"#FFFFFF\" size=\""+size+"\"><a href=\""+raiz+direccion+"\">"+texto+"</a></font></strong></td><td width=\"12\" background=\""+raiz+"imagenes/menu/favicon.gif\"></td></tr></table>");
		document.write("<ul>");
	};

function itemvariosarribaizquierda(texto, direccion, size)
	{		
		document.write("<li><table width=\"125\" height=\"45\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"12\" background=\""+raiz+"imagenes/menu/favicon.gif\"></td><td width=\"107\" align=\"center\"><strong><font color=\"#FFFFFF\" size=\""+size+"\"><a href=\""+raiz+direccion+"\">"+texto+"</a></font></strong></td><td width=\"6\" background=\""+raiz+"imagenes/menu/cuboderecha.gif\"></td></tr></table>");
		document.write("<ul>");
	};



function itemvarios(texto, direccion, flecha, size)
	{		
		document.write("<li><table width=\"125\" height=\"30\" cellpadding=\"0\" cellspacing=\"0\"><tr><td width=\"6\"></td><td width=\"105\" align=\"center\"><strong><font color=\"#FFFFFF\" size=\""+size+"\"><a href=\""+raiz+direccion+"\">"+texto+"</a></font></strong></td><td width=\"14\" background=\""+raiz+"imagenes/menu/1b.gif\"></td></tr></table>");
		document.write("<ul>");
	};



function finitemvarios()
	{
		document.write("</ul>");
		document.write("</li>");
	};
