// JavaScript Document



ativo = null;
cellAtivo = null;
timeId = null;
document.onclick = new Function("show()");
function show(obj,name)
{
	fade = name;
	name = document.getElementById(name);
	if(ativo!=null) { 
		ativo.style.visibility = "hidden"; 
		ativo=null
	}
	if(obj)
	{
		cellAtivo = obj;
	}
	if(timeId!=null){ clearTimeout(timeId); }
	if(name)
	{
	var newX = findPosX(obj);
	var newY = findPosY(obj);
	//var x = new getObj(name);
		//document.getElementById("conteudo").style.zIndex = "1";
		//document.getElementById("conteudoespaco").style.zIndex = "1";
		//document.getElementById("msghomeflash").style.zIndex = "1";
		name.style.zIndex = 200;
		name.style.visibility = "visible";
		name.style.top = newY + 20 + 'px';
		name.style.left = newX + 'px';
	
		//colorfade(fade);
		ativo = name;
	}
}

function timerHidePop()
{
	if(ativo!=null)
	{
		timeId = setTimeout("ativo.style.visibility = 'hidden'; timeId=null; ativo=null;",1);
	}
}



ativoIdioma = null;
cellAtivoIdioma = null;
timeIdIdioma = null;
document.onclick = new Function("showIdioma()");
function showIdioma(obj,name)
{
	fade = name;
	name = document.getElementById(name);
	if(ativoIdioma!=null) { 
		ativoIdioma.style.visibility = "hidden"; 
		ativoIdioma=null
	}
	if(obj)
	{
		cellAtivoIdioma = obj;
	}
	if(timeIdIdioma!=null){ clearTimeout(timeIdIdioma); }
	if(name)
	{
	var newX = findPosX(obj);
	var newY = findPosY(obj);
	//var x = new getObj(name);
		//document.getElementById("conteudo").style.zIndex = "1";
		//document.getElementById("conteudoespaco").style.zIndex = "1";
		//document.getElementById("msghomeflash").style.zIndex = "1";
		name.style.zIndex = 200;
		name.style.visibility = "visible";
		name.style.top = newY + 13 + 'px';
		name.style.left = newX + 0 + 'px';
	
		//colorfade(fade);
		ativoIdioma = name;
	}
}

function timerHidePopIdioma()
{
	if(ativoIdioma!=null)
	{
		timeIdIdioma = setTimeout("ativoIdioma.style.visibility = 'hidden'; timeIdIdioma=null; ativoIdioma=null;",1);
	}
}




ativoregionais = null;
cellAtivoregionais = null;
timeIdregionais = null;
document.onclick = new Function("showregionais()");
function showregionais(obj,name)
{
	fade = name;
	name = document.getElementById(name);
	if(ativoregionais!=null) { 
		ativoregionais.style.visibility = "hidden"; 
		ativoregionais=null
	}
	if(obj)
	{
		cellAtivoregionais = obj;
	}
	if(timeIdregionais!=null){ clearTimeout(timeIdregionais); }
	if(name)
	{
	var newX = findPosX(obj);
	var newY = findPosY(obj);
	//var x = new getObj(name);
		//document.getElementById("conteudo").style.zIndex = "1";
		//document.getElementById("conteudoespaco").style.zIndex = "1";
		//document.getElementById("msghomeflash").style.zIndex = "1";
		name.style.zIndex = 300;
		name.style.visibility = "visible";
		name.style.top = newY + 0 + 'px';
		name.style.left = newX + 151 + 'px';
	
		//colorfade(fade);
		ativoregionais = name;
	}
}
function timerHidePopregionais()
{
	if(ativoregionais!=null)
	{
		timeIdregionais = setTimeout("ativoregionais.style.visibility = 'hidden'; timeIdregionais=null; ativoregionais=null;",1);
	}
}



ativoinstitu = null;
cellAtivoinstitu = null;
timeIdinstitu = null;
document.onclick = new Function("showinstitu()");
function showinstitu(obj,name)
{
	fade = name;
	name = document.getElementById(name);
	if(ativoinstitu!=null) { 
		ativoinstitu.style.visibility = "hidden"; 
		ativoinstitu=null
	}
	if(obj)
	{
		cellAtivoinstitu = obj;
	}
	if(timeIdinstitu!=null){ clearTimeout(timeIdinstitu); }
	if(name)
	{
	var newX = findPosX(obj);
	var newY = findPosY(obj);
	//var x = new getObj(name);
		//document.getElementById("conteudo").style.zIndex = "1";
		//document.getElementById("conteudoespaco").style.zIndex = "1";
		//document.getElementById("msghomeflash").style.zIndex = "1";
		name.style.zIndex = 300;
		name.style.visibility = "visible";
		name.style.top = newY + 29 + 'px';
		name.style.left = newX - 3 + 'px';
	
		//colorfade(fade);
		ativoinstitu = name;
	}
}
function timerHidePopinstitu()
{
	if(ativoinstitu!=null)
	{
		timeIdinstitu = setTimeout("ativoinstitu.style.visibility = 'hidden'; timeIdinstitu=null; ativoinstitu=null;",1);
	}
}




