	   //--------------------------------------------------------------------
	  //
	 //		GERAR MENU PARA ÍNDICES
	//
   //		por: FFS		Out/2003
  //
 //--------------------------------------------------------------------------


function FFSindice( menu, id, clas, ops )  {
	if (id  ==null)  id  = "idx"
	if (clas==null)  clas= id
	if (ops ==null)  ops = "onMouseOver='this.title=\"ver informação ...\"'"

	this.menu	= menu				// dados: [ ['bar1','url1'], ['bar2','url2']... ]
	this.id		= id				// id do DIV (container)
	this.clas	= clas				// prefixo dos styles
	this.ops	= ops				// opções para o corpo
	this.gif	= "indice_"			// prefixo das imagens
	this.dir	= ""				// directório das imagens (deve acabar com /)
	this.tit	= "Indice"			// título
	this.pos	= "D"				// posição do título: D=Direita / E=Esquerda / ""=none
	this.ori	= "V"				// orientação: H=Horizontal / V=Vertical
	this.wid	= ""				// largura: ""=variável (ex: "120", "80%")
	this.vis	= 0					// visível: 1=Sim / 0=Não
	this.corText= "#C0D0E0"			// cor do texto
	this.corLink= "#EEBB99"			// cor do Link (normal)
	this.corLnkH= "#FFFFFF"			// cor do Link (highlight) 
	this.corLnkB= "#555577"			// cor do fundo do Link (highlight) 
	this.corBack= "#132750"			// cor do fundo global

	this.define	= indice_def		// criar a estrutura do objecto
	this.show	= indice_show		// mostrar(1) / esconder(0) o objecto
	this.styles	= indice_sty		// criar os estilos adequados


	// criar a estrutura do objecto
	function indice_def()  {
		var htm, i, img, brk, HED = ""
		with (this) {
			brk = (ori=="H") ? "" : "<br>"		
			img = dir + gif
			if (pos!="")  HED = heading(this,img)

			htm = "<TABLE id='"+id+"' cellspacing=0 cellpadding=0>"+ HED
				+ "	<TR> <TD><img src='"+img+"Fno.gif'></TD>"
				+ "		<TD class='"+clas+"RpH' background='"+img+"Fn.gif'> </TD>"
				+ "		<TD><img src='"+img+"Fne.gif'></TD> </TR>"
				+ " <TR><TD class='"+clas+"RpV' background='"+img+"Fo.gif'> </TD> <TD>"
				+ "<DIV class='"+clas+"DAT' "+ops+">"
			document.write( htm )

			htm = ""
			for ( i=0; i<menu.length; i++ ) 
				htm += "<A class='"+clas+"Lnk' href='"+menu[i][1]+"'>"+menu[i][0]+"</A>"+brk

			document.write( htm )
			
			htm = "</DIV></TD>"
				+ "		<TD class='idxRpV' background='"+img+"Fe.gif'></TD> </TR>"
				+ " <TR> <TD><img src='"+img+"Fso.gif'></TD>"
				+ "		<TD class='idxRpH' background='"+img+"Fs.gif'> </TD>"
				+ "		<TD><img src='"+img+"Fse.gif'></TD>	</TR> </TABLE>"
			document.write( htm )
		}
	}

	function heading( obj, img )  {
		var htm, imH, hdE, hdD = ""
		imH = img + obj.pos			
		hdE = "<TD width='100%'> </TD>"
		if (obj.pos=="E")  { hdD = hdE;  hdE = "" }
		htm = "<TR><TD colspan=3> <TABLE cellspacing=0 cellpadding=0>"
			+ "		<TR>"+hdE+"<TD><img src='"+imH+"e.gif'></TD><TD id='"+obj.clas+"RpT' "
			+ "		       nowrap background='"+imH+"m.gif'>"+obj.tit+"</TD>"
			+ "		<TD><img src='"+imH+"d.gif'></TD>"+hdD+"</TR> </TABLE> </TD>	</TR>"
		return  (htm)
	}


	// mostrar(1) / esconder(0) o objecto
	function indice_show( vis )  {
		if (vis==null)	vis = !this.vis
		this.vis = vis
		vis = (vis)	? 'block' : 'none'
		document.getElementById(this.id).style.display = vis
	}


	// criar os estilos adequados...
	function indice_sty()  {
		var w = this.wid
		if (this.wid!="") w = "width:"+w
		htm = '<STYLE type="text/css">'
			+ '	#<i>			{ display:none; }'
			+ '	.<i>DAT			{ font:normal 11 arial,verdana,tahoma; '
			+ '						padding:5; letter-spacing:1; background-color:<Back> }'

			+ '	.<i>RpH,.<i>RpT { background-repeat: repeat-x; background-color:<Back> }'
			+ '	.<i>RpV			{ background-repeat: repeat-y; background-color:<Back> }'

			+ '	#<i>RpT			{ color:<Text>; text-align:center; padding:0 8 0 8;'
			+ '						font:bold 13 arial,verdana,tahoma; letter-spacing:1 }'

			+ '	.<i>Lnk			{ color:<Link>; margin:2; padding:2 2 2 6;'
			+ '						text-decoration:none; '+ w +'}'
			+ '	.<i>Lnk:hover	{ color:<LnkH>; background-color:<LnkB>; }'
			+ '</STYLE>'
		htm = htm.replace( /<i>/g,		this.id		 )
		htm = htm.replace( /<Text>/g,	this.corText )
		htm = htm.replace( /<Link>/g,	this.corLink )
		htm = htm.replace( /<LnkH>/g,	this.corLnkH )
		htm = htm.replace( /<LnkB>/g,	this.corLnkB )
		htm = htm.replace( /<Back>/g,	this.corBack )

		document.write( htm )
	}
}
