/* --- menu mouseover argentina--- */
	// verificação de browsers
var IE4 = (document.all) ? 1:0;
var NS4 = (document.layers) ? 1:0;
var DOM = (document.getElementById) ? 1:0;



// imagem do bullet do menu selecionado
imgBulletInfOver = "../Img/lytMIBulletOver.gif";
imgBulletInfOn = "../Img/lytMIBulletOn.gif";
imgBulletSupOn = "../Img/lytMSBulletOn.gif";
// imagem do bullet do menu não selecionado
imgBulletInfOff = "../Img/lytMIBulletOff.gif";
imgBulletSupOff = "../Img/lytMSBulletOff.gif";


var tipo;
function menuOver(img, tipo, div){
	el1 = document.getElementById(div);

	imgBulletOver = img + "Bullet";
	imgOver = img + "Btn";
	if (tipo == 'sup'){
		document.images[imgBulletOver].src = imgBulletSupOn;
		document.images[imgOver].src = "../Img/btn" + img + "On.gif";
	}
	else if (tipo == 'inf'){
		if(el1.style.visibility == "visible"){ 
			document.images[imgBulletOver].src = imgBulletInfOn;
		}else{
			document.images[imgBulletOver].src = imgBulletInfOver;	
		}
		
	}
	else if (tipo == 'sup2'){
		document.images[imgBulletOver].src = imgBulletSupOn;
		document.images[imgOver].src = "../Img/btn" + img + "On2.gif";
	}
	
	return false;
}

function menuOut(img, tipo, div){
	el1 = document.getElementById(div);
	imgBulletOut = img + "Bullet";	
	imgOut = img + "Btn";	
	
	if (tipo == 'sup'){			
		document.images[imgBulletOut].src = imgBulletSupOff;
		document.images[imgOut].src = "../Img/btn" + img + "Off.gif";		
	}
	else if (tipo == 'inf'){
		if(el1.style.visibility == "visible"){ 
			document.images[imgBulletOut].src = imgBulletInfOn;
		}else{
			document.images[imgBulletOut].src = imgBulletInfOff;	
		}		
	}
	return false;	
}	

/* --- acerta div --- */
	function AcertaDivMenu(){
		altura = document.getElementById("posicaoMenu").offsetTop;
		largura = document.getElementById("posicaoMenu").offsetLeft;
		document.getElementById("divMenuSup").style.top = altura ;
		document.getElementById("divMenuSup").style.left = largura ;
		document.getElementById("divMenuSup").style.display = 'block';
	}

	function AcertaDivMenuInf(){
		altura = document.getElementById("posicaoMenuInf").offsetTop;
		largura = document.getElementById("posicaoMenuInf").offsetLeft;
		document.getElementById("divMenuInf").style.top = altura ;
		document.getElementById("divMenuInf").style.left = largura ;
		document.getElementById("divMenuInf").style.display = 'block';
	}
	
	function AcertaDiv(vDiv, vAltura, vLargura){
		altura = document.getElementById("posicaoDiv").offsetTop;
		largura = document.getElementById("posicaoDiv").offsetLeft;
		document.getElementById(vDiv).style.top = (altura + parseInt(vAltura)) + 'px' ;
		document.getElementById(vDiv).style.left = (largura + parseInt(vLargura)) + 'px' ;
		document.getElementById(vDiv).style.visibility = "visible";
	}
	
/* oculta e exibe o menu inferior da home */
function ShowHideDivInf(div,img){
	if(DOM && IE4){
		if (document.getElementById(div).style.visibility != "visible"){ 
			document.getElementById(div).style.filter="revealTrans(transition=4, duration=1)";			
			
			document.getElementById(div).filters.revealTrans.Apply();
			document.getElementById(div).style.visibility = "visible";
			document.getElementById(div).filters.revealTrans.Play();			
			document.getElementById(img).src = imgBulletInfOn;		
				
		}else{
			document.getElementById(div).style.filter="revealTrans(transition=5, duration=1)";		
				
			document.getElementById(div).filters.revealTrans.Apply();
			document.getElementById(div).style.visibility = "hidden";
			document.getElementById(div).filters.revealTrans.Play();			
			document.getElementById(img).src = imgBulletInfOver;
		}
	}
	else{
		if (document.getElementById(div).style.visibility != "visible"){ 
			document.getElementById(div).style.visibility = "visible";
			document.images[img].src = imgBulletInfOn;		
				
		}else{
			document.getElementById(div).style.visibility = "hide";
			document.images[img].src = imgBulletInfOver;
		}
	}
	return false;
}


