/*	Menus de Navegação */

		lColor	 	= new Array();
		lColor[0] = "#E4533A";
		lColor[1] = "#F69251";
		lColor[2] = "#FDBE39";
		lColor[3] = "#FFEC4A";
		lColor[4] = "#FFEC4A";
		lColor[5] = "#FCF7BF";
		lColor[6] = "#FFFEEF";
		lColor[7] = "#F6F4B7";
		lColor[8] = "#E3E983";
		lColor[9] = "#D3C7AA";
		lColor[10]= "#DDC3C6";
		lColor[11]= "#CA9EA4";
		
		color    = new Array();
		color[0] = "#E03227";
		color[1] = "#F57D44";
		color[2] = "#F4AB24";
		color[3] = "#F0D435";
		color[4] = "#E5D36C";
		color[5] = "#EBE5A2";
		color[6] = "#F6F7DC";
		color[7] = "#E0E1A2";
		color[8] = "#CED26E";
		color[9] = "#C8BB97";
		color[10]= "#D3B0B5";
		color[11]= "#BF8791";
		
		activeItem=-1;
		activeSubItem=-1;
		activeItemTop=-1;
		
		
			function closeAllSubsSubs(){
			/* num items = num colors[] */
			num_items=color.length;
			for(i=0;i<30;i++){
				obj=(document.all)?document.all["subItem"+activeItem+"_"+i]:document.getElementById("subItem"+activeItem+"_"+i);
				//alert(activeItem)
				if(obj==undefined)
					continue;
				else{
				obj.style.backgroundColor="#EBE5CE";
				blockId="subsubItemBlock"+activeItem+"_";
				
				/* max 30 sub items */
				for(a=0;a<30;a++){
					if(document.all){
						if(document.all[blockId+a]==undefined){
							continue;
						} else {
							document.all[blockId+a].style.display="none";
							activeSubItem=-1;
						}
					} else {
						if(document.getElementById(blockId+a)==null){
							continue;
						} else {
							document.getElementById(blockId+a).style.display="none";
							activeSubItem=-1;
						}
					}
				}
				}
			}
		}
		
		function subsubclose(){
		
		
		
		
		
		}
		
		function openSubSub(obj){
			closeAllSubsSubs();
			first_underscore_pos=obj.id.indexOf("_");
			
			subitem_num=obj.id.slice(first_underscore_pos+1);	
			
			//window.status="Active Item: "+activeItem+", Item #:"+item_num;
			if(activeSubItem!=subitem_num){
				obj.style.backgroundColor=color[activeItem];		
				activeSubItem=subitem_num;
				blockId="subsubItemBlock"+activeItem+"_";

				//window.alert( obj.id.indexOf("_9") + '--' + obj.id.indexOf("item_9") + '--' + ( ( obj.id.indexOf("_9") > 0 ) && ( obj.id.indexOf("item_9") == 1 ) ) )
				//window.alert( ( obj.id.indexOf("_9") > 0 ) )
				//window.alert( ( obj.id.indexOf("item_9") < 1 ) )
				//window.alert( ( ( obj.id.indexOf("_9") > 0 ) && ( obj.id.indexOf("item_9") < 1 ) ) )
				//window.alert( ( obj.id.indexOf("item_9") == 1 ) )
				if( ( obj.id.indexOf("_9") > 0 ) && ( obj.id.indexOf("item_9") < 1 ) )
				{
				}
				else
				{
					if(document.all){
						
							document.all[blockId+subitem_num].style.display="";
						
					} else {
						
							document.getElementById(blockId+subitem_num).style.display="";
					}
				}
				
				
				/*for(a=0;a<30;a++){
					if(document.all){
						if(document.all[blockId+a]==undefined){
							continue;
						} else {
							document.all[blockId+a].style.display="";
						}
					} else {
						if(document.getElementById(blockId+a)==null){
							continue;
						} else {
							document.getElementById(blockId+a).style.display="";
						}
					}
				}*/
			} else {
				closeAllSubsSubs();
				obj.style.backgroundColor=color[subitem_num];		
				activeSubItem=-1;
			}			
		}
				
		function closeAllSubs(){
			/* num items = num colors[] */
			num_items=color.length;
			for(i=0;i<num_items;i++){
				obj=(document.all)?document.all["item_"+i]:document.getElementById("item_"+i);
				obj.style.backgroundColor="#EBE5CE";
				blockId="subItemBlock"+i+"_";
				/* max 30 sub items */
				for(a=0;a<30;a++){
					if(document.all){
						if(document.all[blockId+a]==undefined){
							continue;
						} else {
							document.all[blockId+a].style.display="none";
						}
					} else {
						if(document.getElementById(blockId+a)==null){
							continue;
						} else {
							document.getElementById(blockId+a).style.display="none";
						}
					}
				}
			}
		}
		
		function openSub(obj){
			closeAllSubs();
			closeAllSubsSubs();
			first_underscore_pos=obj.id.indexOf("_");
			item_num=obj.id.slice(first_underscore_pos+1);	
			//window.status="Active Item: "+activeItem+", Item #:"+item_num;
			if(activeItem!=item_num){
				obj.style.backgroundColor=color[item_num];		
				activeItem=item_num;
				blockId="subItemBlock"+item_num+"_";
				
				for(a=0;a<30;a++){
					if(document.all){
						if(document.all[blockId+a]==undefined){
							continue;
						} else {
							document.all[blockId+a].style.display="";
						}
					} else {
						if(document.getElementById(blockId+a)==null){
							continue;
						} else {
							document.getElementById(blockId+a).style.display="";
						}
					}
				}
			} else {
				closeAllSubs();
				obj.style.backgroundColor=color[item_num];		
				activeItem=-1;
			}			
		}
		
		function roll(obj,action){
			obj=(document.all)?document.all["item_"+obj]:document.getElementById("item_"+obj);
			
			
			if(action){
				
				first_underscore_pos=obj.id.indexOf("_");
				obj_type=obj.id.slice(0,first_underscore_pos);
				if(obj_type=="item"){
					color_idx=obj.id.slice(first_underscore_pos+1);
					cor=color[color_idx];
				}
				if(activeItem!=color_idx){
					obj.style.backgroundColor=cor;
					obj.style.cursor="pointer";
				}
			} else {
				if(activeItem!=color_idx){
					obj.style.backgroundColor="#EBE5CE";
				}
			}
								
		}
		
		function QRENroll(obj, action)
		{
			obj=(document.all)?document.all[obj]:document.getElementById(obj);
						
			if(action)
			{
				var objSrc = obj.src;
				
				objSrc = objSrc.replace("qren", "qren_hi");
				
				obj.src = objSrc;
			} 
			else 
			{
				var objSrc = obj.src;
				
				objSrc = objSrc.replace("qren_hi", "qren");
				
				obj.src = objSrc;
			}
		}
		
		function subRoll(subitem,action){
			if(subitem!=activeSubItem){
				obj=(document.all)?document.all["subItem"+activeItem+"_"+subitem]:document.getElementById("subItem"+activeItem+"_"+subitem);
				obj.style.backgroundColor=(action)?lColor[activeItem]:"#EBE5CE";
			}
			//subItem8_0
		}

