	function ancBtnEmpresa_click(){
			mostrarObjeto(null, 'divSubMnuEmpresa', true);
  		mostrarObjeto(null, "divSubMnuServicios", false);
  		mostrarObjeto(null, "divSubMnuAreas", false);
  		ajustarMenuSobreHtml("divSubMnuEmpresa");
	}
	
	function ajustarMenuSobreHtml(strObj) {
		var divBtn = document.getElementById("divBtnEmpresa");
		var divMenu = document.getElementById(strObj);
		//divMenu.style.position="static";
		divMenu.style.left = findPosLeft(divBtn) + "px";
		//divMenu.style.left = "8" + "px";
		divMenu.style.top = (findPosTop(divBtn)+27) + "px";
		divMenu.style.position="absolute";
  }	
  
	function findPosTop(obj) {
		var curleft = curtop = 0;
		if (obj.offsetParent) {
			do { 
				curtop += obj.offsetTop;
		} while (obj = obj.offsetParent);
		return curtop;
	}
}

function findPosLeft(obj) {
		var curleft = curtop = 0;
		if (obj.offsetParent) {
			do {
				curleft += obj.offsetLeft; 
		} while (obj = obj.offsetParent);
		return curleft;
	}
}


	function ancBtnServicios_click(){
			mostrarObjeto(null, "divSubMnuEmpresa", false);
  		mostrarObjeto(null, "divSubMnuServicios", true);
  		mostrarObjeto(null, "divSubMnuAreas", false);
  		ajustarMenuSobreHtml("divSubMnuServicios");
  }	
  
  function ancBtnAreas_click(iTipo){
  		if (iTipo >= 1) {
				mostrarObjeto(null, "divSubMnuEmpresa", false);
	  		mostrarObjeto(null, "divSubMnuServicios", false);
	  		mostrarObjeto(null, "divSubMnuAreas", true);
  		}
  		if (iTipo >= 2) {
	  		mostrarObjeto(null, "divSubMnuAreasInfHid", false);
	  		mostrarObjeto(null, "divSubMnuAreasInfVia", false);
	  		mostrarObjeto(null, "divSubMnuAreasInfAud", false);
	  		mostrarObjeto(null, "divSubMnuAreasInfEdi", false);
  		}
  		if (iTipo >= 3) {
	  		mostrarObjeto(null, "divSubMnuAreasTurPla", false);
	  		mostrarObjeto(null, "divSubMnuAreasTurPro", false);
  	  }
  		ajustarMenuSobreHtml("divSubMnuAreas");
  }	
  
  function ancBtnMenuInfra_click(){
  		var divSubMnuAreasInfHid = document.getElementById('divSubMnuAreasInfHid');
  		mostrarObjeto(null, "divSubMnuAreasInfHid", !esVisibleObjeto(divSubMnuAreasInfHid));
  		mostrarObjeto(null, "divSubMnuAreasInfVia", esVisibleObjeto(divSubMnuAreasInfHid));
  		mostrarObjeto(null, "divSubMnuAreasInfAud", esVisibleObjeto(divSubMnuAreasInfHid));
  		mostrarObjeto(null, "divSubMnuAreasInfEdi", esVisibleObjeto(divSubMnuAreasInfHid));
  		
  		//mostrarObjeto(null, "divSubMnuAreasTurPla", false);
  		//mostrarObjeto(null, "divSubMnuAreasTurPro", false);
  }
  
  function ancBtnMenuTurismo_click(){
  		//mostrarObjeto(null, "divSubMnuAreasInfHid", false);
  		//mostrarObjeto(null, "divSubMnuAreasInfVia", false);
  		//mostrarObjeto(null, "divSubMnuAreasInfAud", false);
  		//mostrarObjeto(null, "divSubMnuAreasInfEdi", false);
  		var divSubMnuAreasTurPla = document.getElementById('divSubMnuAreasTurPla');
  		mostrarObjeto(null, "divSubMnuAreasTurPla", !esVisibleObjeto(divSubMnuAreasTurPla));
  		mostrarObjeto(null, "divSubMnuAreasTurPro", esVisibleObjeto(divSubMnuAreasTurPla));
  }
  
  function divBtnEmpresa_onmouseover(){
  	var imgEmpresa = document.getElementById('imgEmpresa');
    imgEmpresa.setAttribute('src', 'img/bot_empresa_2.jpg');
    
    var imgServicios = document.getElementById('imgServicios');
    imgServicios.setAttribute('src', 'img/bot_servicios_1.jpg');
    
    	var imgAreas = document.getElementById('imgAreas');
    imgAreas.setAttribute('src', 'img/bot_areas_1.jpg');
    ancBtnEmpresa_click();
    return true;
  }

	function divBtnEmpresa_onmouseout(){
  	var imgEmpresa = document.getElementById('imgEmpresa');
    imgEmpresa.setAttribute('src', 'img/bot_empresa_1.jpg');
    return true;
  }
  
  function divBtnServicios_onmouseover(){
  	var imgEmpresa = document.getElementById('imgEmpresa');
    imgEmpresa.setAttribute('src', 'img/bot_empresa_1.jpg');
    
    var imgServicios = document.getElementById('imgServicios');
    imgServicios.setAttribute('src', 'img/bot_servicios_2.jpg');
    
    	var imgAreas = document.getElementById('imgAreas');
    imgAreas.setAttribute('src', 'img/bot_areas_1.jpg');
    ancBtnServicios_click();
    return true;
  }

	function divBtnServicios_onmouseout(){
  	var imgServicios = document.getElementById('imgServicios');
    imgServicios.setAttribute('src', 'img/bot_servicios_1.jpg');
    return true;
  }
  
  function divBtnAreas_onmouseover(iTipo){
  	cambiarBtnAreas_a_Seleccionado();
  	var imgEmpresa = document.getElementById('imgEmpresa');
    imgEmpresa.setAttribute('src', 'img/bot_empresa_1.jpg');
    
    var imgServicios = document.getElementById('imgServicios');
    imgServicios.setAttribute('src', 'img/bot_servicios_1.jpg');
    ancBtnAreas_click(iTipo);
    return true;
  }
  
  function cambiarBtnAreas_a_Seleccionado(){
  	var imgAreas = document.getElementById('imgAreas');
    imgAreas.setAttribute('src', 'img/bot_areas_2.jpg');
    return true;
  }

	function divBtnAreas_onmouseout(){
  	var imgAreas = document.getElementById('imgAreas');
    imgAreas.setAttribute('src', 'img/bot_areas_1.jpg');
    return true;
  }
  
  function divBtnClientes_onmouseover(){
  	var imgClientes = document.getElementById('imgClientes');
    imgClientes.setAttribute('src', 'img/bot_clientes_2.jpg');
    
    var imgEmpresa = document.getElementById('imgEmpresa');
    imgEmpresa.setAttribute('src', 'img/bot_empresa_1.jpg');
    
    var imgServicios = document.getElementById('imgServicios');
    imgServicios.setAttribute('src', 'img/bot_servicios_1.jpg');
    
    var imgAreas = document.getElementById('imgAreas');
    imgAreas.setAttribute('src', 'img/bot_areas_1.jpg');
    
  	mostrarObjeto(null, "divSubMnuEmpresa", false);
		mostrarObjeto(null, "divSubMnuServicios", false);
		mostrarObjeto(null, "divSubMnuAreas", false);
    return true;
  }

	function divBtnClientes_onmouseout(){
  	var imgClientes = document.getElementById('imgClientes');
    imgClientes.setAttribute('src', 'img/bot_clientes_1.jpg');
    return true;
  }
  
  function divBtnContacto_onmouseover(){
  	var imgContacto = document.getElementById('imgContacto');
    imgContacto.setAttribute('src', 'img/bot_contacto_2.jpg');
    
    var imgEmpresa = document.getElementById('imgEmpresa');
    imgEmpresa.setAttribute('src', 'img/bot_empresa_1.jpg');
    
    var imgServicios = document.getElementById('imgServicios');
    imgServicios.setAttribute('src', 'img/bot_servicios_1.jpg');
    
    	var imgAreas = document.getElementById('imgAreas');
    imgAreas.setAttribute('src', 'img/bot_areas_1.jpg');
    
    mostrarObjeto(null, "divSubMnuEmpresa", false);
		mostrarObjeto(null, "divSubMnuServicios", false);
		mostrarObjeto(null, "divSubMnuAreas", false);

    return true;
  }

	function divBtnContacto_onmouseout(){
  	var imgContacto = document.getElementById('imgContacto');
    imgContacto.setAttribute('src', 'img/bot_contacto_1.jpg');
    return true;
  }
   
  
  function mostrarObjeto(varObjeto, idObjeto, blnMostrar){
	  if(varObjeto == null){
	    if(idObjeto == null){
	      //nqfh: decidir si existirá esta variable
	//      if(DEBUG){
	        alert('No se mandaron los parámetros de la función mostrarObjeto');
	//      }
	      return false;
	    }
	    varObjeto = document.getElementById(idObjeto);
	    if (varObjeto == null){
	      alert('No existe el objeto ' + idObjeto);
	      return false;
	    }
	  }
	  if (blnMostrar == true){
	    varObjeto.style.display = '';
	  } else {
	    varObjeto.style.display = 'none';
	  }
	  return true;
	}
	
	function esVisibleObjeto(Objeto){
	  if (Objeto.style.display =="none"){
	    return false;
	  } else {
	    return true;
	  }
}
