Javascript windowwidth - resize
<p>I'm trying to figure out with this isn't working.
It used to take care of height instead of width, but i simply can't get it it work.
Anyone could point me in the right direction of the problem perhaps?</p>

<pre><code>            function getWindowWidth() {
        var windowWidth = 0;
        if (typeof(window.innerWidth) == 'number') {
            innerWidth = window.innerWidth;
        }
        else {
            if (document.documentElement &amp;&amp; document.documentElement.clientWidth) {
                windowWidth = document.documentElement.clientWidth;
            }
            else {
                if (document.body &amp;&amp; document.body.clientWidth) {
                    windowWidth = document.body.clientWidth;
                }
            }
        }
        return windowWidth;
    }
    function Removewhensmall(id) {
        if (document.getElementById) {
            var windowWidth = getWindowWidth();
            if (windowWidth &gt; 0) {


              var contentElement = document.getElementById(id);
                var contentWidth = contentElement.offsetWidth;

                if (windowWidth &lt; 600) {
                    contentElement.style.display = 'none';


                }


            }
        }
    }
    window.onload = function() {

Removewhensmall('rightwrap');
    Removewhensmall('leftwrap2');

    }
    window.onresize = function() {

            Removewhensmall('rightwrap');
    Removewhensmall('leftwrap2');

    } 
</code></pre>
