// JavaScript Document

//Automatically detects the browser height and sets the masterDiv's height to match it
function adjustDocSize(){
var myWidth = 0, myHeight = 0;
var headerHeight = $("#topNavContainer").height() + $(".charakHeader").height();

	 if( typeof( window.innerWidth ) == "number" ) {
		 //Non-IE
		 myWidth = window.innerWidth;
		 myHeight = window.innerHeight;
		 //JQuery to alter the masterDiv Height via CSS
		 
	   $(".masterDiv").css("min-height", myHeight - headerHeight + "px");	
	   
	   } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
		 //IE 6+ in "standards compliant mode"
		 myWidth = document.documentElement.clientWidth;
		 myHeight = document.documentElement.clientHeight;
		  //JQuery to alter the masterDiv Height via CSS
		 $(".masterDiv").css("height", myHeight - headerHeight + "px");	
	   } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
		 //IE 4 compatible
		 myWidth = document.body.clientWidth;
		 myHeight = document.body.clientHeight;
		  //JQuery to alter the masterDiv Height via CSS
		 $(".masterDiv").css("min-height", myHeight - headerHeight + "px");
		 
	   }
//alert("HI");
//alert(headerHeight);
//alert(masterHeight);
};