function ShowHideMenu(origem,div,opcao){	

	if (origem == 0){
		if(DOM && IE4){
	    //document.getElementById(div).style.filter="blendTrans(duration=1)";	
			//alert('<iframe src="about:blank" scrolling="no" frameborder="0"></iframe>' +		document.getElementById(div).innerHTML);			
			if (document.getElementById(div).style.visibility != opcao){
	      //document.getElementById(div).filters.blendTrans.Apply();
				document.getElementById(div).style.visibility = opcao;
				//document.getElementById(div).filters.blendTrans.Play();

			}
		} 
		else {
			if (document.getElementById(div).style.visibility != opcao){
				document.getElementById(div).style.visibility = opcao;
			}
		}	
	}
	else {
		resDivOpcao = divOpcao.split(',');
		if(DOM && IE4){
	    //document.getElementById(resDivOpcao[0]).style.filter="blendTrans(duration=1)";	
			if (document.getElementById(resDivOpcao[0]).style.visibility != resDivOpcao[1]){
	      //document.getElementById(resDivOpcao[0]).filters.blendTrans.Apply();		
				document.getElementById(resDivOpcao[0]).style.visibility = resDivOpcao[1];
				//document.getElementById(resDivOpcao[0]).filters.blendTrans.Play();
			}
		} 
		else {
			if (document.getElementById(resDivOpcao[0]).style.visibility != resDivOpcao[1]){
				document.getElementById(resDivOpcao[0]).style.visibility = resDivOpcao[1];
			}
		}	
	}
}
		
/**/
var
	tempoMenu = 100;
	menuTimer = null;
function escondeMenu(div,opcao){
	divOpcao = div + ',' + opcao;
	menuTimer = setTimeout("ShowHideMenu(divOpcao)",tempoMenu);
}
function mantemMenu(){
	if (menuTimer != null){
		clearTimeout(menuTimer);
		menuTimer = null;
	}	
}

/*MUDA COR DA TABELA*/
function MudaCor(obj, nova_cor) {
	obj.className = nova_cor
}

/* abre pop*/
function AbrePop(windowURL, windowName, windowWidth, windowHeight){
	window.open(windowURL, windowName, "width="+windowWidth+",height="+windowHeight+",dependent=yes,toolbar=0,location=0,directories=0,status=0,menuBar=0,scrollBars=0,resizable=0");
}

/*abre pop2*/
var popUpWin=0;
function popUpWindow(URLStr, width, height, left, top)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
		vLeft = ((document.body.clientWidth - parseInt(width)) / 2);

	 	left = vLeft;
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=no,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
  window.location.href = "#topo";
}

function popUpWindowNew(URLStr, width, height, left, top)
{
  if(popUpWin)
  {
    if(!popUpWin.closed) popUpWin.close();
  }
		vLeft = ((document.body.clientWidth - parseInt(width)) / 2);

	 	left = vLeft;
  popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=no,directories=no,status=no,menub ar=no,scrollbar=Yes,resizable=no,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
  window.location.href = "#topo";
}

/*show hide layer perguntas e respostas*/
function ShowHideResp(obj,img){	
	if (document.getElementById(obj).style.display != "block"){ 
		document.getElementById(obj).style.display = "block";
		document.getElementById(img).className ='open'
		//document.getElementById(img).style == "close";
		//document.images[img].src = '../img/imgBulletSetaAberto.gif';	
			
	}else{
		document.getElementById(obj).style.display = "none";
		document.getElementById(img).className ='close'
		//document.getElementById(img).style.classname == "open";
		//document.images[img].src = '../img/imgBulletSeta.gif';
	}
}


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;
}

function MM_showHideLayers() { //v6.0
  var i,p,v,obj,args=MM_showHideLayers.arguments;
  for (i=0; i<(args.length-2); i+=3) if ((obj=MM_findObj(args[i]))!=null) { v=args[i+2];
    if (obj.style) { obj=obj.style; v=(v=='show')?'visible':(v=='hide')?'hidden':v; }
    obj.visibility=v; }
}


