function pop(target, url, name, width, height, scroll) {
    
    if (!_p) {
        if (target) {
            var _p = window.open(
                url,
                name
            );
        } else {
            var _p = window.open(
                url,
                name, 
                'height = ' + height + 
                ', width = ' + width + 
                ', top = ' + (screen.height - height) / 2 + 
                ', left = ' + (screen.width - width) / 2 + 
                ', scrollbars = ' + (scroll ? 'yes' : 'no') +
                ', resizable = yes'
            );
        }
    }
    if (parseInt(navigator.appVersion) >= 4 && !target) { 
        _p.window.focus(); 
    }
}

function toggle(h, list_id) {
    var l = document.getElementById(list_id);
    if (l.style.display == 'block') {
        l.style.display = 'none';
        h.style.backgroundPosition = '10px -18px';
    } else {
        l.style.display = 'block';
        h.style.backgroundPosition = '10px 3px';
    }
}

function _topple() {
    var h = window.offsetHeight - (58 + 108 + 25 + 70 + 10);
    alert(h);
}

window.onload = function() {
    try {
        if (document.getElementById('content').offsetHeight < (document.body.offsetHeight - 277)) {
            document.getElementById('content').style.height = (document.body.offsetHeight - 277) + 'px';
        }
    } catch(e) {
        
    }
}

window.onresize = function() {
    try {
        if (document.getElementById('content').offsetHeight < (document.body.offsetHeight - 277)) {
            document.getElementById('content').style.height = (document.body.offsetHeight - 277) + 'px';
        }
    } catch(e) {
        
    }
}
