$(document).ready(function(){
	// Ascertain the height of the viewport and write it into a variable.
	var viewportHeight = $(window).height();
	// Ascertain the height of the main-container and write it into a variable.
	var mainHeight = $(".main").height();
	// Calculate the resize-height (height of the viewport - margin of the main-container to the top - height of the footer-container + space to guarantee a scrollbar) and write it into a variable.
	var resizeHeight = viewportHeight-240-300+1;
	// Check if the calculated resize-height is bigger than the ascertained main-container-height.
	if (resizeHeight > mainHeight) {
		// Check if the user uses IE6.
		if ($.browser.msie && $.browser.version == 6.0) {
			// Give the main-container the calculated resize-height via the attribute "height".
			$(".main").css("height", resizeHeight);
		} else {
			// Give the main-container the calculated resize-height via the attribute "min-height".
			$(".main").css("min-height", resizeHeight);
		}
	}
});

