var anterior1; // para los menus superiores
var anterior2; // para los de la izquierda

window.document.ondrag = function () { return false; };
window.document.onselectstart = function () { return false; };
    
// Ilumina la opción seleccionada en el menú superior
function op1(menu){
	if(anterior1){
		anterior1.style.color = "";
		anterior1.style.fontWeight = "normal";
	}
	
	anterior1 = menu;
	
	anterior1.style.color = "blue";
	anterior1.style.fontWeight = "bold";
}

// Ilumina la opción seleccionada en el menú lateral
function op2(menu){
	if(anterior2){
		anterior2.style.color = "";
		anterior2.style.fontWeight = "normal";
		anterior2.style.backgroundImage = "";
	}
	
	anterior2 = menu;
	
	anterior2.style.color = "red";
	anterior2.style.fontWeight = "bold";
	anterior2.style.backgroundImage = "url(img/menu_on.gif)";
}

function doLoad(){
	opA(document.all.opDef);
}

function hideAllOp(){
	if(document.all.opA) document.all.opA.style.display = "none";
	if(document.all.opB) document.all.opB.style.display = "none";	
	if(document.all.opC) document.all.opC.style.display = "none";
	if(document.all.opD) document.all.opD.style.display = "none";
	if(document.all.opE) document.all.opE.style.display = "none";
	if(document.all.opF) document.all.opF.style.display = "none";
}

function opA(menu){

	hideAllOp();
			
	if(document.all.opA) document.all.opA.style.display = "block";		
	
	op2(menu);
	
	
}

function opB(menu){
	hideAllOp();
		
	if(document.all.opB) document.all.opB.style.display = "block";
	op2(menu);	
}

function opC(menu){
	hideAllOp();
		
	if(document.all.opC) document.all.opC.style.display = "block";
	
	op2(menu);	
}

function opD(menu){
	hideAllOp();
		
	if(document.all.opD) document.all.opD.style.display = "block";
	
	op2(menu);	
}

function opE(menu){
	hideAllOp();
	
	if(document.all.opE) document.all.opE.style.display = "block";
	
	op2(menu);	
}

function opF(menu){
	hideAllOp();
		
	if(document.all.opF) document.all.opF.style.display = "block";
	
	op2(menu);	
}

