function getWindowWidth() {
    var windowWidth = 0;
    if (typeof(window.innerWidth) == 'number') {
        windowWidth = window.innerWidth;
    }
    else {
        if (document.documentElement && document.documentElement.clientWidth) {
            windowWidth = document.documentElement.clientWidth;
        }
        else {
            if (document.body && document.body.clientWidth) {
                windowWidth = document.body.clientWidth;
            }
        }
    }
    return windowWidth;
}
function myResize(){
var mW=getWindowWidth();
if (document.getElementById('body')){document.getElementById('body').className=(mW<1200)?'w1024':'w1280';}
if (document.getElementById('body')&&(mW<1200)){document.getElementById('body').className=(mW<900)?'w800':'w1024';}
}

window.onresize=myResize;
window.onload=myResize;