var x,y;
var bd_ht = document.body.scrollHeight;
var bd_wd = document.body.offsetHeight


  function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }

pos = findPosY(document.getElementById('lft-table'));
pos = findPosY(document.getElementById('rft-table'));

if (bd_ht > bd_wd) // all but Explorer Mac
{
	x = document.body.scrollWidth;
	y = document.body.scrollHeight;
}
else // Explorer Mac;
     //would also work in Explorer 6 Strict, Mozilla and Safari
{
	x = document.body.offsetWidth;
	y = document.body.offsetHeight;
}

if(screen.width == 800)
{
	y = y - pos;
}
if(screen.width == 1024)
{
	y = y - pos;
}
if(screen.width == 1280)
{
	y = y - pos;
}

document.getElementById('lft-table').style.height = y + "px";
document.getElementById('rft-table').style.height = y + "px";



function findPosX(obj)
  {
    var curleft = 0;
    if(obj.offsetParent)
        while(1) 
        {
          curleft += obj.offsetLeft;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.x)
        curleft += obj.x;
    return curleft;
  }

  function findPosY(obj)
  {
    var curtop = 0;
    if(obj.offsetParent)
        while(1)
        {
          curtop += obj.offsetTop;
          if(!obj.offsetParent)
            break;
          obj = obj.offsetParent;
        }
    else if(obj.y)
        curtop += obj.y;
    return curtop;
  }

pos = findPosY(document.getElementById('lft-table'));
pos = findPosY(document.getElementById('rft-table'));
if (bd_ht > bd_wd) // all but Explorer Mac
{
	x = document.body.scrollWidth;
	y = document.body.scrollHeight;
}
else // Explorer Mac;
     //would also work in Explorer 6 Strict, Mozilla and Safari
{
	x = document.body.offsetWidth;
	y = document.body.offsetHeight;
}

if(screen.width == 800)
{
	y = y - pos;
}
if(screen.width == 1024)
{
	y = y - pos;
}
if(screen.width == 1280)
{
	y = y - pos;
}

document.getElementById('lft-table').style.height = y + "px";
document.getElementById('rft-table').style.height = y + "px";

if (bd_ht > bd_wd) // all but Explorer Mac
{
	x = document.body.scrollWidth;
	y = document.body.scrollHeight;
}
else // Explorer Mac;
     //would also work in Explorer 6 Strict, Mozilla and Safari
{
	x = document.body.offsetWidth;
	y = document.body.offsetHeight;
}

if(screen.width == 800)
{
	y = y - pos;
}
if(screen.width == 1024)
{
	y = y - pos ;
}
if(screen.width == 1280)
{
	y = y - pos;
}

document.getElementById('lft-table').style.height = y;
document.getElementById('rft-table').style.height = y ;
function scroll(){
	if(screen.width == 800)
	{
		document.getElementById('pan').style.position = "fixed";
	}
	var tp_ht = document.body.scrollTop;
	if (tp_ht > pos)
	{
		document.getElementById('pan').style.position = "relative";
		document.getElementById('pan').style.top = tp_ht - pos + "px";
//		alert(pos + "<BR>" + tp_ht);
	}
	if (tp_ht < pos)
	{
		document.getElementById('pan').style.top = pos - pos + "px";
	}
}

function JSFX_FloatTopDiv()
{
	var placeX = -1,
	placeY = 780 - (pos * 2) + 9;
	var ns = (navigator.appName.indexOf("Netscape") != -1);
	var d = document;
	function DeLayer(id)
	{
		var GetElements=d.getElementById?d.getElementById(id):d.all?d.all[id]:d.layers[id];
		if(d.layers)GetElements.style=GetElements;
		GetElements.sP=function(x,y){this.style.left=x;this.style.top=y;};
		GetElements.x = placeX;
		GetElements.y = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
		GetElements.y -= placeY;
		return GetElements;
	}
	window.stayTopright=function()
	{	
			var pY = ns ? pageYOffset + innerHeight : document.body.scrollTop + document.body.clientHeight;
			ftlObj.y += (pY - placeY - ftlObj.y)/15;
			ftlObj.sP(ftlObj.x, ftlObj.y);
			setTimeout("stayTopright()", 10);
	}
	ftlObj = DeLayer("pan");
	stayTopright();
}

//JSFX_FloatTopDiv();