function selecionaArquivo(){
	document.frmDecisao.myfile.click();
	document.frmDecisao.arquivo.value=document.frmDecisao.myfile.value;
}

var jaSelecionado;
op = new Array
op[0] = 'opcao1';
op[1] = 'opcao2';
op[2] = 'opcao3';
op[3] = 'opcao4';
op[4] = 'opcao5';
op[5] = 'opcao6';

function abreFechaSelect(status){
	selFechada = document.getElementById('select')
	selAberta = document.getElementById('selectAtivo')
	if (selAberta.style.visibility == 'visible'){
		selAberta.style.visibility = 'hidden';
	}
	else{
		/* modificado */

		selAberta.style.visibility = 'visible';
		selAberta.innerHTML = ('<div class="ifrmFake" style="position: absolute; left: 0; top: 0; z-index:-10; filter: progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0);"><iframe src="about:blank" scrolling="no" width="85px" height="103px" frameborder="0"></iframe></div>' + selAberta.innerHTML);
		selAberta.style.zIndex = "0"; 
		
		
		if(jaSelecionado == null){
			document.getElementById('opcao6').className = 'cmbPaisesDrop';
		}
		else{
			//document.getElementById(jaSelecionado).style.backgroundColor = 'F1FFCD';
			document.getElementById(jaSelecionado).className = 'cmbPaisesDropSel';
		}
		
	}
}
function selecionado(marcado){
	for( i =0; i < op.length; i++){
		//document.getElementById(op[i]).style.backgroundColor = 'CFEF82';
		document.getElementById(op[i]).className = 'cmbPaisesDrop';
	}		
			
//	document.getElementById(marcado).style.backgroundColor = 'F1FFCD';
	document.getElementById(marcado).className = 'cmbPaisesDropSel';
}

function naoSelecionado(apagar){
//		document.getElementById(apagar).style.backgroundColor = 'CFEF82';
		document.getElementById(apagar).className = 'cmbPaisesDrop';
}
function mover(texto, clickado){
	document.getElementById('conteudoSelecionado').innerHTML = document.getElementById(texto).innerHTML
	jaSelecionado = clickado
	abreFechaSelect();
}
function ShowHideIntegrantes(div,img){
	if(DOM && IE4){
		if (document.getElementById(div).style.display != "block"){ 
			document.getElementById(div).style.display = "block";
			document.getElementById(img).src = "../Img/btnIntegrantes2.gif";		
				
		}else{
			document.getElementById(div).style.display = "none";
			document.getElementById(img).src = "../Img/btnIntegrantes.gif";
		}
	}
	else{
		if (document.getElementById(div).style.display != "block"){ 
			document.getElementById(div).style.display = "block";
			document.images[img].src = "../Img/btnIntegrantes2.gif";		
				
		}else{
			document.getElementById(div).style.display = "none";
			document.images[img].src = "../Img/btnIntegrantes.gif";
		}
	}
	return false;
}

//SELECIONAR ARQUIVO - UPLOAD FAKE
function selecionaArquivo(){
	document.frmContato.browse.click();
	document.frmContato.arquivo.value=document.frmContato.browse.value;
}


// script do menu
//Chrome Drop Down Menu- Author: Dynamic Drive (http://www.dynamicdrive.com)
//Last updated: Jan 1st, 06'

