// Funciones para el manejo de los menus de informacion corporativa.
// v1.0 - 2008/06/03 - PRB - Primera Versión

// ---------------------------------------------------------
// Despliega el menu corporativo segun articulo.
function menuCoop() {
    var subMenuArea1  = document.getElementById("subMenuArea1");
    var subMenuArea2  = document.getElementById("subMenuArea2");
    
    if ((subMenuArea1) && (subMenuArea2)) {
        if ((itemMenu != '') && (subMenu != '') && (itemSubMenu != '')) {
          	// Para articulos con submenu.
          	var subMenuArea    = document.getElementById("subMenuArea"+subMenu);
          	var itemMenuSel    = document.getElementById("itemMenu"+itemMenu);
          	var itemSubMenuSel = document.getElementById("itemSubMenu"+subMenu+itemSubMenu);
          	
          	if ((subMenuArea) && (itemMenuSel) && (itemSubMenuSel)) {
              	if (subMenu == 1) { subMenuArea2.style.display = "none"; }
              	if (subMenu == 2) { subMenuArea1.style.display = "none"; }
              	itemMenuSel.className    = "boton visitado";
              	itemSubMenuSel.className = "boton visitado";
            }else{
            	  subMenuArea1.style.display = "none";
            	  subMenuArea2.style.display = "none";        
            };	
        } else {
        	  // Para articulos publicados directamente en el menu ppal.
            subMenuArea1.style.display = "none";
            subMenuArea2.style.display = "none";
            if (itemMenu != '') {
                var itemMenuSel = document.getElementById("itemMenu"+itemMenu);
                //itemMenuSel.style.background = "#00325e";
                if (itemMenuSel) {itemMenuSel.className = "boton visitado"; };
            };
        };
    };
};
