function setFooter() {
    var infoHeight = document.getElementById("body_div").scrollHeight;
    var bottomHeight = document.getElementById("footer").scrollHeight;
    var allHeight = document.documentElement.clientHeight;

    var bottom = document.getElementById("footer");
    if ((infoHeight + bottomHeight) < allHeight) {
        bottom.style.position = "absolute";
        bottom.style.bottom = "0";
    } else {
        bottom.style.position = "";
        bottom.style.bottom = "";
    }
}
