//
// SUMMARY
//
// This is a set of JavaScript functions for working with the window/document.
//

function calculateWindowHeight() {

    var pageHeight;

    if( window.innerHeight && window.scrollMaxY ) { // Firefox
        pageHeight = window.innerHeight + window.scrollMaxY;
    } else if( document.body.scrollHeight > document.body.offsetHeight )  { // all but Explorer Mac 
        pageHeight = document.body.scrollHeight;
    } else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
        pageHeight = document.body.offsetHeight + document.body.offsetTop;
    }
    
	return pageHeight;    
    
}

function calculateWindowWidth() {

  	var pageWidth;

    if( window.innerHeight && window.scrollMaxY ) { // Firefox
        pageWidth = window.innerWidth + window.scrollMaxX;
    } else if( document.body.scrollHeight > document.body.offsetHeight )  { // all but Explorer Mac 
        pageWidth = document.body.scrollWidth;
    } else { // works in Explorer 6 Strict, Mozilla (not FF) and Safari
        pageWidth = document.body.offsetWidth + document.body.offsetLeft; 
    }
    
	return pageWidth;    
}
