navegador=navigator.appName;
versao=parseInt(navigator.appVersion);
var ok=false;
if(navegador=="Netscape"||versao>2)
	ok=true;
if(ok){
		
		ia1=new Image;
		ia1.src="../includes/menu_int/menu_int_01.jpg";
		ia2=new Image;
		ia2.src="../includes/menu_int/menu_int_01.jpg";
		
		
		ib1=new Image;
		ib1.src="../includes/menu_int/menu_int_02.jpg";
		ib2=new Image;
		ib2.src="../includes/menu_int/menu_int_02.jpg";
		
		
		ic1=new Image;
		ic1.src="../includes/menu_int/menu_int_03.jpg";
		ic2=new Image;
		ic2.src="../includes/menu_int/menu_int_03.jpg";
		
		
		id1=new Image;
		id1.src="../includes/menu_int/menu_int_04.jpg";
		id2=new Image;
		id2.src="../includes/menu_int/menu_int_04.jpg";
		
		ie1=new Image;
		ie1.src="../includes/menu_int/menu_int_05.jpg";
		ie2=new Image;
		ie2.src="../includes/menu_int/menu_int_05.jpg";
		
		if1=new Image;
		if1.src="../includes/menu_int/menu_int_06.jpg";
		if2=new Image;
		if2.src="../includes/menu_int/menu_int_06.jpg";
		
		ig1=new Image;
		ig1.src="../includes/menu_int/menu_int_07.jpg";
		ig2=new Image;
		ig2.src="../includes/menu_int/menu_int_07.jpg";
		
		ih1=new Image;
		ih1.src="../includes/menu_int/menu_int_08.jpg";
		ih2=new Image;
		ih2.src="../includes/menu_int/menu_int_08.jpg";
		
		ii1=new Image;
		ii1.src="../includes/menu_int/menu_int_09.jpg";
		ii2=new Image;
		ii2.src="../includes/menu_int/menu_int_09.jpg";

		ij1=new Image;
		ij1.src="../includes/menu_int/menu_int_10.jpg";
		ij2=new Image;
		ij2.src="../includes/menu_int/menu_int_10.jpg";
		
		ik1=new Image;
		ik1.src="../includes/menu_int/menu_int_11.jpg";
		ik2=new Image;
		ik2.src="../includes/menu_int/menu_int_11.jpg";
		
		il1=new Image;
		il1.src="../includes/menu_int/menu_int_12.jpg";
		il2=new Image;
		il2.src="../includes/menu_int/menu_int_12.jpg";
		
		im1=new Image;
		im1.src="../includes/menu_int/menu_int_13.jpg";
		im2=new Image;
		im2.src="../includes/menu_int/menu_int_13.jpg";

		
				
		}

function ImgFunc(imgDocID,imgObjName){
		if(ok){
			document.images[imgDocID].src=eval(imgObjName+".src")
		}
}

var tabela;
tabela = "<table width=760 border=0 cellpadding=0 cellspacing=0><tr><td width=760 height=22 valign=top><a href=../gestao/gestao.php><img src=../includes/menu_int/menu_int_01.jpg width=197 height=22 border=0 alt name=ia1></a><a href=../gerenciamento/gerenciamento.php><img src=../includes/menu_int/menu_int_02.jpg width=253 height=22 border=0 alt name=ib1></a><a href=# onMouseOver=popUp('elMenu1',event),ImgFunc('ic1','ic2') onMouseOut=popDown('elMenu1'),ImgFunc('ic1','ic1')><img src=../includes/menu_int/menu_int_03.jpg width=115 height=22 border=0 alt name=ic1></a><a href=../legislacao/legislacao.php><img src=../includes/menu_int/menu_int_04.jpg width=195 height=22 border=0 alt name=id1></a></td></tr><tr><td valign=top height=23><a href=# onMouseOver=popUp('elMenu2',event),ImgFunc('ie1','ie2') onMouseOut=popDown('elMenu2'),ImgFunc('ie1','ie1')><img src=../includes/menu_int/menu_int_05.jpg width=241 height=23 border=0 alt name=ie1></a><a href=../projecao/projecao.php><img src=../includes/menu_int/menu_int_06.jpg width=247 height=23 border=0 alt name=if1></a><a href=# onMouseOver=popUp('elMenu3',event),ImgFunc('ig1','ig2') onMouseOut=popDown('elMenu3'),ImgFunc('ig1','ig1')><img src=../includes/menu_int/menu_int_07.jpg width=94 height=23 border=0 alt name=ig1></a><a href=# onMouseOver=popUp('elMenu4',event),ImgFunc('ih1','ih2') onMouseOut=popDown('elMenu4'),ImgFunc('ih1','ih1')><img src=../includes/menu_int/menu_int_08.jpg width=178 height=23 border=0 alt name=ih1></a></td></tr><tr><td height=21 valign=top><a href=# onMouseOver=popUp('elMenu5',event),ImgFunc('ii1','ii2') onMouseOut=popDown('elMenu5'),ImgFunc('ii1','ii1')><img src=../includes/menu_int/menu_int_09.jpg width=149 height=20 border=0 alt name=ii1></a><a href=# onMouseOver=popUp('elMenu6',event),ImgFunc('ij1','ij2') onMouseOut=popDown('elMenu6'),ImgFunc('ij1','ij1')><img src=../includes/menu_int/menu_int_10.jpg width=171 height=20 border=0 alt name=ij1></a><a href=# onMouseOver=popUp('elMenu7',event),ImgFunc('ik1','ik2') onMouseOut=popDown('elMenu7'),ImgFunc('ik1','ik1')><img src=../includes/menu_int/menu_int_11.jpg width=144 height=20 border=0 alt name=ik1></a><a href=# onMouseOver=popUp('elMenu8',event),ImgFunc('il1','il2') onMouseOut=popDown('elMenu8'),ImgFunc('il1','il1')><img src=../includes/menu_int/menu_int_12.jpg width=141 height=20 border=0 alt name=il1></a><a href=# onMouseOver=popUp('elMenu9',event),ImgFunc('im1','im2') onMouseOut=popDown('elMenu9'),ImgFunc('im1','im1')><img src=../includes/menu_int/menu_int_13.jpg width=155 height=20 border=0 alt name=im1></td></tr></table>";
document.write(tabela);

