<html><head><meta name="color-scheme" content="light dark"></head><body><pre style="word-wrap: break-word; white-space: pre-wrap;">var ctm=null;
var target=0;
var menuLayers = {
  timer: null,
  activeMenuID: null,
  mouseOutActivo:true,
  offX: 4,   // horizontal offset 
  offY: 11,   // vertical offset 
  show: function(id, e,obj,ignXPos) {
  	if (this.activeMenuID!=null){//Esconde menu anterior
		menuLayers.hideNow();	
  	}
  	target=obj;
    var mnu = document.getElementById? document.getElementById(id): null;
    mnu.style.display='block';
  	
	try {parent.resizeIframe("myframeB",150);} catch (e1) {}	/**Efetua resize do iframe*/
	
    if (!mnu) return;

    if (id=='mnuent')
    {
    	mnu.innerHTML='';	//Limpa conteudos anteriores
		mnu.style.width="600px";
    }
    else if (id=='mo_div'){		//Caso firefox altera o comprimento do div em certos menus
    	mnu.innerHTML='';	//Limpa conteudos anteriores	
		mnu.style.width="70%";
	}
	else{    
		mnu.style.width="300px";			
	}
    this.activeMenuID = id;
    if ( mnu.onmouseout == null ) mnu.onmouseout = this.mouseoutCheck;
    if ( mnu.onmouseover == null ) mnu.onmouseover = this.clearTimer;
    viewport.getAll();
    this.position(mnu,e,ignXPos);
  },
  hide: function() {
    this.clearTimer();
    if (this.activeMenuID &amp;&amp; document.getElementById &amp;&amp; this.mouseOutActivo){ 
      	this.timer = setTimeout("document.getElementById('"+menuLayers.activeMenuID+"').style.visibility = 'hidden';document.getElementById('"+menuLayers.activeMenuID+"').style.display = 'none';try {parent.resizeIframe('myframeB')} catch (e) {}", 500);

      }
  },
  hideNow: function() {
    this.clearTimer();
    if (this.activeMenuID &amp;&amp; document.getElementById) 
      this.timer = setTimeout("document.getElementById('"+menuLayers.activeMenuID+"').style.visibility = 'hidden'", 30);
  },
  position: function(mnu, e, ignXPos) {
	var x 
  	if (ignXPos==1){	//Ignora a posiÃ§Ã£o x
	  	x= 13;
	}else{
		var x = e.pageX? e.pageX: e.clientX + viewport.scrollX;
	}

    var y = e.pageY? e.pageY: e.clientY + viewport.scrollY;
    
    if ( x + mnu.offsetWidth + this.offX &gt; viewport.width + viewport.scrollX )
      x = x - mnu.offsetWidth - this.offX;
    else x = x + this.offX;
  
    if ( y + mnu.offsetHeight + this.offY &gt; viewport.height + viewport.scrollY )
      y = ( y - mnu.offsetHeight - this.offY &gt; viewport.scrollY )? y - mnu.offsetHeight - this.offY : viewport.height + viewport.scrollY - mnu.offsetHeight;
    else y = y + this.offY;
    
    var offset=null;
    if (isDialogOpen("aux-window-conh")){
		offset = $('#aux-window-conh').offset();    
    }else if(isDialogOpen("aux-window-acoes")){
		offset = $('#aux-window-acoes').offset();        
    }else if(isDialogOpen("aux-window-principal")){    
		offset = $('#aux-window-principal').offset();        
    }
    if (offset!=null){
	    x = x - offset.left;         
	    y = y - offset.top ;     
    }
    /*
    var offset = $('#aux-window-acoes').offset();
    if(!offset){
      offset = $('#aux-window').offset();
    }
    if(offset){
	    x = x - offset.left;         
	    y = y - offset.top ; 
	}
	*/
    
    mnu.style.left = x + "px";
    mnu.style.top = y + "px";
    
    this.timer = setTimeout("document.getElementById('" + menuLayers.activeMenuID + "').style.visibility = 'visible'", 200);
  },
  mouseoutCheck: function(e) {
    e = e? e: window.event;
    // is element moused into contained by menu? or is it menu (ul or li or a to menu div)?
    var mnu = document.getElementById(menuLayers.activeMenuID);
    var toEl = e.relatedTarget? e.relatedTarget: e.toElement;
    if ( mnu != toEl &amp;&amp; !menuLayers.contained(toEl, mnu) ) menuLayers.hide();
  },
  // returns true of oNode is contained by oCont (container)
  contained: function(oNode, oCont) {
    if (!oNode) return; // in case alt-tab away while hovering (prevent error)
    while ( oNode = oNode.parentNode ) 
      if ( oNode == oCont ) return true;
    return false;
  },
  clearTimer: function() {
    if (menuLayers.timer) clearTimeout(menuLayers.timer);

    if (ctm!=null){
	    if (ctm) clearTimeout(ctm);	//Limpa a timeout de chamada presto
	}

  }

}</pre></body></html>