// This script is for a visual fix when using, in this case, a four column layout.
// It sets the heights of two divs to fit the height of the window or the height of
//      the content. Causes all columns to expand to the bottom.

function resize(){  

var frame = document.getElementById("container");

frame.style.height = "auto"; // By default, the "outer" div's height is set to 100% for the benefit of users who have js disabled. However, for this script to work properly, the "outer" div's height must be "auto."

var check = document.getElementById("siteFoot");
var htmlheight = document.body.parentNode.scrollHeight; // Read content height.
var windowheight = window.innerHeight; // Read window height in Moz.
var isIE = (navigator.appName.indexOf("Microsoft") !=-1); // Check if browser is IE.

if(isIE) {windowheight = document.documentElement.clientHeight;} // Read window height in IE.

if ( htmlheight > windowheight ) { 
	if ( check.clientHeight == 23 ) { htmlheight = htmlheight - 23; } // Checks for alternate stylesheet and adjusts height accordingly.
	else {htmlheight = htmlheight - 16;} // Adjust height for footer that extends the entire width of the page.
	frame.style.height = htmlheight + "px";
	}  
else { 
    if ( check.clientHeight == 23 ) { windowheight = windowheight - 23; } // Checks for alternate stylesheet and adjusts height accordingly.
	else { windowheight = windowheight - 16; } // Adjust height for footer that extends the entire width of the page.
	frame.style.height = windowheight + "px"; 
	}  

}