NS4=(document.layers);
IE4=(document.all);
ver4=(NS4||IE4);
isMac=(navigator.appVersion.indexOf("Mac")!=-1);
isMenu=((NS4&&!isMac)||(IE4&&!isMac));
function popUp(){return};
function popDown(){return};
function startIt(){return};
if(!ver4)event=null;
	if(isMenu){
		menuVersion=3;
		menuWidth=106;	 			//largura do menu padrao
		borWid=1;					//largura da borda
		borSty="solid";				//estilo da borda
		borCol="858CAB";			//cor da borda
		separator=1;				//largura do separador
		separatorCol="858CAB";		//cor do separador padrao
		fntFam="verdana";				//fonte do menu
		fntBold=false;				//se fonte é bold
		fntItal=false;				//se fonte eh italico
		fntSiz=8;					//tamanho da fonte padrao
		fntCol="FFFFFF";			//cor de fonte padrao
		overFnt="FFFFFF";			//cor da fonte quando selecionado
		itemPad=2;					//margem do texto a borda
		backCol="000099";			//cor do fundo padrao
		overCol="000066";			//cor do fundo quando selecionado padrao
		imgSrc="seta.gif";      	//imagem para submenu
		imgSiz=10;					//tamanho da imagem do submenu
		childOffset=1;				//deslocamento do submenu em Y
		childOverlap=15;			//deslocamento negativo em X (so funciona se perCentOver for null)
		perCentOver=null;			//percentual do menu coberto pelo sub menu
		clickStart=false;
		clickKill=false;
		secondsVisible=0.5;			//tempo de visilibidade em segundos apos sair do menu
		keepHilite=true;
		NSfontOver=false;
		showVisited=null;
		isFrames=false;
		navFrLoc="left";
		mainFrName="main";
		MenuVPos=263				// posição vertical do Menu
}

