if (window.webkit) {
	$windowEvent = 'load';
} else {
	$windowEvent = 'domready';
}

window.addEvent($windowEvent,function setContentHeight(){
		if (document.getElementById) {
			var windowHeight=getWindowHeight();
			if (windowHeight>600) {
				document.getElementById('content_scroll').style.height=(windowHeight-91)+'px';  // offset from top 
				document.getElementById('sidebar').style.height=(windowHeight-78)+'px';
				
			}
			if (windowHeight<600) {
				document.body.parentNode.style.overflowY="auto";
			}
		}

	function getWindowHeight() {
		var windowHeight=0;
		if (typeof(window.innerHeight)=='number') {
			windowHeight=window.innerHeight;
		} else {
			if (document.documentElement&&
				document.documentElement.clientHeight) {
				windowHeight=
				document.documentElement.clientHeight;
			} else {
				if (document.body&&document.body.clientHeight) {
					windowHeight=document.body.clientHeight;
				}
			}
		}
		return windowHeight;
	}
	
	window.onresize = setContentHeight
	window.onload = setContentHeight
});