if ( document.getElementById ) {
	var MinHeight=null; // Used in SizeContentArea.
	function GetElement(Id) {
		return document.getElementById?document.getElementById(Id):document.all[Id];
	} // GetElement

	function SizeContentArea() {
		// Get visible height.
		var DisplayHeight = 0;
		if( typeof( window.innerWidth ) == 'number' ) {
			//Non-IE
			DisplayHeight = window.innerHeight;
		} else if ( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
			//IE 6+ in 'standards compliant mode'
			DisplayHeight = document.documentElement.clientHeight;
		} else if ( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
			//IE 4 compatible
			DisplayHeight = document.body.clientHeight;
		}
		
		// If visible height is set then begin adjustmens.
		if ( DisplayHeight>0 ) {
			var MainContainer=GetElement('SubpageTextContainer');
			if ( MainContainer ) {
				if ( DisplayHeight!=(MainContainer.offsetHeight +MainContainer.offsetTop) && DisplayHeight>421 ) {
					var OldHeight, NewHeight, AdjustHeight;
					var AjustObject;
					// Get current height.
					OldHeight=MainContainer.offsetHeight;
					
					// If not MinHeight is set then set it.
					if ( !MinHeight ) MinHeight=OldHeight;
//alert ("Min height: " +MinHeight +"\nTop="+MainContainer.offsetTop +"\nHeight="+MainContainer.offsetHeight);

					// Set new height.
					MainContainer.style.height=(DisplayHeight -GetElement("Top").offsetHeight) -20 +"px";


					// Get new height.
					NewHeight=MainContainer.offsetHeight;
					
					// Reset height if less then min height.
					if ( NewHeight<MinHeight ) {
						MainContainer.style.height=OldHeight +"px";
					} else {
					}
				}
			}
		}
	} // SizeContentArea

	if ( GetElement('Page') ) {
		SizeContentArea();
		onload=SizeContentArea;
		onresize=SizeContentArea;
	}
}