var cssdropdown={
disappeardelay: 250, //set delay in miliseconds before menu disappears onmouseout

//No need to edit beyond here////////////////////////
dropmenuobj: null, ie: document.all, firefox: document.getElementById&&!document.all,

getposOffset:function(what, offsettype){
var totaloffset=(offsettype=="left")? what.offsetLeft : what.offsetTop;
var parentEl=what.offsetParent;
while (parentEl!=null){
	totaloffset=(offsettype=="left")? totaloffset+parentEl.offsetLeft : totaloffset+parentEl.offsetTop;
	parentEl=parentEl.offsetParent;
}
return totaloffset;
},

showhide:function(obj, e, visible, hidden){
	if (this.ie || this.firefox)
	this.dropmenuobj.style.left=this.dropmenuobj.style.top="-500px"
	if (e.type=="click" && obj.visibility==hidden || e.type=="mouseover")
		obj.visibility=visible
	else if (e.type=="click")
		obj.visibility=hidden
	},

	iecompattest:function(){
	return (document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
},

clearbrowseredge:function(obj, whichedge){
	var edgeoffset=0
	if (whichedge=="rightedge"){
		var windowedge=this.ie && !window.opera? this.iecompattest().scrollLeft+this.iecompattest().clientWidth-15 : window.pageXOffset+window.innerWidth-15
		this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetWidth
			if (windowedge-this.dropmenuobj.x < this.dropmenuobj.contentmeasure)  //move menu to the left?
				edgeoffset=this.dropmenuobj.contentmeasure-obj.offsetWidth
	}
	else{
		var topedge=this.ie && !window.opera? this.iecompattest().scrollTop : window.pageYOffset
		var windowedge=this.ie && !window.opera? this.iecompattest().scrollTop+this.iecompattest().clientHeight-15 : window.pageYOffset+window.innerHeight-18
		this.dropmenuobj.contentmeasure=this.dropmenuobj.offsetHeight
		if (windowedge-this.dropmenuobj.y < this.dropmenuobj.contentmeasure){ //move up?
			edgeoffset=this.dropmenuobj.contentmeasure+obj.offsetHeight
			if ((this.dropmenuobj.y-topedge)<this.dropmenuobj.contentmeasure) //up no good either?
				edgeoffset=this.dropmenuobj.y+obj.offsetHeight-topedge
		}
	}
	return edgeoffset
},

dropit:function(obj, e, dropmenuID){
	if (this.dropmenuobj!=null) //hide previous menu
		this.dropmenuobj.style.visibility="hidden"
		
	this.clearhidemenu()
	if (this.ie||this.firefox){
		obj.onmouseout=function(){cssdropdown.delayhidemenu()}
		this.dropmenuobj=document.getElementById(dropmenuID)
		this.dropmenuobj.onmouseover=function(){cssdropdown.clearhidemenu()}
		this.dropmenuobj.onmouseout=function(){cssdropdown.dynamichide(e)}
		this.dropmenuobj.onclick=function(){cssdropdown.delayhidemenu()}
		this.showhide(this.dropmenuobj.style, e, "visible", "hidden")
		this.dropmenuobj.x=this.getposOffset(obj, "left")
		this.dropmenuobj.y=this.getposOffset(obj, "top")
		this.dropmenuobj.style.left=this.dropmenuobj.x-this.clearbrowseredge(obj, "rightedge") - 24 + "px"
		this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight+"px"		
		/*---- CONTROLE DA ALTURA DO DIV -----*/
		//this.dropmenuobj.style.top=this.dropmenuobj.y-this.clearbrowseredge(obj, "bottomedge")+obj.offsetHeight-8+"px"
	}
},

contains_firefox:function(a, b) {
	while (b.parentNode)
	if ((b = b.parentNode) == a)
		return true;
	return false;
},

dynamichide:function(e){
	var evtobj=window.event? window.event : e
	if (this.ie&&!this.dropmenuobj.contains(evtobj.toElement))
	this.delayhidemenu()
	else if (this.firefox&&e.currentTarget!= evtobj.relatedTarget&& !this.contains_firefox(evtobj.currentTarget, evtobj.relatedTarget))
	this.delayhidemenu()
},

delayhidemenu:function(){
	this.delayhide=setTimeout("cssdropdown.dropmenuobj.style.visibility='hidden'",this.disappeardelay)
},

clearhidemenu:function(){
	if (this.delayhide!="undefined")
		clearTimeout(this.delayhide)
	}
}
function ShowHideIntegrantes(div,img){
	if(DOM && IE4){
		if (document.getElementById(div).style.display != "block"){ 
			document.getElementById(div).style.display = "block";
			document.getElementById(img).src = "../Img/btnIntegrantes2.gif";		
				
		}else{
			document.getElementById(div).style.display = "none";
			document.getElementById(img).src = "../Img/btnIntegrantes.gif";
		}
	}
	else{
		if (document.getElementById(div).style.display != "block"){ 
			document.getElementById(div).style.display = "block";
			document.images[img].src = "../Img/btnIntegrantes2.gif";		
				
		}else{
			document.getElementById(div).style.display = "none";
			document.images[img].src = "../Img/btnIntegrantes.gif";
		}
	}
	return false;
}
function ShowHideRanking(div,img){
	if(DOM && IE4){
		if (document.getElementById(div).style.display != "block"){ 
			document.getElementById(div).style.display = "block";
			document.getElementById(img).src = "../Img/btnFechado.gif";		
				
		}else{
			document.getElementById(div).style.display = "none";
			document.getElementById(img).src = "../Img/btnAberto.gif";
		}
	}
	else{
		if (document.getElementById(div).style.display != "block"){ 
			document.getElementById(div).style.display = "block";
			document.images[img].src = "../Img/btnFechado.gif";		
				
		}else{
			document.getElementById(div).style.display = "none";
			document.images[img].src = "../Img/btnAberto.gif";
		}
	}

	return false;
}
function ShowHideRankingInteg(div,img){
	if(DOM && IE4){
		if (document.getElementById(div).style.display != "block"){ 
			document.getElementById(div).style.display = "block";
			document.getElementById(img).src = "../Img/btnIntegrantes2.gif";		
				
		}else{
			document.getElementById(div).style.display = "none";
			document.getElementById(img).src = "../Img/btnIntegrantes.gif";
		}
	}
	else{
		if (document.getElementById(div).style.display != "block"){ 
			document.getElementById(div).style.display = "block";
			document.images[img].src = "../Img/btnIntegrantes2.gif";		
				
		}else{
			document.getElementById(div).style.display = "none";
			document.images[img].src = "../Img/btnIntegrantes.gif";
		}
	}
	return false;
}
function ShowHideBorder(div,img){
	if(DOM && IE4){
		if (document.getElementById(div).style.display != "block"){ 
			document.getElementById(div).style.display = "block";
			document.getElementById(img).src = "../Img/btnAberto.gif";		
				
		}else{
			document.getElementById(div).style.display = "none";
			document.getElementById(img).src = "../Img/btnFechado.gif";
		}
	}
	else{
		if (document.getElementById(div).style.display != "block"){ 
			document.getElementById(div).style.display = "block";
			document.images[img].src = "../Img/btnAberto.gif";		
				
		}else{
			document.getElementById(div).style.display = "none";
			document.images[img].src = "../Img/btnFechado.gif";
		}
	}

	return false;
}
function ShowHideRanking2(div,img){
	if(DOM && IE4){
		if (document.getElementById(div).style.display != "block"){ 
			document.getElementById(div).style.display = "block";
			document.getElementById(img).src = "../Img/btnFechado.gif";		
				
		}else{
			document.getElementById(div).style.display = "none";
			document.getElementById(img).src = "../Img/btnAberto.gif";
		}
	}
	else{
		if (document.getElementById(div).style.display != "block"){ 
			document.getElementById(div).style.display = "block";
			document.images[img].src = "../Img/btnFechado.gif";		
				
		}else{
			document.getElementById(div).style.display = "none";
			document.images[img].src = "../Img/btnAberto.gif";
		}
	}

	return false;
}

function ShowHideBorder2(div,img){
	if(DOM && IE4){
		if (document.getElementById(div).style.display != "block"){ 
			document.getElementById(div).style.display = "block";
			document.getElementById(img).src = "../Img/btnAberto.gif";		
				
		}else{
			document.getElementById(div).style.display = "none";
			document.getElementById(img).src = "../Img/btnFechado.gif";
		}
	}
	else{
		if (document.getElementById(div).style.display != "block"){ 
			document.getElementById(div).style.display = "block";
			document.images[img].src = "../Img/btnAberto.gif";		
				
		}else{
			document.getElementById(div).style.display = "none";
			document.images[img].src = "../Img/btnFechado.gif";
		}
	}

	return false;
}
function ShowHideRankingInteg2(div,img){
	if(DOM && IE4){
		if (document.getElementById(div).style.display != "block"){ 
			document.getElementById(div).style.display = "block";
			document.getElementById(img).src = "../Img/btnIntegrantes2.gif";		
				
		}else{
			document.getElementById(div).style.display = "none";
			document.getElementById(img).src = "../Img/btnIntegrantes.gif";
		}
	}
	else{
		if (document.getElementById(div).style.display != "block"){ 
			document.getElementById(div).style.display = "block";
			document.images[img].src = "../Img/btnIntegrantes2.gif";		
				
		}else{
			document.getElementById(div).style.display = "none";
			document.images[img].src = "../Img/btnIntegrantes.gif";
		}
	}
	return false;
}