/* nav top rollovers */


		colorTop 	=  new Array();
		colorTop[0] = "#E3E983";
		colorTop[1] = "#F6F4B7";
		colorTop[2] = "#FDF8C0";
		colorTop[3] = "#FCEC81";
		colorTop[4] = "#FFEC4A";
		colorTop[5] = "#FEBE39";
		colorTop[6] = "#F79252";
		
		function rollTop(obj,action,cor){
			if(document.all){
				obj=document.all[obj];
			} else {
				obj=document.getElementById(obj);
			}
			
			if(activeItemTop!=cor){
			
			if(action){
				obj.style.backgroundColor=colorTop[cor];
			} else {
				obj.style.backgroundColor="#EBE5CE";
			}
			}	

		}
		
		function ClickTop(obj,item_num){
		
		if(document.all){
				obj=document.all[obj];
			} else {
				obj=document.getElementById(obj);
			}
		if(activeItemTop!=item_num){
			
			activeItemTop=item_num;
			obj.style.backgroundColor=colorTop[item_num];
		} else {
				obj.style.backgroundColor="#EBE5CE";		
				activeItemTop=-1;
			}	
		
		}
		
		function setTopMenu(itemtop)
		{
				
		if(itemtop!=-1)
		{
			if(document.all){
				obj=document.all["topItem"+itemtop];
			} else {
				obj=document.getElementById("topItem"+itemtop);
			}
			if(activeItemTop!=itemtop){
			
			activeItemTop=itemtop;
			obj.style.backgroundColor=colorTop[itemtop];
			} else {
				obj.style.backgroundColor="#EBE5CE";		
				activeItemTop=-1;
			}	
		}
		}
		
		function setMenu(item1,item2){
		
		if(item1!=-1)
			{
				if(item1!=0)
				{
				
				blockId="item"+"_"+item1;
				//alert('block='+ blockId)
				
				openSub(document.all[blockId]);
				
				blockId="subItem"+item1+"_"+item2;
				
				if(document.all[blockId]!=undefined)
					//if(item2!=9)
					openSubSub(document.all[blockId]);
				
				}	
				//document.all[blockId].style.display=""
				//document.all[blockId].style.backgroundColor=color[item1];
			}
		
		}
		
		function SetPage(pagenr,form){
		form.pagenr.value=pagenr;
		form.submit();
		}
		
		function SetPageNew(pagenr,form){
			form.pagenr.value=pagenr;
			//form.submit();
			__doPostBack("changepage","");		
		}
		
		function PopUpwithDimensions( sUrl_IN, iWidth_IN, iHeight_IN ) {
			var popWin;
//	var winleft = (screen.width - 300) / 2;
//	var wintop = (screen.height - 150) / 2;

//	popWin = window.open( sUrl_IN, 'PopUpNavigator','left=' + winleft + ',top=' + wintop + ',resizable=1,scrollbars=0,toolbar=0,menubar=0,width=' + iWidth_IN + ',height=' + iHeight_IN + ',');
// 2003-05-08 TN
	//popWin = window.open( sUrl_IN, 'PopUpNavigator','top=50,left=50,resizable=1,scrollbars=0,toolbar=0,menubar=0,width=' + iWidth_IN + ',height=' + iHeight_IN + ',');
	popWin = window.open( sUrl_IN, '','top=50,left=50,resizable=1,scrollbars=1,toolbar=0,menubar=0,width=' + iWidth_IN + ',height=' + iHeight_IN + ',');
}
		
		
		
		function mostralegprime()
		{
		
			document.all["drop1"].style.display="";
			document.all["drop2"].style.display="none";
			document.all["br"].style.display="";
	
		}
		function mostralegqcaiii()
		{
			document.all["drop1"].style.display="none";
			document.all["br"].style.display="none";
			document.all["drop2"].style.display="";
		
		}
		function escondelegtipo()
		{
			document.all["drop1"].style.display="none";
			document.all["drop2"].style.display="none";
			document.all["br"].style.display="none";
		}
	
	
