// JavaScript Document

/*function setLyr(obj,lyr)
{
	var newX = findPosX(obj);
	var newY = findPosY(obj);
	//if (lyr == 'testP') newY -= 50;
	var x = new getObj(lyr);
	//serversistes/testes/teste1.html
	x.style.top = newY + 20 + 'px';
	x.style.left = newX + 'px';
}*/


function findPosX(obj)
{
	var curleft = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curleft += obj.offsetLeft
			obj = obj.offsetParent;
		}
	}
	else if (obj.x)
		curleft += obj.x;
	return curleft;
}

function findPosY(obj)
{
	var curtop = 0;
	if (obj.offsetParent)
	{
		while (obj.offsetParent)
		{
			curtop += obj.offsetTop
			obj = obj.offsetParent;
		}
	}
	else if (obj.y)
		curtop += obj.y;
	return curtop;
}

			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);
	
						
					name.style.zIndex = 200;
					name.style.visibility = "visible";
					name.style.top = newY + 10 + 'px';
					name.style.left = newX + 120 +'px';
					
					
					
					//colorfade(fade);
					ativo = name;
				}
			}
			function timerHidePop()
			{
				if(ativo!=null)
				{
					timeId = setTimeout("ativo.style.visibility = 'hidden'; timeId=null; ativo=null;",1);
				}
			}
			
	
