// -- inicio configuração perincipal
function Objeto(nome){
	var obj;
	if(document.layers){
			obj = "document.layers['" + nome + "']";
	}else if(document.all){
			obj = "document.all." + nome;
	}else if(document.getElementById){
			obj = "document.getElementById('"+nome+"')";
	}
	return eval(obj);
}
// -- inicio configuração perincipal

// -- inicio menu horizontal 
function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

var anterior; 
function TransAlpha(obj,valor){
	var valor2 = valor/100;
	if(!Objeto(obj).filters){
		Objeto(obj).style.opacity =  valor2;
	}else{
		Objeto(obj).filters.alpha.opacity=valor;
	}
}
function ShowMenuLateral(ul,linhas,linha,x){
	if(linha<=linhas){
		if(x<=10){
			x +=5;
			percent=(x*10);
			obj = ul+"_"+linha;
			TransAlpha(obj,percent);
		}else{
			x=0;
			linha++;
		}
		setTimeout("ShowMenuLateral('"+ul+"',"+linhas+","+linha+","+x+")",1);
	}
}
function MenuLateral(nome,evento,linhas){
	//evento -> click,over
	var obj_atual = Objeto(nome);	
	
	if(obj_atual){
		if(obj_atual.style.display=='none'){
			/*
			for(i=1;i<=linhas;i++){
				obj = nome+"_"+i;
				TransAlpha(obj,0);
			}
			*/
			obj_atual.style.display='inline';			
			//ShowMenuLateral(nome,linhas,1,0);
			
			anterior = nome;
		}else{
			obj_atual.style.display='none';
		}
	}

}

function BannerExpansivo(obj,w,h){
	//top:22px;width:468px; height:400px;
	obj.style.position="absolute";
	obj.style.width=w+"px";
	obj.style.height=h+"px";
	obj.style.top = "32px";
	if(h==60){obj.style.overflow="hidden";}else{obj.style.overflow="visible";}
}
