/* SI_accomodateBackground()
 * http://www.shauninman.com/
 *
 * This function extends the height of the content block if necessary
 * to expand the page box to the bottom.
 */
var oh = 0; // The original height of `#content`
function SI_accomodateBackground() {
	var d = document,w=window,dE=d.documentElement,dB=d.body,hh,ch,wh,th;
	if (!d.getElementById || !d.body.offsetHeight) return;
	
	hh = 160; // header height - allows a suitable bottom margin
	ch = d.getElementById('content').offsetHeight;
	oh = (oh==0)?ch:oh; // Save the original height of `#content` the first time through
	wh = (typeof(w.innerHeight)=='number')?w.innerHeight:(dE&&dE.clientHeight)?dE.clientHeight:(dB&&dB.clientHeight)?dB.clientHeight:0; // window height
	th = hh+oh; // Total original content height 
	nh = wh-hh; // New content height
	// If the original content height is shorter than the window height then expand it to the height of the window
	if (th < wh) { d.getElementById('content').style.height = nh+'px'; }
	}
window.onload = SI_accomodateBackground;
window.onresize = SI_accomodateBackground;