﻿  var myWidth = 0, myHeight = 0, minRightAreaWidth = 1155;
    function alertSize() {
        findSize();
        window.alert( 'Width = ' + myWidth );
    }

    function findSize() {
      
      if( typeof( window.innerWidth ) == 'number' ) {
        //Non-IE
        myWidth = window.innerWidth;
        myHeight = window.innerHeight;
      } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
        //IE 6+ in 'standards compliant mode'
        myWidth = document.documentElement.clientWidth;
        myHeight = document.documentElement.clientHeight;
      } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
        //IE 4 compatible
        myWidth = document.body.clientWidth;
        myHeight = document.body.clientHeight;
      }  
    }

    function displayRightContent() {
        findSize();
        
        // FH:Note:Rob - In FireFox, this code will work except that the background color
        // of the containing td, will only be colored to the size of the inner content        
        var rightArea = $get('RightArea');       
        var mainBody = $get('MainBody');
        if (myWidth >= minRightAreaWidth)
        {    
            rightArea.style.display = 'block';
            mainBody.style.width = '1154px'
        }
        else{
            rightArea.style.display = 'none';
            mainBody.style.width = '936px'
        }
    }

    window.onload = displayRightContent;
    window.onresize = displayRightContent;