function SetScreenClass() {
	var screenwidth = document.body.clientWidth;
	screenwidth = (screenwidth<screen.width?screenwidth:screen.width);
	var screenclass = (screenwidth>=1200?'big':screenwidth>=1000?'normal':screenwidth>=528?'small':'simple');
	document.body.className = screenclass;
	if (!((navigator.userAgent.indexOf("Firefox")+1)|(navigator.userAgent.indexOf("Opera")+1))) {document.getElementById('header').setAttribute('style', 'max-width:'+(screenwidth-1));}
}

function addLoadEvent(func) {
    var oldonload = window.onload;
    if (typeof window.onload != 'function') {
        window.onload = func;
    } else {
        window.onload = function() {
            if (oldonload) {
                oldonload();
            }
            func();
        }
    }
}
addLoadEvent(SetScreenClass);
window.onresize = SetScreenClass;