

var maxDisplacement=0;

function getScrollHeight()
{
	
	window.scrollTo(0,10000000);
	
	if( typeof self.pageYOffset!='undefined' ){
		maxDisplacement=self.pageYOffset;
	}else{
		if( document.compatMode && document.compatMode != 'BackCompat' ){
			maxDisplacement=document.documentElement.scrollTop ;
		}else{
			if( document.body && typeof(document.body.scrollTop)!='undefined' ){
				maxDisplacement=document.body.scrollTop;
			}
		}
	}
	
	window.scrollTo(0,0);
	
	return maxDisplacement;
}

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 oMyDiv=document.getElementById("spacerside");
	
	var nSpacerHeight=nHeight-(220+407);
	var nDisp=getScrollHeight();
	
	if(nSpacerHeight>1){
		oMyDiv.style.height=nSpacerHeight+nDisp+'px';
	}else{
		oMyDiv.style.height=nDisp+'px';
	}
	
	var oMyDiv=document.getElementById("panel");
	oMyDiv.style.height=nHeight+nDisp+'px';
	
	
}

window.onresize = fnPositionAll;
window.onload = fnPositionAll;

