


	var IEx  = (document.all && document.all.item)	// IExplorer ...
	var NS4  = (document.layers)			// se o Browser utiliza LAYERS... (ex: Netscape 4)

	// valores de default ...
	var imgDir	  = ""						// local das imagens
	var imgExt	  = ".GIF"					// extensão usada pelas imagens
	var TAB_width = 200						// largura da tabela do Menu
	var TR_height = 30						// altura das linhas do Menu


/********************************************************/


function menu_Def( top, left ) {
	if (NS4) { top += 2;  left += 2 }

	DIV_LAYER( top, left )					// inicia um DIV/LAYER em: Top, Left

	document.write( "<TABLE width="+TAB_width+" cellspacing=0 cellpadding=0>" )
}


function menu_End() {
	document.write("</TABLE>  </LAYER> </DIV>")
}

		
// Barra de menu vertical
function menu_Bar( mx )  {
	document.write( "<TR height="+TR_height+">" )
	mTD_Bar( mx )
	document.write( "</TR>" )
}

		
// Barra de menu vertical - disabled
function menu_Off( mx )  {
	document.write( "<TR>" )
	mTD_Off( mx )
	document.write( "</TR>" )
}


// Barra de menu horizontal
function mTD_Bar( mx )  {
	var htm, id, img, url, alt, imgH, cod

	id=Menu[mx][0];  img=imgDir+Menu[mx][1]; alt=Menu[mx][4]

	url = get_prefix(Menu[mx][3]) + Menu[mx][2]

	imgH = img + "-H" + imgExt

	MM_preloadImages( imgH )		// carregar as imagens de "Highlight"

	cod = "ratoOver('"+id+"','','"+imgH+"',1, this,event,'"+alt+"')"

	htm  = "<TD class='barTD'>"
	htm += "<A	onMouseOut =\"ratoOut()\"	href=\""+url+"\" "
	htm += "	onMouseOver=\""+cod+"\">"
	htm += "<IMG name='"+id+"' src='"+img+imgExt+"' border=0>"
	htm += "</A> </TD>"

	document.write(htm)
}

		
function ratoOver( id,p1,img,p2, obj,evnt,tip )  {
	MM_swapImage(id,p1,img,p2)			// trocar a imagem Normal pela Highlight...
	showtip(obj,evnt,tip)				// exibir o tooltip...
	painel( id )						// exibir painel
}

		
function ratoOut()  {
	MM_swapImgRestore()					// repor a imagem Normal...
	hidetip()							// remover o tooltip...
}


// definir o prefixo do Url de acordo com o indicado e com o browser...		
function get_prefix( pre )  {
	// não usar prefixo se:		
	if ( IEx || (pre!="x" && !NS4) )	pre = ""
	return ( pre )
}

		
// Barra de menu horizontal - disabled
function mTD_Off( mx )  {
	var htm = "<IMG src='" + imgDir+Menu[mx][1] + "-O"+imgExt+"' border=0>"
	document.write( "<TD>" + htm + "</TD>" )
}


/*----------  inicia um DIV/LAYER em: Top, Left  -----------*/
function DIV_LAYER( top, left ) {
	if (NS4) htm = "<LAYER top='"+top+"' left='"+left+"'>"	 // ... utiliza LAYERS
		else htm = "<DIV style='position:absolute; top:"+top+"; left:"+left+"'>"	
	document.write( htm );
}


/*----------  Escreve "htm" dentro de um DIV/LAYER em: Top, Left   -----------*/
function WritePos( top, left, htm ) {
	DIV_LAYER( top, left )
	document.write( htm + " </LAYER> </DIV>")
}


/*----------  abre uma nova janela   -----------*/
function neWind( Url ) {
	var Opc, Wnd
	Opc = "'toolbar=0,location=0,directories=0,status=0,menubar=0,width=450,height=450,scrollbars=1,resizable=1'"
	Url = "WinNavig.asp?Url=" + Url
	Wnd = window.open( Url, "NeWindow", Opc)
}

				
/*----------  exibe uma imagem  -----------*/
function ShwImg( img ) {
	var cls = (NS4) ? "" : "class='mini'"	
	var src = pDir + "mini/m_" + img
	var clk = 'neWind("' + pDir + img + '")'
	var tip = 'showtip(this,event,"Visualizar ampliação")'

	var htm = "<A href='javascript:" + clk + "' onmouseover='"+tip+"' onmouseout='hidetip()'>"
	htm += "<img "+cls+" src='"+src+"' border=0></A> \n"
	document.write( htm )
}

				

// ---------------------------------------------------------
//	...		onmouseover="showtip(this,event,'...texto...')"
//	...		onmouseout ="hidetip()"

// show ToolTip 
function showtip( obj, evnt, tip )   {
	var lay
	if (NS4)   {			// se NS4 ...
			lay ="<LAYER bgColor='#FFFFE7' style='border:1px solid black;"
			lay+=   "font-size:12px;color:#000000;'>"+tip+"</LAYER>"
			document.tooltip.document.write( lay )
			document.tooltip.document.close()
			document.tooltip.left		= evnt.pageX+5
			document.tooltip.top		= evnt.pageY+5
			document.tooltip.zIndex		= 20
			document.tooltip.visibility = 'show' }
		else {
			obj.title = tip	    
		}
}

// Remover o ToolTip ...
function hidetip()	{
	if (NS4)  document.tooltip.visibility='hidden'
}


// Definir o ToolTip (NS4) ...
function def_Tip()	{
	if (NS4) document.write("<DIV id='tooltip' style='position:absolute;visibility:hidden'></DIV>")
}
