function limpiaActivo() {

var s1activo1=0;
var s1activo2=0;
var s1activo3=0;
var s1activo4=0;
var s1activo5=0;

var s2activo1=0;
var s2activo2=0;
var s2activo3=0;
var s2activo4=0;
var s2activo5=0;

}
function gestionSubmenu(eve,ide,enla) { 
switch (eve) {
	case "over":
		document.getElementById(ide).style.color = "#ff9900";
		document.getElementById(ide).style.backgroundColor = "#333333";
		break
			
	case "out":
		if ((ide=="sub_prod1" && s1activo1!=1) ||
		    (ide=="sub_prod2" && s1activo2!=1) ||
		    (ide=="sub_prod3" && s1activo3!=1) ||
		    (ide=="sub_prod4" && s1activo4!=1) ||
		    (ide=="sub_prod5" && s1activo5!=1) ||
		    (ide=="sub_serv1" && s2activo1!=1) ||
		    (ide=="sub_serv2" && s2activo2!=1) ||
		    (ide=="sub_serv3" && s2activo3!=1) ||
		    (ide=="sub_serv4" && s2activo4!=1) ||
		    (ide=="sub_serv5" && s2activo5!=1))
			 {document.getElementById(ide).style.color="#ffffff";
			  document.getElementById(ide).style.backgroundColor = "#999999";
			  };
		
		break
			
	case "click":
		switch (ide) {
			case "sub_prod1":
				s1activo1 = 1;
				s1activo2 = 0;
				s1activo3 = 0;
				s1activo4 = 0;
				s1activo5 = 0;
				document.getElementById(ide).style.color="#ff9900";
				document.getElementById(ide).style.backgroundColor="#333333";
				document.getElementById("sub_prod2").style.color="#ffffff";
				document.getElementById("sub_prod2").style.backgroundColor="#999999";
				document.getElementById("sub_prod3").style.color="#ffffff";
				document.getElementById("sub_prod3").style.backgroundColor="#999999";
				document.getElementById("sub_prod4").style.color="#ffffff";
				document.getElementById("sub_prod4").style.backgroundColor="#999999";
				document.getElementById("sub_prod5").style.color="#ffffff";
				document.getElementById("sub_prod5").style.backgroundColor="#999999";
				break
			case "sub_prod2":
				s1activo1 = 0;
				s1activo2 = 1;
				s1activo3 = 0;
				s1activo4 = 0;
				s1activo5 = 0;
				document.getElementById("sub_prod1").style.color="#ffffff";
				document.getElementById("sub_prod1").style.backgroundColor="#999999";
				document.getElementById(ide).style.color="#ff9900";
				document.getElementById(ide).style.backgroundColor="#333333";
				document.getElementById("sub_prod3").style.color="#ffffff";
				document.getElementById("sub_prod3").style.backgroundColor="#999999";
				document.getElementById("sub_prod4").style.color="#ffffff";
				document.getElementById("sub_prod4").style.backgroundColor="#999999";
				document.getElementById("sub_prod5").style.color="#ffffff";
				document.getElementById("sub_prod5").style.backgroundColor="#999999";
				break
			case "sub_prod3":
				s1activo1 = 0;
				s1activo2 = 0;
				s1activo3 = 1;
				s1activo4 = 0;
				s1activo5 = 0;
				document.getElementById("sub_prod1").style.color="#ffffff";
				document.getElementById("sub_prod1").style.backgroundColor="#999999";
				document.getElementById("sub_prod2").style.color="#ffffff";
				document.getElementById("sub_prod2").style.backgroundColor="#999999";
				document.getElementById(ide).style.color="#ff9900";
				document.getElementById(ide).style.backgroundColor="#333333";
				document.getElementById("sub_prod4").style.color="#ffffff";
				document.getElementById("sub_prod4").style.backgroundColor="#999999";
				document.getElementById("sub_prod5").style.color="#ffffff";
				document.getElementById("sub_prod5").style.backgroundColor="#999999";
				break
			case "sub_prod4":
				s1activo1 = 0;
				s1activo2 = 0;
				s1activo3 = 0;
				s1activo4 = 1;
				s1activo5 = 0;
				document.getElementById("sub_prod1").style.color="#ffffff";
				document.getElementById("sub_prod1").style.backgroundColor="#999999";
				document.getElementById("sub_prod2").style.color="#ffffff";
				document.getElementById("sub_prod2").style.backgroundColor="#999999";
				document.getElementById("sub_prod3").style.color="#ffffff";
				document.getElementById("sub_prod3").style.backgroundColor="#999999";
				document.getElementById(ide).style.color="#ff9900";
				document.getElementById(ide).style.backgroundColor="#333333";
				document.getElementById("sub_prod5").style.color="#ffffff";
				document.getElementById("sub_prod5").style.backgroundColor="#999999";
				break
			case "sub_prod5":
				s1activo1 = 0;
				s1activo2 = 0;
				s1activo3 = 0;
				s1activo4 = 0;
				s1activo5 = 1;
				document.getElementById("sub_prod1").style.color="#ffffff";
				document.getElementById("sub_prod1").style.backgroundColor="#999999";
				document.getElementById("sub_prod2").style.color="#ffffff";
				document.getElementById("sub_prod2").style.backgroundColor="#999999";
				document.getElementById("sub_prod3").style.color="#ffffff";
				document.getElementById("sub_prod3").style.backgroundColor="#999999";
				document.getElementById("sub_prod4").style.color="#ffffff";
				document.getElementById("sub_prod4").style.backgroundColor="#999999";
				document.getElementById(ide).style.color="#ff9900";
				document.getElementById(ide).style.backgroundColor="#333333";
				break
			case "sub_serv1":
				s2activo1 = 1;
				s2activo2 = 0;
				s2activo3 = 0;
				s2activo4 = 0;
				s2activo5 = 0;
				document.getElementById(ide).style.color="#ff9900";
				document.getElementById(ide).style.backgroundColor="#333333";
				document.getElementById("sub_serv2").style.color="#ffffff";
				document.getElementById("sub_serv2").style.backgroundColor="#999999";
				document.getElementById("sub_serv3").style.color="#ffffff";
				document.getElementById("sub_serv3").style.backgroundColor="#999999";
				document.getElementById("sub_serv4").style.color="#ffffff";
				document.getElementById("sub_serv4").style.backgroundColor="#999999";
				document.getElementById("sub_serv5").style.color="#ffffff";
				document.getElementById("sub_serv5").style.backgroundColor="#999999";
				break
			case "sub_serv2":
				s2activo1 = 0;
				s2activo2 = 1;
				s2activo3 = 0;
				s2activo4 = 0;
				s2activo5 = 0;
				document.getElementById("sub_serv1").style.color="#ffffff";
				document.getElementById("sub_serv1").style.backgroundColor="#999999";
				document.getElementById(ide).style.color="#ff9900";
				document.getElementById(ide).style.backgroundColor="#333333";
				document.getElementById("sub_serv3").style.color="#ffffff";
				document.getElementById("sub_serv3").style.backgroundColor="#999999";
				document.getElementById("sub_serv4").style.color="#ffffff";
				document.getElementById("sub_serv4").style.backgroundColor="#999999";
				document.getElementById("sub_serv5").style.color="#ffffff";
				document.getElementById("sub_serv5").style.backgroundColor="#999999";
				break
			case "sub_serv3":
				s2activo1 = 0;
				s2activo2 = 0;
				s2activo3 = 1;
				s2activo4 = 0;
				s2activo5 = 0;
				document.getElementById("sub_serv1").style.color="#ffffff";
				document.getElementById("sub_serv1").style.backgroundColor="#999999";
				document.getElementById("sub_serv2").style.color="#ffffff";
				document.getElementById("sub_serv2").style.backgroundColor="#999999";
				document.getElementById(ide).style.color="#ff9900";
				document.getElementById(ide).style.backgroundColor="#333333";
				document.getElementById("sub_serv4").style.color="#ffffff";
				document.getElementById("sub_serv4").style.backgroundColor="#999999";
				document.getElementById("sub_serv5").style.color="#ffffff";
				document.getElementById("sub_serv5").style.backgroundColor="#999999";
				break
			case "sub_serv4":
				s2activo1 = 0;
				s2activo2 = 0;
				s2activo3 = 0;
				s2activo4 = 1;
				s2activo5 = 0;
				document.getElementById("sub_serv1").style.color="#ffffff";
				document.getElementById("sub_serv1").style.backgroundColor="#999999";
				document.getElementById("sub_serv2").style.color="#ffffff";
				document.getElementById("sub_serv2").style.backgroundColor="#999999";
				document.getElementById("sub_serv3").style.color="#ffffff";
				document.getElementById("sub_serv3").style.backgroundColor="#999999";
				document.getElementById(ide).style.color="#ff9900";
				document.getElementById(ide).style.backgroundColor="#333333";
				document.getElementById("sub_serv5").style.color="#ffffff";
				document.getElementById("sub_serv5").style.backgroundColor="#999999";
				break
			case "sub_serv5":
				s2activo1 = 0;
				s2activo2 = 0;
				s2activo3 = 0;
				s2activo4 = 0;
				s2activo5 = 1;
				document.getElementById("sub_serv1").style.color="#ffffff";
				document.getElementById("sub_serv1").style.backgroundColor="#999999";
				document.getElementById("sub_serv2").style.color="#ffffff";
				document.getElementById("sub_serv2").style.backgroundColor="#999999";
				document.getElementById("sub_serv3").style.color="#ffffff";
				document.getElementById("sub_serv3").style.backgroundColor="#999999";
				document.getElementById("sub_serv4").style.color="#ffffff";
				document.getElementById("sub_serv4").style.backgroundColor="#999999";
				document.getElementById(ide).style.color="#ff9900";
				document.getElementById(ide).style.backgroundColor="#333333";
				break
			default:
				s1activo1 = 0;
				s1activo2 = 0;
				s1activo3 = 0;
				s1activo4 = 0;
				s1activo5 = 0;
				s2activo1 = 0;
				s2activo2 = 0;
				s2activo3 = 0;
				s2activo4 = 0;
				s2activo5 = 0;
				document.getElementById("sub_prod1").style.color="#ffffff";
				document.getElementById("sub_prod1").style.backgroundColor="#999999";
				document.getElementById("sub_prod2").style.color="#ffffff";
				document.getElementById("sub_prod2").style.backgroundColor="#999999";
				document.getElementById("sub_prod3").style.color="#ffffff";
				document.getElementById("sub_prod3").style.backgroundColor="#999999";
				document.getElementById("sub_prod4").style.color="#ffffff";
				document.getElementById("sub_prod4").style.backgroundColor="#999999";
				document.getElementById("sub_prod5").style.color="#ffffff";
				document.getElementById("sub_prod5").style.backgroundColor="#999999";
				document.getElementById("sub_serv1").style.color="#ffffff";
				document.getElementById("sub_serv1").style.backgroundColor="#999999";
				document.getElementById("sub_serv2").style.color="#ffffff";
				document.getElementById("sub_serv2").style.backgroundColor="#999999";
				document.getElementById("sub_serv3").style.color="#ffffff";
				document.getElementById("sub_serv3").style.backgroundColor="#999999";
				document.getElementById("sub_serv4").style.color="#ffffff";
				document.getElementById("sub_serv4").style.backgroundColor="#999999";
				document.getElementById("sub_serv5").style.color="#ffffff";
				document.getElementById("sub_serv5").style.backgroundColor="#999999";
				break
		}
		cargarContenido(enla,"contenidoAjax")

		break
	
}

}

