
	var IEx  = (document.all && document.all.item)	// IExplorer ...
	var NS4  = (document.layers)			// se o Browser utiliza LAYERS... (ex: Netscape 4)
	var Menu = new Array()					// declarar o array de menus
	var iDir = "img/"						// local das imagens
	var pDir = "portfolio/"					// local das imagens do portfólio

	/* definição:  		img(-H.gif)	==> a correspondente imagem "Highlight"
				  id,	img(.gif), url,			 ~IE	alt						*/

	/*    menu principal    */
	Menu[0]	 = [ 'n0', 'M_Apres', 'M_Apres.htm', 'x', 'Apresentação da empresa ...' ]
	Menu[1]	 = [ 'n1', 'M_Estud', 'M_Estud.htm', 'x', 'Alguns aspectos do estúdio ...' ]
	Menu[2]	 = [ 'n2', 'M_Portf', 'M_PFprod.htm', '', 'Uma pequena amostra de um vasto portfólio ...' ]
	Menu[3]	 = [ 'n3', 'M_Cont',  'M_Cont.htm',	 'x', 'Há várias formas de contactar ...' ]

	/*    menu do Portfólio    */
	Menu[4]	 = [ 'P4', 'B_prod',  'M_PFprod.htm', '', 'Algumas fotografias de produtos ...' ]
	Menu[5]	 = [ 'P5', 'B_ilust', 'M_PFilus.htm', '', 'Algumas fotografias de ilustração ...' ]
	Menu[6]	 = [ 'P6', 'B_int',   'M_PFint.htm',  '', 'Algumas fotografias de interiores ...' ]
	Menu[7]	 = [ 'P7', 'B_ind',   'M_PFind.htm',  '', 'Algumas fotografias de indústria ...' ]


/********************************************************/


function menu_Def( top, left, img ) {

	menu_BG_Sup()				// FUNDO: barra Horizontal Superior
	menu_BG_Esq()				//   "	  barra Vertical Esquerda
	menu_BG_Img( img )			//	 "	  imagem do Fundo / Menu

	DIV_LAYER( top, left )		// inicia um DIV/LAYER em: Top, Left

	document.write( "<TABLE cellspacing=0 cellpadding=0>" )
}


function menu_End() {
	document.write("</TABLE>  </LAYER> </DIV>")
}

		
// Barra de menu vertical
function menu_Bar( mx )  {
	document.write( "<TR>" )
	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=iDir+Menu[mx][1]; alt=Menu[mx][4]

	url = get_prefix(Menu[mx][3]) + Menu[mx][2]

	imgH = img + "-H.gif"

	MM_preloadImages( imgH )		// carregar as imagens de "Highlight"

	cod = "ratoOver('"+id+"','','"+imgH+"',1, this,event,'"+alt+"')"

	htm  = "<TD>"
	htm += "<A	onMouseOut =\"ratoOut()\"	href=\""+url+"\" "
	htm += "	onMouseOver=\""+cod+"\">"
	htm += "<IMG name='"+id+"' src='"+img+".gif' 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...
}

		
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='" + iDir+Menu[mx][1] + "-O.gif' border=0>"
	document.write( "<TD>" + htm + "</TD>" )
}



/*---------  FUNDO: barra Horizontal Superior  ---------*/
function menu_BG_Sup() {
	var htm, hgt
	if (NS4)  { 
			hgt = 47
			document.write("<LAYER top='-2' left='0'>") }
		else {
			hgt = 45
			document.write("<DIV style='position:absolute;top:0;left:0'>")
		}
	htm  = "<TABLE  cellspacing='0' cellpadding='0'"
	htm += "  Width='1200' Height='"+hgt+"' BackGround='"+iDir+"Menu-BG-T.gif'>"
	htm += "<tr><td> &nbsp; </td></tr></TABLE>"
	htm += "</LAYER></DIV>"
	document.write(htm)
}


/*----------  FUNDO: barra Vertical Esquerda  ----------*/
function menu_BG_Esq() {
	var htm, wid
	if (NS4)  { 
			wid = 18
			document.write("<LAYER top='0' left='-2'>") }
		else {
			wid = 15
			document.write("<DIV style='position:absolute;top:0;left:0'>")
		}
	htm  = "<TABLE  cellspacing='0' cellpadding='0'"
	htm += "  Width='"+wid+"'  Height='1000' BackGround='"+iDir+"Menu-BG-L.gif'>"
	htm += "<tr><td> &nbsp; </td></tr></TABLE>"
	htm += "</LAYER></DIV>"
	document.write(htm)
}


/*----------  FUNDO: imagem do Fundo / Menu  -----------*/
function menu_BG_Img( img ) {
	var htm
	DIV_LAYER( 0, 0 )		// inicia um DIV/LAYER em: Top, Left
	htm  = "<IMG src='" + iDir+img + "'>"
	htm += "</LAYER></DIV>"
	document.write(htm)
}


/*----------  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>")
}
