﻿/*
javascript fix to background not properly extending to 100% of document length in all browsers
ryan bosinger oct 2.2008
*/


function fixSize() {
  
    if (window.innerHeight && window.scrollMaxY) {// Firefox
        yWithScroll = window.innerHeight + window.scrollMaxY;
        xWithScroll = window.innerWidth + window.scrollMaxX;
    } else if (document.body.scrollHeight > document.body.offsetHeight) { // all but Explorer Mac
        yWithScroll = document.body.scrollHeight;
        xWithScroll = document.body.scrollWidth;
    } else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
        yWithScroll = document.body.offsetHeight;
        xWithScroll = document.body.offsetWidth;
    }
    document.getElementById("container").style.height = yWithScroll + 'px';   
}

window.onload = fixSize;
window.onresize = fixSize;

/*function timeFixSize() {
  
    if (window.innerHeight && window.scrollMaxY) {// Firefox
        yWithScroll = window.innerHeight + window.scrollMaxY;
        xWithScroll = window.innerWidth + window.scrollMaxX;
    } else if (document.body.scrollHeight > document.body.offsetHeight) { // all but Explorer Mac
        yWithScroll = document.body.scrollHeight;
        xWithScroll = document.body.scrollWidth;
    } else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
        yWithScroll = document.body.offsetHeight;
        xWithScroll = document.body.offsetWidth;
    }
    yWithScroll = yWithScroll + 80;
    document.getElementById("container").style.height = yWithScroll + 'px';   
    clearTimeout ( alertTimerId );
    alert('finished timeFixSize()');
}


var alertTimerId = 0;
alertTimerId = setTimeout ( "timeFixSize()", 500 );
*/