function fnGetWindowHeight() {
	var myHeight = 0;
	if(typeof(window.innerWidth) == 'number'){
		return window.innerHeight;
	}else if(document.documentElement && document.documentElement.clientHeight){
		return document.documentElement.clientHeight;
	}else if(document.body && document.body.clientHeight){
		return document.body.clientHeight;
	}
}

function fnPositionAll(){
	var nHeight=fnGetWindowHeight();
	
	var oHeaderDiv=document.getElementById("header");
	var oContentDiv=document.getElementById("content");
	var oSpacerDiv=document.getElementById("footspacer");
	
	
	//get the standard distance down you want it to move: nHeight-250
	var nDefaultPos=nHeight-200;
	var nContentBottom=oHeaderDiv.offsetHeight+oContentDiv.offsetHeight;
	
	//alert(nDefaultPos+" : "+nContentBottom);
	//if this position is less than the bottom of the content div - the change it to the bottom of the content div
	if(nDefaultPos<nContentBottom){
		oSpacerDiv.style.height=0+'px';
		//alert(nContentBottom);
		//alert("1");
	}else{
		//otherwise continue as normal.
		oSpacerDiv.style.height=nDefaultPos-nContentBottom+50+'px';
		/*
		var oMyDiv=document.getElementById("rightColumn");
		oMyDiv.style.height=100+'%';
		
		var oMyDiv=document.getElementById("mainHolder");
		oMyDiv.style.height=100+'%';
		*/
		
		//alert("2");
		
	}
	
		
		var nAmount=oHeaderDiv.offsetHeight+oContentDiv.offsetHeight+255;
		//alert(nAmount);
		
		var oMyDiv=document.getElementById("rightColumn");
		oMyDiv.style.height=nContentBottom+oSpacerDiv.offsetHeight+150+'px';
		
		var oMyDiv=document.getElementById("mainHolder");
		oMyDiv.style.height=nContentBottom+oSpacerDiv.offsetHeight+150+'px';
	
	
	
	
}

window.onresize = fnPositionAll;
window.onload = fnPositionAll;
