﻿// JScript File

       function resizeWindow()
            {
                var MinSize = 200;
                var AvailHeight = 200;
            
                if( typeof( window.innerWidth ) == 'number' ) 
                        {//Non-IE
                        AvailHeight = window.innerHeight;} 
                else if( document.documentElement && document.documentElement.clientHeight ) 
                        {//IE 6+ in 'standards compliant mode'
                        AvailHeight = document.documentElement.clientHeight;} 
                else if( document.body && document.body.clientHeight ) 
                        {//IE 4 compatible
                        AvailHeight = document.body.clientHeight;};

                var elm = document.getElementById("CTWSHeader");
	            if (elm && elm.offsetHeight) {AvailHeight = AvailHeight - elm.offsetHeight};	    
        	 
	            var elm = document.getElementById("CTWSFooter");
	            if (elm && elm.offsetHeight) {AvailHeight = AvailHeight - elm.offsetHeight};	
    	 
	            AvailHeight = AvailHeight - 60
		        if (AvailHeight< MinSize) {AvailHeight=MinSize};
	            var elm = document.getElementById("CTWSContent");
	            if (elm) {elm.style.height=AvailHeight.toString()+"px" };	
         }       
        
        window.onresize=resizeWindow;
        resizeWindow();