<!--
function setaMenu( eID, dados ){var e = document.getElementById( eID );if ( e != null ){e.onmouseover = function() { menu.exibir( eID, dados ) };e.onmouseout = function() { menu.esconder() };}}function MenuDropDown(){this.div = null;this.ifr = null;this.time = null;this.retorno = '';this.elemento = null;this.timeOutAtivo = 0;this.xID = 0;this.ultimo = '';this.cssSel = '';this.cssLinha = '';this.cssTabela = '';this.IE = ( navigator.userAgent.toLowerCase().indexOf('msie') != -1 );this.FF = ( ( navigator.userAgent.toLowerCase().indexOf('mozilla') != -1 ) && ( navigator.userAgent.toLowerCase().indexOf('msie') <= 0 ) );}MenuDropDown.prototype.iniciarDiv = function( id ){var obj = document.getElementById( id );var obj2 = obj;var tip = 0;if ( ! obj ){obj = document.body;obj2 = obj.firstChild;tip = 1;}if ( this.div != null ){return;}window.menu = this;var div2 = document.createElement( 'div' );var ifr = document.createElement( 'IFRAME' );div2.id = 'div_'+ ( ( new Date ).getTime() );div2.style.position = 'absolute';div2.style.display = 'none';div2.style.zIndex = 1500;div2.style.padding = '0px';div2.style.margin = '0px';ifr.id = '_ifr_menu';ifr.src = 'javascript:;';ifr.scrolling  = 'no';ifr.frameborder  = 'no';ifr.style.border = '0px';ifr.style.position = 'absolute';ifr.style.top  = '0px';ifr.style.left  = '0px';ifr.style.display = 'none';ifr.style.border = '0px';ifr.style.zIndex = div2.style.zIndex - 1;if ( ! obj )return;if ( tip != 1 ){obj.parentNode.insertBefore( div2, obj2 );obj.parentNode.insertBefore( ifr, obj2 );}else{obj.insertBefore( div2, obj2 );obj.insertBefore( ifr, obj2 );}this.div = div2;this.ifr = ifr;};MenuDropDown.prototype.atualizar = function( id ){if ( this.timeOutAtivo == 1 ){this.selecionar( id );this.timeOutAtivo = 0;clearTimeout( this.time );}else{this.timeOutAtivo = 0;}};MenuDropDown.prototype.exibir = function( id, arrDados ){this.atualizar();this.limpar();this.elemento = document.getElementById( id );if ( !this.__eArray( arrDados ) ){return false;}for ( var chave in arrDados ){dados = arrDados[ chave ];this.adiciona( '<a href="'+ dados[ 1 ] +'">'+ dados[ 0 ] +'</a>' );}xy = this.pegaPosicao();this.div.innerHTML = this.ToString();this.div.style.top = xy[ 1 ] +'px';this.div.style.left = xy[ 0 ] +'px';this.div.style.display = '';this.ifr.style.width   = parseInt( this.div.offsetWidth )  + 'px';this.ifr.style.height  = parseInt( this.div.offsetHeight ) + 'px';this.ifr.style.top = xy[ 1 ] +'px';this.ifr.style.left = xy[ 0 ] +'px';this.ifr.style.display = '';};MenuDropDown.prototype.esconder = function(){if ( this.timeOutAtivo != 1 ){this.time = setTimeout( 'window.menu.esconder2("'+ this.div.id +'");', 800 );this.timeOutAtivo = 1;}};MenuDropDown.prototype.esconder2 = function ( id ){var e = document.getElementById( id );var ifr = document.getElementById( '_ifr_menu' );if ( e != null ){e.style.display = 'none';ifr.style.display = 'none';}};MenuDropDown.prototype.pegaPosicao = function(){var x = this.posicaoX();var y = this.posicaoY();return [ x, y ];};MenuDropDown.prototype.posicaoX = function(){var temp = this.elemento;var x = temp.offsetLeft;while( ( temp = temp.offsetParent ) != null ){x += temp.offsetLeft;}return x;};MenuDropDown.prototype.posicaoY = function(){var temp = this.elemento;var oY = temp.offsetHeight;var y = temp.offsetTop;while( ( temp = temp.offsetParent ) != null ){y += temp.offsetTop;}return ( y + oY );};MenuDropDown.prototype.__eArray = function( arr ){if ( ( typeof( arr ) == 'object' ) && ( typeof( arr.length ) != 'undefined' ) ){return true;}return false;};MenuDropDown.prototype.adiciona = function( str ){id = this.idSub();this.retorno += '<li id='+ id +' onMouseOver="menu.atualizar(\''+ id +'\');" onMouseOut="menu.esconder();">'+ str +'</li>';++this.xID;};MenuDropDown.prototype.ToString = function(){var retorno = '<ul class="'+ this.cssTabela +'">';retorno += this.retorno;retorno += '</ul>';return retorno;};MenuDropDown.prototype.limpar = function(){this.retorno = '';};MenuDropDown.prototype.selecionar = function( id ){this.desSelecionar( this.ultimo );this.setaNomeClasse( id, this.cssSel );this.ultimo = id;};MenuDropDown.prototype.desSelecionar = function( id ){this.setaNomeClasse( id, this.cssLinha );};MenuDropDown.prototype.setaNomeClasse = function( id, nomeClasse ){var elemento = document.getElementById( id );if ( elemento != null ){elemento.className = nomeClasse;}};MenuDropDown.prototype.idSub = function(){return 'sub_'+ this.xID +'_'+ this.div.id;};MenuDropDown.prototype.setaCSS = function( arrCSS ){this.cssLinha = arrCSS['linha'];this.cssTabela = arrCSS['tabela'];this.cssSel = arrCSS['selecionado'];};
//-->
