// JavaScript Document

$(document).ready(function() {
    
    
        $('body').load( function() {
                var topOffset = 427;
                var bottomOffset = 78;
                var step = 128;
        
                mainHeight = getPageHeight() - topOffset - bottomOffset;
                stepCount = Math.floor(mainHeight/step);
                mainHeight = mainHeight%step != 0 ? stepCount * step + step : mainHeight;
                document.getElementById('stretch').style.height = mainHeight + 'px';
        });
        function getPageHeight()
        {
                height = 0;

                if (document.body.clientHeight)
                        height = document.body.clientHeight;
                if (document.body.offsetHeight)
                        height = document.body.offsetHeight;
                if (document.body.scrollHeight)
                        height = document.body.scrollHeight;

                return height;
        }
        
});


