function getDocHeight() {
    var D = document;
    return Math.max(Math.max(D.body.scrollHeight, D.documentElement.scrollHeight),
        Math.max(D.body.offsetHeight, D.documentElement.offsetHeight),
            Math.max(D.body.clientHeight, D.documentElement.clientHeight))
}
function checkHeight() {
    var hblock1 = document.getElementById('hblock1');
    var hblock2 = document.getElementById('hblock2');
    if (hblock1 != null && hblock2 != null && getDocHeight() >= 1114) {
        hblock1.className = 'newspost hidenbox';
        hblock2.className = 'newspost hidenbox'
    } else if (hblock1 != null && getDocHeight() >= 1024) {
    hblock1.className = 'newspost hidenbox' 
    } 
};