if(isMenu){
// Parametros do Menu
// (lagura da tabela,X,Y,"cor da letra","cor da letra quando selecionado",
//						 "cor de fundo","cor de fundo celecionado",
//						 "Cor da borda externa","cor da borda interna"
//						 "item menu", "link item", numero do sub menu (0 caso nao exista)	(esta ultima linha se repete)
    //Modelos Institucionais 
	arMenu1=new Array(260,449,109,"ffffff","ffffff","336666","669999","","","Objetivos","../modelos/modelo.php",0,"Formas de Administração","../modelos/modelo_2.php",0,"Remuneração dos Serviços","../modelos/modelo_3.php",0,"O Cálculo da Taxa de Coleta de Lixo - TCL","../modelos/modelo_4.php",0)

	//Resíduos Sólidos: origem, definição e características
	arMenu2=new Array(300,01,130,"ffffff","ffffff","336666","669999","","","Definição de Lixo e Resíduos Sólidos","../residuossolidos/residuossolidos.php",0,"Classificação dos Resíduos Sólidos","../residuossolidos/residuossolidos_2.php",0,"Características dos Resíduos Sólidos","../residuossolidos/residuossolidos_3.php",0,"Influência das Características dos Resíduos Sólidos","../residuossolidos/residuossolidos_4.php",0,"Fatores que Influenciam as Características dos Resíduos Sólidos","../residuossolidos/residuossolidos_5.php",0,"Processo de Determinação das Principais Características Físicas","../residuossolidos/residuossolidos_6.php",0)

	//Acondicionamento
	arMenu3=new Array(250,488,130,"ffffff","ffffff","336666","669999","","","Conceituação","../acondicionamento/acondicionamento.php",0,"A Importância do Acondicionamento Adequado ","../acondicionamento/acondicionamento_2.php",0,"Características dos Recipientes para Acondicionamento","../acondicionamento/acondicionamento_3.php",0,"Acondicionamento de Resíduo Domiciliar","../acondicionamento/acondicionamento_4.php",0,"Acondicionamento de Resíduo Público","../acondicionamento/acondicionamento_5.php",0,"Acondicionamento de Resíduo em Imóveis de Baixa Renda","../acondicionamento/acondicionamento_6.php",0,"Acondicionamento de Resíduos de Grandes Geradores","../acondicionamento/acondicionamento_7.php",0,"Acondicionamento de Resíduos Domiciliares","../acondicionamento/acondicionamento_8.php",0,"Acondicionamento de Resíduos de Fontes Especiais","../acondicionamento/acondicionamento_9.php",0)

	//Coleta e Trasnporte de Resíduos Sólidos
	arMenu4=new Array(250,508,130,"ffffff","ffffff","336666","669999","","","Coleta e Transporte de Resíduos Sólidos Domiciliares","../coleta/coleta_1.php",0,"Coleta e Transporte de Resíduos Sólidos Públicos","../coleta/coleta_2.php",0,"Coleta e Trasnporte em Cidades Turísticas","../coleta/coleta_3.php",0,"Coleta de Resíduos Sólidos em Favelas","../coleta/coleta_4.php",0,"Coleta de Resíduos de Serviços de Saúde","../coleta/coleta_5.php",0)

    //Tranferência de Resíduos Sólidos
	arMenu5=new Array(200,01,151,"ffffff","ffffff","336666","669999","","","Conceituação","../transferencia/transferencia.php",0,"Tipos de Estações de Transferência","../transferencia/transferencia_2.php",0,"Viaturas e Equipamentos para Estações de Transferência","../transferencia/transferencia_3.php",0)	

	//Limpeza de Logradores Públicos
	arMenu6=new Array(250,149,151,"ffffff","ffffff","336666","669999","","","A Importância da Limpeza de Logradouros públicos","../limpeza/limpeza_1.php",0,"Resíduos Encontrados nos Logradouros","../limpeza/limpeza_2.php",0,"Serviços de Varrição","../limpeza/limpeza_3.php",0,"Serviços de Rapina e Raspagem","../limpeza/limpeza_4.php",0,"Serviços de Roçagem","../limpeza/limpeza_5.php",0,"Serviços de Limpeza de Ralos","../limpeza/limpeza_6.php",0,"Serviços de Limpeza de Feiras","../limpeza/limpeza_7.php",0,"Serviços de Remoção Manual e Mecânica","../limpeza/limpeza_8.php",0,"Serviços de Limpeza de Praias","../limpeza/limpeza_9.php",0,"Como Reduzir o Lixo Público","../limpeza/limpeza_10.php",0,"Limpeza de Logradouros em cidades turísticas","../limpeza/limpeza_11.php",0)

	//Recuperação de Recicláveis 
	arMenu7=new Array(180,320,151,"ffffff","ffffff","336666","669999","","","Recuperação de Recicláveis","../recuperacao/recuperacao.php",0,"Coleta Seletiva Porta-a-Porta","../recuperacao/recuperacao_1.php",0,"Pontos de Entrega Voluntária - PEV","../recuperacao/recuperacao_2.php",0,"Cooperativa de Catadores","../recuperacao/recuperacao_3.php",0)	
		
	//Recuperação de Recicláveis 
	arMenu8=new Array(200,464,151,"ffffff","ffffff","336666","669999","","","Conceituação e Tratamento de Resíduos Sólidos Domiciliares","../tratamento/conceituacao.php",0,"Tratamento de Resíduos Domiciliares Especiais","../tratamento/conceituacao_2.php",0,"Tratamento de Resíduos de Fontes Especiais","../tratamento/conceituacao_3.php",0)	
	
	//Disposição Final dos Resíduos Sólidos
	arMenu9=new Array(250,508,151,"ffffff","ffffff","336666","669999","","","Disposição Final dos Resíduos Sólidos","../disposicao/disposicao.php",0,"Disposição dos Resíduos Domiciliares","../disposicao/disposicao_1.php",0,"Aterro Sanitário","../disposicao/disposicao_2.php",0,"Aterros Controlados","../disposicao/disposicao_3.php",0,"Recuperação Ambiental de Lixões","../disposicao/disposicao_4.php",0,"A Situação dos Catadores","../disposicao/disposicao_5.php",0,"Disposição de Resíduos Domiciliares Especiais","../disposicao/disposicao_6.php",0,"Disposição de Resíduos de Fontes Especiais","../disposicao/disposicao_7.php",0)


		
	loader=(isFrames)?(NS4)?parent:parent.document.body:window;

	loader.onload=startIt;

	if(NS4){
		origWidth=loader.innerWidth;
		origHeight=loader.innerHeight;
		loader.onresize=reDo;
	}
	isLoaded=false;
	NSresized=false;
	if(!window.menuVersion){
		clickKill=showVisited=NSfontOver=keepHilite=clickStart=false;
	}
	isWin=(navigator.appVersion.indexOf("Win")!=-1)
	if(!isWin&&!isMac)NSfontOver=showVisited=false;
	mSecsVis=secondsVisible*1000;
	isRight=(window.navFrLoc&&navFrLoc=="right");
	imgSuf=(isRight)?">":"ALIGN=RIGHT>";
	imgStr="<IMG SRC='"+imgSrc+"' WIDTH="+imgSiz+" HEIGHT="+imgSiz+" BORDER=0 VSPACE=2 "+imgSuf;
	spStr=(isRight&&NS4)?"<SPACER TYPE=HORIZONTAL SIZE="+imgSiz+">":"";
	areCreated=false;
	menuLoc=null;
	function initVars(){
		if(areCreated){
			for(i=1;i<topCount;i++){
				cur=eval("elMenu"+i);
				clearTimeout(cur.hideTimer);
				cur.hideTimer=null;
			}
			clearTimeout(allTimer);
		}
		topCount=1;
		areCreated=false;
		beingCreated=false;
		isOverMenu=false;
		currentMenu=null;
		allTimer=null;
	}
	initVars();
	
	function NSunloaded(){
		isLoaded=false;
	}
	
	function NSloaded(e){
		if(e.target.name==mainFrName){
			initVars();
			startIt();
		}
	}
	
	function IEunloaded(){
		initVars();
		isLoaded=false;
		setTimeout("keepTrack()",50)
	}
	
	function keepTrack(){
		if(menuLoc.document.readyState=="complete"){
			initVars();
			startIt();
		}
		else{
			setTimeout("keepTrack()",50);
		}
	}
	
	function startIt(){
		isLoaded=true;
		if(isFrames){
			menuLoc=eval("parent.frames."+mainFrName);
			if(NS4){
				loader.captureEvents(Event.LOAD);
				loader.onload=NSloaded;
				menuLoc.onunload=NSunloaded;
			}
			if(IE4){
				menuLoc.document.body.onunload=IEunloaded;
			}	
		}
		else{
			menuLoc=window;
		}
		menuLoc.nav=nav=window;

		if(clickKill){
			if(NS4)menuLoc.document.captureEvents(Event.MOUSEDOWN);
				menuLoc.document.onmousedown=clicked;
			}makeTop();
		}
				
	function makeTop(){
		beingCreated=true;
		while(eval("window.arMenu"+topCount)){
			(NS4)?makeMenuNS(false,topCount):makeMenuIE(false,topCount);
			topCount++
		}
		areCreated=true;
		beingCreated=false;
	}
	
	function makeMenuNS(isChild,menuCount,parMenu,parItem){
		tempArray=eval("arMenu"+menuCount);
		if(!isChild){
			tempWidth=tempArray[0]?tempArray[0]:menuWidth;menu=makeElement("elMenu"+menuCount,tempWidth,null,null);}
		else{
			menu=makeElement("elMenu"+menuCount,null,parMenu,null);
		}
	menu.array=tempArray;menu.setMenuTree=setMenuTree;menu.setMenuTree(isChild,parMenu);
		while(menu.itemCount<menu.maxItems){
		menu.itemCount++;
		prevItem=(menu.itemCount>1)?menu.item:null;
		itemName="item"+menuCount+"_"+menu.itemCount;
		menu.item=makeElement(itemName,null,null,menu);
		menu.item.prevItem=prevItem;
		menu.item.setup=itemSetup;
		menu.item.setup(menu.itemCount,menu.array);
			if(menu.item.hasMore){
			makeMenuNS(true,menuCount+"_"+menu.itemCount,menu,menu.item);menu=menu.parentMenu;
			}
		}
	menu.lastItem=menu.item;
	menu.setup(isChild,parMenu,parItem);
	}
	
	function setMenuTree(isChild,parMenu)
		{
			if(!isChild){
			this.menuWidth=this.array[0]?this.array[0]:menuWidth;
			this.menuLeft=this.array[1];
			this.menuTop=this.array[2];
			this.menuFontColor=this.array[3]?this.array[3]:fntCol;
			this.menuFontOver=this.array[4]?this.array[4]:overFnt;
			this.menuBGColor=this.array[5]?this.array[5]:backCol;
			this.menuBGOver=this.array[6]?this.array[6]:overCol;
			this.menuBorCol=this.array[7]?this.array[7]:borCol;
			this.menuSeparatorCol=this.array[8]?this.array[8]:separatorCol;
			this.treeParent=this;
			this.startChild=this;
			}
			else{
			this.menuWidth=parMenu.menuWidth;
			this.menuLeft=parMenu.menuLeft;
			this.menuTop=parMenu.menuTop;
			this.menuFontColor=parMenu.menuFontColor;
			this.menuFontOver=parMenu.menuFontOver;
			this.menuBGColor=parMenu.menuBGColor;
			this.menuBGOver=parMenu.menuBGOver;
			this.menuBorCol=parMenu.menuBorCol;
			this.menuSeparatorCol=parMenu.menuSeparatorCol;
			this.treeParent=parMenu.treeParent;
			}
	this.maxItems=(isChild)?this.array.length/3:(this.array.length-9)/3;
	this.hasParent=isChild;this.setup=menuSetup;this.itemCount=0;
	}
	
	function makeMenuIE(isChild,menuCount,parMenu){
	menu=makeElement("elMenu"+menuCount);
	menu.array=eval("arMenu"+menuCount);
	menu.setMenuTree=setMenuTree;
	menu.setMenuTree(isChild,parMenu);
	menu.itemStr="";
		while(menu.itemCount<menu.maxItems){
		menu.itemCount++;
		itemName="item"+menuCount+"_"+menu.itemCount;
		arrayPointer=(isChild)?(menu.itemCount-1)*3:((menu.itemCount-1)*3)+9;
		dispText=menu.array[arrayPointer];
		hasMore=menu.array[arrayPointer+2];
		htmStr=(hasMore)?imgStr+dispText:dispText;
		menu.itemStr+="<SPAN  ID="+itemName+" STYLE=\"; z-index:300;width:"+menu.menuWidth+"\">"+htmStr+"</SPAN><BR>";
			if(hasMore){
			makeMenuIE(true,menuCount+"_"+menu.itemCount,menu);menu=menu.parentMenu;
			}
		}
	menu.innerHTML=menu.itemStr;itemColl=menu.children.tags("SPAN");
		for(i=0;i<itemColl.length;i++){
		it=itemColl(i);it.setup=itemSetup;
		it.setup(i+1,menu.array);
		}
	menu.lastItem=itemColl(itemColl.length-1);
	menu.setup(isChild,parMenu);
	}
	
	function makeElement(whichEl,whichWidth,whichParent,whichContainer){
		if(NS4){
			if(whichWidth){
			elWidth=whichWidth;
			}
			else{
			elWidth=(whichContainer)?whichContainer.menuWidth:whichParent.menuWidth;
			if(whichContainer)elWidth=elWidth-(borWid*2)-(itemPad*2);
			}
			
			if(!whichContainer)whichContainer=menuLoc;
			eval(whichEl+"= new Layer(elWidth,whichContainer)");
			}
			else{
			elStr="<DIV  ID="+whichEl+" STYLE='position:absolute; z-index:300'></DIV>";menuLoc.document.body.insertAdjacentHTML("BeforeEnd",elStr);
			if(isFrames)eval(whichEl+"= menuLoc."+whichEl);
		}
		return eval(whichEl);
	}
				
				
	function itemSetup(whichItem,whichArray){
		this.onmouseover=itemOver;
		this.onmouseout=itemOut;
		this.container=(NS4)?this.parentLayer:this.offsetParent;arrayPointer=(this.container.hasParent)?(whichItem-1)*3:((whichItem-1)*3)+9;
		this.dispText=whichArray[arrayPointer];
		this.linkText=whichArray[arrayPointer+1];
		this.hasMore=whichArray[arrayPointer+2];
		if(IE4&&this.hasMore){this.child=eval("elMenu"+this.id.substr(4));this.child.parentMenu=this.container;this.child.parentItem=this;
		}
		if(this.linkText){
			if(NS4){
			this.captureEvents(Event.MOUSEUP)
			this.onmouseup=linkIt;
			}
			else{
			this.onclick=linkIt;
			this.style.cursor="hand";
			}
		}
		if(NS4){
		htmStr=this.dispText;
		if(fntBold)htmStr=htmStr.bold();
		if(fntItal)htmStr=htmStr.italics();
		htmStr="<FONT FACE='"+fntFam+"' POINT-SIZE="+fntSiz+">"+htmStr+"</FONT>";
		htmStrOver=htmStr.fontcolor(this.container.menuFontOver);
		htmStr=htmStr.fontcolor(this.container.menuFontColor);
		this.htmStr=(this.hasMore)?imgStr+htmStr:spStr+htmStr;
		this.htmStrOver=(this.hasMore)?imgStr+htmStrOver:spStr+htmStrOver;
		this.visibility="inherit";
		this.bgColor=this.container.menuBGColor;
			if(whichItem==1){
			this.top=borWid+itemPad;
			}
			else{
			this.top=this.prevItem.top+this.prevItem.clip.height+separator;
			}
		this.left=borWid+itemPad;
		this.clip.top=this.clip.left=-itemPad;
		this.clip.right=this.container.menuWidth-(borWid*2)-itemPad;
		this.txtLyr=new Layer(this.container.menuWidth-(borWid*2)-itemPad,this);
		this.txtLyr.document.write(this.htmStr);
		this.txtLyr.document.close();
		this.txtLyr.visibility="inherit";
		this.clip.bottom+=this.txtLyr.document.height+itemPad;
		this.dummyLyr=new Layer(100,this);
		this.dummyLyr.left=this.dummyLyr.top=-itemPad;
		this.dummyLyr.clip.width=this.clip.width;
		this.dummyLyr.clip.height=this.clip.height;
		this.dummyLyr.visibility="inherit";
		
		}
		else{
			with(this.style){
			padding=itemPad;
			if(isRight&&!this.hasMore)paddingLeft=parseInt(padding)+imgSiz;color=this.container.menuFontColor;
			fontSize=fntSiz+"pt";fontWeight=(fntBold)?"bold":"normal";
			fontStyle=(fntItal)?"italic":"normal";
			fontFamily=fntFam;
			borderBottomWidth=separator+"px";
			borderBottomColor=this.container.menuSeparatorCol;
			borderBottomStyle="solid";
			backgroundColor=this.container.menuBGColor;
			}
		}
	}
	
	
	function menuSetup(hasParent,openCont,openItem){
		this.onmouseover=menuOver;
		this.onmouseout=menuOut;
		this.showIt=showIt;
		this.keepInWindow=keepInWindow;
		this.hideTree=hideTree;
		this.hideParents=hideParents;
		this.hideChildren=hideChildren;
		this.hideTop=hideTop;
		this.hasChildVisible=false;
		this.isOn=false;
		this.hideTimer=null;
		this.childOverlap=(perCentOver!=null)?((perCentOver/100)*this.menuWidth):childOverlap;
		this.currentItem=null;
		this.hideSelf=hideSelf;
			if(hasParent){
			this.hasParent=true;
			this.parentMenu=openCont;
				if(NS4){
				this.parentItem=openItem;
				this.parentItem.child=this;
				}
			}
			else{
			this.hasParent=false;
			}
			if(NS4){
			this.bgColor=this.menuBorCol;
			this.fullHeight=this.lastItem.top+this.lastItem.clip.bottom+borWid;
			this.clip.right=this.menuWidth;
			this.clip.bottom=this.fullHeight;
			}
			else{
				with(this.style){
				width=this.menuWidth;borderWidth=borWid;borderColor=this.menuBorCol;borderStyle=borSty;
				}
				this.lastItem.style.border="";
				this.fullHeight=this.scrollHeight;
				this.showIt(false);
				this.onselectstart=cancelSelect;
				this.moveTo=moveTo;this.moveTo(0,0);
			}
		}
	
	function popUp(menuName,e){
		if(NS4&&NSresized)startIt();
			if(!isLoaded)return;
			linkEl=(NS4)?e.target:event.srcElement;
				if(clickStart)linkEl.onclick=popMenu;
					if(!beingCreated&&!areCreated)startIt();
					linkEl.menuName=menuName;
						if(!clickStart)popMenu(e);
	}
	
	function popMenu(e){
		if(!isLoaded||!areCreated)return true;
		eType=(NS4)?e.type:event.type;
			if(clickStart&&eType!="click")return true;
			hideAll();linkEl=(NS4)?e.target:event.srcElement;currentMenu=eval(linkEl.menuName);
			currentMenu.hasParent=false;
			currentMenu.treeParent.startChild=currentMenu;
				if(IE4)menuLocBod=menuLoc.document.body;
				if(!isFrames){xPos=(currentMenu.menuLeft)?currentMenu.menuLeft:(NS4)?e.pageX:(event.clientX+menuLocBod.scrollLeft);
				yPos=(currentMenu.menuTop)?currentMenu.menuTop:(NS4)?e.pageY:(event.clientY+menuLocBod.scrollTop);
				}
				else
				{switch(navFrLoc)
					{case"left":
					xPos=(currentMenu.menuLeft)?currentMenu.menuLeft:(NS4)?menuLoc.pageXOffset:menuLocBod.scrollLeft;
					yPos=(currentMenu.menuTop)?currentMenu.menuTop:(NS4)?(e.pageY-pageYOffset)+menuLoc.pageYOffset:event.clientY+menuLocBod.scrollTop;
					break;
					case"top":
					xPos=(currentMenu.menuLeft)?currentMenu.menuLeft:(NS4)?(e.pageX-pageXOffset)+menuLoc.pageXOffset:event.clientX+menuLocBod.scrollLeft;
					yPos=(currentMenu.menuTop)?currentMenu.menuTop:(NS4)?menuLoc.pageYOffset:menuLocBod.scrollTop;
					break;
					case"bottom":
					xPos=(currentMenu.menuLeft)?currentMenu.menuLeft:(NS4)?(e.pageX-pageXOffset)+menuLoc.pageXOffset:event.clientX+menuLocBod.scrollLeft;
					yPos=(currentMenu.menuTop)?currentMenu.menuTop:(NS4)?menuLoc.pageYOffset+menuLoc.innerHeight:menuLocBod.scrollTop+menuLocBod.clientHeight;
					break;
					case"right":
					xPos=(currentMenu.menuLeft)?currentMenu.menuLeft:(NS4)?menuLoc.pageXOffset+menuLoc.innerWidth:menuLocBod.scrollLeft+menuLocBod.clientWidth;
					yPos=(currentMenu.menuTop)?currentMenu.menuTop:(NS4)?(e.pageY-pageYOffset)+menuLoc.pageYOffset:event.clientY+menuLocBod.scrollTop;
					break;
					}
				}
			currentMenu.moveTo(xPos,yPos);currentMenu.keepInWindow()
			currentMenu.isOn=true;
			currentMenu.showIt(true);
			return false;
	}
			
	function menuOver(e){
		this.isOn=true;
		isOverMenu=true;
		currentMenu=this;
			if(this.hideTimer)clearTimeout(this.hideTimer);
		}
		
	function menuOut(){
		if(IE4){
		theEvent=menuLoc.event;
			if(theEvent.srcElement.contains(theEvent.toElement))return;
			}
			this.isOn=false;
			isOverMenu=false;
			menuLoc.status="";
			if(!clickKill)allTimer=setTimeout("currentMenu.hideTree()",10);
		}
			
	function itemOver(){
		if(keepHilite){
			if(this.container.currentItem&&this.container.currentItem!=this){
				if(NS4){
				this.container.currentItem.bgColor=this.container.menuBGColor;
					if(NSfontOver){
					with(this.container.currentItem.txtLyr.document){
						write(this.container.currentItem.htmStr)
								close();
						}
					}
				}
				else{
				with(this.container.currentItem.style){
				backgroundColor=this.container.menuBGColor;
				color=this.container.menuFontColor;
				}
				}
			}
		}
		if(IE4){
			theEvent=menuLoc.event;
			if(theEvent.srcElement.tagName=="IMG")return;
			this.style.backgroundColor=this.container.menuBGOver;
			this.style.color=this.container.menuFontOver;
			}
			else{
			this.bgColor=this.container.menuBGOver;
				if(NSfontOver){
				this.txtLyr.document.write(this.htmStrOver);
				this.txtLyr.document.close();
			}
		}
		menuLoc.status=this.linkText;
		this.container.currentItem=this;
			if(this.container.hasChildVisible){
			this.container.hideChildren(this);
			}
			if(this.hasMore){
			horOffset=(isRight)?(this.container.childOverlap-this.container.menuWidth):(this.container.menuWidth-this.container.childOverlap);
				if(NS4){
				this.childX=this.container.left+horOffset;
				this.childY=this.pageY+childOffset;
				}
				else{
				this.childX=this.container.style.pixelLeft+horOffset;
				this.childY=this.offsetTop+this.container.style.pixelTop+childOffset;
				}
				this.child.moveTo(this.childX,this.childY);
				this.child.keepInWindow();
				this.container.hasChildVisible=true;
				this.container.visibleChild=this.child;
				this.child.showIt(true);
			}
	}
			
			
	function itemOut(){
		if(IE4){
		theEvent=menuLoc.event;
		if(theEvent.srcElement.contains(theEvent.toElement)||(theEvent.fromElement.tagName=="IMG"&&theEvent.toElement.contains(theEvent.fromElement)))return;
			if(!keepHilite){
			this.style.backgroundColor=this.container.menuBGColor;
			this.style.color=this.container.menuFontColor;
			}	
		}
		else{
			if(!keepHilite){
			this.bgColor=this.container.menuBGColor;
				if(NSfontOver){
					with(this.txtLyr.document){
					write(this.htmStr);
					close();
					}
				}	
			}
			if(!isOverMenu&&!clickKill){
			allTimer=setTimeout("currentMenu.hideTree()",10);
			}
		}
	}



	function moveTo(xPos,yPos){
		this.style.pixelLeft=xPos;
		this.style.pixelTop=yPos;
	}
	
	function showIt(on){
		if(NS4){
		this.visibility=(on)?"show":"hide";
			if(keepHilite&&this.currentItem){
			this.currentItem.bgColor=this.menuBGColor;
				if(NSfontOver){
					with(this.currentItem.txtLyr.document){
					write(this.currentItem.htmStr);
					close();
					}
				}
			}
		}
		else{
		this.style.visibility=(on)?"visible":"hidden";
			if(keepHilite&&this.currentItem){
				with(this.currentItem.style){
				backgroundColor=this.menuBGColor;
				color=this.menuFontColor;
				}
			}
		}
		this.currentItem=null;
	}
	
	function keepInWindow(){
		scrBars=20;botScrBar=(isFrames&&navFrLoc=="bottom")?(borWid*2):scrBars;rtScrBar=(isFrames&&navFrLoc=="right")?(borWid*2):scrBars;
			if(NS4){
			winRight=(menuLoc.pageXOffset+menuLoc.innerWidth)-rtScrBar;
			rightPos=this.left+this.menuWidth;
				if(rightPos>winRight){
					if(this.hasParent){
					parentLeft=this.parentMenu.left;newLeft=((parentLeft-this.menuWidth)+this.childOverlap);
					this.left=newLeft;
					}
					else{
					dif=rightPos-winRight;
					this.left-=dif;}
				}
			winBot=(menuLoc.pageYOffset+menuLoc.innerHeight)-botScrBar;botPos=this.top+this.fullHeight;
			if(botPos>winBot){
			dif=botPos-winBot;
			this.top-=dif;
			}
			winLeft=menuLoc.pageXOffset;
			leftPos=this.left;
				if(leftPos<winLeft){
					if(this.hasParent){
					parentLeft=this.parentMenu.left;
					newLeft=((parentLeft+this.menuWidth)-this.childOverlap);
					this.left=newLeft;
					}
					else{
					this.left=5;
					}
				}
			}
			else{
			winRight=(menuLoc.document.body.scrollLeft+menuLoc.document.body.clientWidth)-rtScrBar;
			rightPos=this.style.pixelLeft+this.menuWidth;
				if(rightPos>winRight){
					if(this.hasParent){
						parentLeft=this.parentMenu.style.pixelLeft;
						newLeft=((parentLeft-this.menuWidth)+this.childOverlap);
						this.style.pixelLeft=newLeft;
						}
						else{
						dif=rightPos-winRight;
						this.style.pixelLeft-=dif;
						}
					}
				winBot=(menuLoc.document.body.scrollTop+menuLoc.document.body.clientHeight)-botScrBar;
				botPos=this.style.pixelTop+this.fullHeight;
					if(botPos>winBot){
						dif=botPos-winBot;
						this.style.pixelTop-=dif;
					}
				winLeft=menuLoc.document.body.scrollLeft;
				leftPos=this.style.pixelLeft;
				if(leftPos<winLeft){
					if(this.hasParent){
					parentLeft=this.parentMenu.style.pixelLeft;
					newLeft=((parentLeft+this.menuWidth)-this.childOverlap);
					this.style.pixelLeft=newLeft;
					}
					else{
					this.style.pixelLeft=5;
					}
				}
			}
		}
		
	
	function linkIt(){
		if(this.linkText.indexOf("javascript:")!=-1)eval(this.linkText)
		else
		//menuLoc.location.href=this.linkText;
		// Se estiver em um frame, mata o frame antes de abrir a janela.
		menuLoc.top.location=this.linkText;
		
	}
	
	function popDown(menuName){
		if(!isLoaded||!areCreated)return;
		whichEl=eval(menuName);
		whichEl.isOn=false;
		if(!clickKill)whichEl.hideTop();
		}
	
	function hideAll(){
		for(i=1;i<topCount;i++){
		temp=eval("elMenu"+i+".startChild");
		temp.isOn=false;
			if(temp.hasChildVisible)temp.hideChildren();
			temp.showIt(false);
		}
	}
	
	function hideTree(){
		allTimer=null;
		if(isOverMenu)return;
			if(this.hasChildVisible){
			this.hideChildren();
			}
			this.hideParents();
	}
	
	function hideTop(){
		whichTop=this;
		(clickKill)?whichTop.hideSelf():(this.hideTimer=setTimeout("if(whichTop.hideSelf)whichTop.hideSelf()",mSecsVis));
	}
	
	function hideSelf(){
		this.hideTimer=null;
		if(!this.isOn&&!isOverMenu){
			this.showIt(false);
		}
	}
		
	function hideParents(){
		tempMenu=this;
			while(tempMenu.hasParent){
			tempMenu.showIt(false);
			tempMenu.parentMenu.isOn=false;
			tempMenu=tempMenu.parentMenu;
			}
		tempMenu.hideTop();
	}
	
	function hideChildren(item){
		tempMenu=this.visibleChild;
			while(tempMenu.hasChildVisible){
			tempMenu.visibleChild.showIt(false);
			tempMenu.hasChildVisible=false;
			tempMenu=tempMenu.visibleChild;
			}
		if(!this.isOn||!item.hasMore||this.visibleChild!=this.child){
		this.visibleChild.showIt(false);this.hasChildVisible=false;
		}
	}
	
	function cancelSelect(){
		return false
	}
	
	function reDo(){
		if(loader.innerWidth==origWidth&&loader.innerHeight==origHeight)return;
		initVars();NSresized=true;menuLoc.location.reload();
		}
	
	function clicked(){
		if(!isOverMenu&&currentMenu!=null&&!currentMenu.isOn){
		whichEl=currentMenu;whichEl.hideTree();
		}
		}window.onerror=handleErr;
		
		
	function handleErr(){
		arAccessErrors=["permission","access"];mess=arguments[0].toLowerCase();found=false;
			for(i=0;i<arAccessErrors.length;i++){
			errStr=arAccessErrors[i];
			if(mess.indexOf(errStr)!=-1)found=true;
			}
			return found;
			}
	}

