function resizeHandler() {
    // Test if content fits side-by-side
    if (typeof(window.getComputedStyle) != 'function')
        return; // IE6...
    
    var style = window.getComputedStyle(document.getElementById('nyt'), null);
    var itemMinWidth = parseFloat(style.getPropertyValue('min-width')) + 
        parseFloat(style.getPropertyValue('padding-left')) +
        parseFloat(style.getPropertyValue('padding-right'));
    
    var availableWidth = parseFloat(window.getComputedStyle(
        document.getElementById('frontpagemain'), null).getPropertyValue('width'));
    var contentWidth = availableWidth * 0.47 * 2 + 20;
    
    if (contentWidth + 1 >= availableWidth || itemMinWidth * 2 + 5 >= availableWidth) {
        document.body.className = "smallscreen";
    } else {
        document.body.className = "";
    }
}

window.onload = function(){resizeHandler(); removeSpamBlock();}
window.onresize = resizeHandler;
