/* SI_accomodateBackground()
 * derivation of script at  http://www.shauninman.com/
 * Jason Halbig - Systematic Control Design, Inc.
 *
 * This function extends the height of the main column or the sub columns to match the window height
 * if it falls short ensuring that the black spine on the left is never cropped.
 */
var oh = 0; // The original height of `#maincol`


function SI_accomodateBackground() {
			var d = document,w=window,dE=d.documentElement,dB=d.body,hh,ch,wh,th,sch;
			if (!d.getElementById || !d.body.offsetHeight) return;
			hh = d.getElementById('header').offsetHeight + d.getElementById('nav').offsetHeight + d.getElementById('footer').offsetHeight +d.getElementById('banner').offsetHeight;
			

			ch = d.getElementById('singlemaincol').offsetHeight;

			
			oh = (oh==0)?ch:oh; // Save the original heigh of `#maincol` 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 of maincol

			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('singlemaincol').style.height = nh+'px';

			}
			
			
}
window.onload = SI_accomodateBackground;
window.onresize = SI_accomodateBackground;





