var x,y,z;
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;
}

pos1 = findPosY(document.getElementById('mainRgtPanel') );


if (bd_ht > bd_wd) // all but Explorer Mac
{
	x = document.body.scrollWidth;
	y = document.body.scrollHeight;
	z = document.body.scrollHeight;


}
else // Explorer Mac;
     //would also work in Explorer 6 Strict, Mozilla and Safari
{
	x = document.body.scrollWidth;
	y = document.body.scrollHeight;
	z = document.body.scrollHeight;
	
}

if(screen.width == 800)
{
	z = z - pos1;
}
if(screen.width == 1024)
{
	z = z - pos1;
}
if(screen.width == 1280)
{
	z = z - pos1;
}

if (bd_ht > bd_wd) // all but Explorer Mac
{
	x = document.body.scrollWidth;
	y = document.body.scrollHeight;
	z = document.body.scrollHeight;
	

}
else // Explorer Mac;
     //would also work in Explorer 6 Strict, Mozilla and Safari
{
	x = document.body.scrollWidth;
	y = document.body.scrollHeight;
	z = document.body.scrollHeight;
	
}

if(screen.width == 800)
{
	z = z - pos1;
}
if(screen.width == 1024)
{
	z = z - pos1;
}
if(screen.width == 1280)
{
	z = z - pos1;
}

document.getElementById('mainRgtPanel').style.height = z - 100 + "px";