addEvent(window, "load", fluidWindow);
addEvent(window, "resize", fluidWindow);
var domCompat = (document.getElementById) && (document.documentElement); // essential DOM compatability

function fluidWindow() { // use JS to dictate layout based upon screensize; avoids IE-propritary styles
	if (domCompat) { // DOM check & not Mac/IE
		try {
			var y;
			if (self.innerHeight) { // all except Explorer
				y = self.innerHeight;
			}
			else if (document.documentElement && document.documentElement.clientHeight) {
				// Explorer 6 Strict Mode
				y = document.documentElement.clientHeight;
			}
			else if (document.body) { // other Explorers
				y = document.body.clientHeight;
			}
			var scrollingDiv = document.getElementById('content');
			//var innerDiv = document.getElementById('content');
			//var innerDivHeight = innerDiv.offsetHeight;
			//var auxDiv = document.getElementById('sidebar');
			var scrollHeightNew;
			if (y < 235) { // started the "locked" environment
				scrollHeightNew = "100px";
			} else { // start the "elastic" environment
				scrollHeightNew = y - 148 + "px";
			} // end if y < 600
			if (scrollingDiv) {
				scrollingDiv.style.height = scrollHeightNew;
			}
		} catch(e) {
			// alert (e.message) // not sure why an object error is thrown in IE on occassion, so we'll just catch and ignore it...
		}
	} // end if domCompat
} // end resetLayout

