var Footer = {
    maxTries: 100,
    tryCounter: 0,
    checkSize: function() {
        // Breite
        var footer = document.getElementById('footer');
        $('#footer').width(Math.max(1200, $(window).width()));

        // Höhe
        var col1 = document.getElementById('col1');
        var col1ContentHeight = $('#col1_content').height();
        var oldHeight = col1.clientHeight;
        var newHeight = col1.clientHeight + $(window).height() - $('body').height() - ($.browser.msie ? 0 : 50);
        col1.style.height = Math.max(col1ContentHeight, newHeight) + 'px';
        if (Footer.tryCounter < Footer.maxTries && newHeight > 0 && oldHeight != newHeight) {
            Footer.tryCounter++;
            setTimeout("Footer.checkSize()", 10);
        } else {
            Footer.tryCounter = 0;
        }
    },
    startCheck: function() {
        Footer.checkSize();
    }
}
window.onresize = Footer.startCheck;

