window.onload = function(){
    var content = document.getElementById("content");
    var footer = document.getElementById("footer");

    var contentHeight = content.offsetHeight
    var windowHeight = null;


    /*
     * Get the window height
     */
    if( typeof( window.innerWidth ) == 'number' ) {
        windowHeight = window.innerHeight;
    }else{
        windowHeight = document.documentElement.clientHeight;
    }

    /*
     * Get the window height minus the header, flash and content
     */
    windowHeight = windowHeight - contentHeight - 301 - 110;

    /*
     * Add padding to the footer if needed
     */
    if(windowHeight > 50){
        footer.style.paddingTop = windowHeight - 50 +"px";
    }
}
