function getPageSize()
{
	var xScroll, yScroll;
	if (window.innerHeight && window.scrollMaxY) { xScroll = document.body.scrollWidth; yScroll = window.innerHeight + window.scrollMaxY; }
	else if (document.body.scrollHeight > document.body.offsetHeight){ xScroll = document.body.scrollWidth; yScroll = document.body.scrollHeight; } // all but Explorer Mac
	else {  xScroll = document.body.offsetWidth; yScroll = document.body.offsetHeight; } // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
	var windowWidth, windowHeight;
	if (self.innerHeight) { windowWidth = self.innerWidth; windowHeight = self.innerHeight; } // all except Explorer
	else if (document.documentElement && document.documentElement.clientHeight) { windowWidth = document.documentElement.clientWidth; windowHeight = document.documentElement.clientHeight; } // Explorer 6 Strict Mode
	else if (document.body) { windowWidth = document.body.clientWidth; windowHeight = document.body.clientHeight; } // other Explorers
	// for small pages with total height less then height of the viewport
	if(yScroll < windowHeight){ pageHeight = windowHeight; }
	else { pageHeight = yScroll; }
	// for small pages with total width less then width of the viewport
	if(xScroll < windowWidth){	pageWidth = windowWidth; }
	else { pageWidth = xScroll; }
	// center of screen
	var scrollY;
    if ( document.documentElement && document.documentElement.scrollTop ){ scrollY = document.documentElement.scrollTop; }
	else if ( document.body && document.body.scrollTop ){ scrollY = document.body.scrollTop; }
	else if ( window.pageYOffset ){ scrollY = window.pageYOffset; }
	else if ( window.scrollY ){ scrollY = window.scrollY; }
	if(!(scrollY)) { scrollY = 0; }
	arrayPageSize = new Array(pageWidth,pageHeight,windowWidth,windowHeight,scrollY);
	return arrayPageSize;
}

function setPageHeight()
{
	$("dynheight").setStyle({height: first_page_body_height + "px" }); // reset to orig state first;
	arrayPageSize = getPageSize(); // dynamic height of window.
	height_to_set = parseInt(arrayPageSize[1]) - 448; // variable of height to set td.
	$("dynheight").setStyle({ height: height_to_set + "px" }); // reset to what we want it to be.
}

window.onresize = function()
{
	setTimeout("setPageHeight()",1);
}

window.onload = function()
{
	first_page_body_height = parseInt(Element.getStyle('dynheight', 'height').replace(/px/, "")); // initial height of window  - smallest size.
	setTimeout("setPageHeight()",1);
}

function msover(img,ref){
	if(document.images)document.images[img].src=ref;
}
