function resize() {
    var h = parent.document.body.clientHeight;
    var div = document.getElementById('b-wdgt-list');

    if (div) {
        div.style.height = (h - 72) + "px";
    }

    if (window.navigator.userAgent.indexOf('Opera/9') != -1) {
        document.body.className += ' opera-bugfix';

        setTimeout(function() {
            document.body.className = document.body.className.replace(/\s*opera-bugfix/, '');
        }, 500);
    }
}

function load() {
    resize();

    var div = document.getElementById('b-wdgt-list');

    if (div) {
        var a = div.getElementsByTagName('a')[0];
        if (a) {
            a.focus();
        }
    }
}

window.onresize = resize;
window.onload = load;

