co = new Array (4);
co[0]="#00356C";co[1]="#910046";co[2]="#EB7300";co[3]="#4FBA00";
antme1=""; antme2=""; antme2m=""; antopc="";
opcion="";

function actme1(me1,tipo,enlace){
//if (antme1==m1) m0.style.borderBottom=""
if (antme1!="" && antme1!="0") { antme1.style.display="none"; antme1.style.borderBottom=""; }
if (antme2m!="") antme2m.style.display="none";
if (antopc!="")
	{
	antopc.style.backgroundColor="";
	antopc.style.color="";
	}
if (me1!=antme1){
//	if (me1==m1) m0.style.borderBottom="1px #666666 dashed";
	if(me1!="0") me1.style.display="";
	titulomenu.style.borderTopColor=co[tipo];
//	esquina.src="img/esquina"+tipo+".jpg";
	antme1=me1;
	antme2=""; antopc="";
	titulomenu0.style.display="none";
	titulomenu1.style.display="none";
	titulomenu2.style.display="none";
	titulomenu3.style.display="none";
	switch(tipo){
		case 0: titulomenu0.style.display=""; break;
		case 1: titulomenu1.style.display=""; break;
		case 2: titulomenu2.style.display=""; break;
		case 3: titulomenu3.style.display=""; break;
		}
	marcoprin.location.href=enlace;
	}
else{
	antme1=""; antme2=""; antme2m=""; antopc="";
	}
}
function actme2(me1,me2,me2m,tipo,enlace){
if (antme1!="") antme1.style.borderBottom=""
if (antme2!="")
	{
	antme2.style.backgroundColor="";
	antme2.style.color="";
	antme2m.style.display="none";
	}
if (antopc!="") 
	{
	antopc.style.backgroundColor="";
	antopc.style.color="";
	}
if (me2!=antme2){
//	me1.style.borderBottom="1px #666666 dashed";
	me2m.style.display="";
	if (me2!=null) { me2.style.backgroundColor=co[tipo]; me2.style.color="#FFFFFF";}
	antme1=me1;
	antme2=me2;
	antme2m=me2m;
	antopc="";
	if (enlace!="") marcoprin.location.href=enlace;
	}
else{
	antme1=""; antme2=""; antme2m=""; antopc="";
	}
}

function irop(opcion,nivel,enlace){
if (antopc!="")
	{
	antopc.style.backgroundColor="";
	antopc.style.color="";
	}
opcion.style.backgroundColor=co[nivel];
opcion.style.color="#FFFFFF";
if (enlace!="") marcoprin.location.href=enlace;
antopc=opcion;
}

function as(me1,me2,me2m,opc,nivel){
if (antme2!="")
	{
	antme2.style.backgroundColor="";
	antme2.style.color="";
	antme2m.style.display="none";
	}
if (antopc!="") 
	{
	antopc.style.backgroundColor="";
	antopc.style.color="";
	}
if (me2!="")
	{
	me2m.style.display="";
	me2.style.backgroundColor=co[nivel];
	me2.style.color="#FFFFFF";
	}
if (opc!="") 
	{
	opc.style.backgroundColor=co[nivel];
	opc.style.color="#FFFFFF";
	}
antme1=me1; antme2=me2; antme2m=me2m; antopc=opc;
}

