function getBrowserWindowSize() {
	if( typeof( window.innerWidth ) == 'number' ) {
		// Non-IE
		return [window.innerWidth, window.innerHeight];
	} else {
		if( document.documentElement &&
			( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
			
			// IE 6+ in 'standards compliant mode'
			return [document.documentElement.clientWidth, document.documentElement.clientHeight];
		} else {
			if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
				// IE 4 compatible
				return [document.body.clientWidth, document.body.clientHeight];
			}
		}
	}
	
	return [0, 0];
}

function testSize() {
	var width = getBrowserWindowSize()[0];
	
	if(width < 1038) {
		if(document.body.className != "small")
			document.body.className = "small";
	} else {
		if(document.body.className != "")
			document.body.className = "";
	}
}

window.onresize = testSize;
window.onload = testSize;
