var NN = true;
if (document.all) NN = false;
var showflag = false;
var id = null;
var onname = "";

//////////////////////////////////////////////////////////////////////////////
function getAbsoluteLeft(objectId) 
{
	o = document.getElementById(objectId);
	oLeft = o.offsetLeft;
	while(o.offsetParent != null) 
    {  
		oParent = o.offsetParent;
		oLeft += oParent.offsetLeft;
		o = oParent;
	}
	return oLeft
}
//////////////////////////////////////////////////////////////////////////////
function GetX(objectID)
{
	return getAbsoluteLeft(objectID);
}
//////////////////////////////////////////////////////////////////////////////

//////////////////////////////////////////////////////////////////////////////
function show(name, x)
{
  killtimer();
  if(showflag) hide();
  if(NN)
  {
    document.layers[name].top=129;
    document.layers[name].left=GetX(x);
    document.layers[name].visibility='show';
  }
  else
  {
    document.all[name].style.top=129;
    document.all[name].style.left=GetX(x);
    document.all[name].style.visibility='visible';
  }

  showflag=true;
  onname=name;
}
//////////////////////////////////////////////////////////////////////////////
function killtimer()
{
  if(id!=null)
  {
    clearTimeout(id);
    id=null;
  }
  return true;
}
//////////////////////////////////////////////////////////////////////////////
function hide()
{
  if(id!=null) killtimer();
  if(showflag)
  {
    if (NN) document.layers[onname].visibility='hide';
    else document.all[onname].style.visibility='hidden';
  }
  showflag=false;
  onname="";
}
//////////////////////////////////////////////////////////////////////////////
function reset()
{
  killtimer();
  id=setTimeout('hide()', 250);
}
//////////////////////////////////////////////////////////////////////////////
function cellOff(obj) 
{
  obj.style.backgroundColor="54728C";
}
//////////////////////////////////////////////////////////////////////////////
function cellOn(obj) 
{
  obj.style.backgroundColor="104050";
}
//////////////////////////////////////////////////////////////////////////////
