var iOldBodyScrollTop;
var iOldBodyHeight;

function RePositionBody()
{
	var iBodyScrollTop;
	var temp;
	
	// Find the position of the scroll.
	iBodyScrollTop = (document.documentElement && document.documentElement.scrollTop ) ? document.documentElement.scrollTop : document.body.scrollTop;
	
	// See if the page has scrolled at all since the last time this function was called.
	if (iBodyScrollTop != iOldBodyScrollTop)
	{
		if (document.getElementById("redStrip"))
		{
			iNewTop = iBodyScrollTop + 0;
			document.getElementById("redStrip").style.top =  iNewTop + "px";
		}
		if (document.getElementById("whiteStrip"))
		{
			iNewTop = iBodyScrollTop + 55;
			document.getElementById("whiteStrip").style.top =  iNewTop + "px";
		}
		if (document.getElementById("flashStrip"))
		{
			iNewTop = iBodyScrollTop + 23;
			document.getElementById("flashStrip").style.top =  iNewTop + "px";
		}
		if (document.getElementById("sidebar"))
		{
			iNewTop = iBodyScrollTop + 0;
			document.getElementById("sidebar").style.top =  iNewTop + "px";
		}
		if (document.getElementById("categoryMenuTable"))
		{
			iNewTop = iBodyScrollTop + 82;
			document.getElementById("categoryMenuTable").style.top =  iNewTop + "px";
		}
	}
	
	// Call the function again after a delay.
	temp = setTimeout('RePositionBody()',10);
	
	// Set the old position, so next time we can check if the page scroll has moved at all.
	iOldBodyScrollTop = iBodyScrollTop;
}

function StretchGreyBar()
{
	var iBodyHeight;
	
	// Find the position of the scroll.
	iBodyHeight = document.body.offsetHeight;
	iBodyScroll = document.body.scrollTop;
	
	iNewHeight = iBodyHeight + iBodyScroll - 10;
	document.getElementById("sidebar").style.height =  iNewHeight + "px";
}