if(window.addEventListener){
	window.addEventListener("load", setHeightContent, false);
	window.addEventListener("resize", setHeightContent, false);
}else if(window.attachEvent){
	window.attachEvent("onload", setHeightContent);
	window.attachEvent("onresize", setHeightContent);
}

function setHeightContent(){
	if(!document.getElementById('sContent')) return;
	if(!document.getElementById('sTop')) return;
	var obj = document.getElementById('sContent');

	obj.style.height = ''; obj.style.minHeight = '';
	var hCorrection = parseInt(document.getElementById('sTop').offsetHeight,10); 

	var h1 = parseInt(document.getElementsByTagName('body')[0].offsetHeight,10);
	//var w1 = parseInt(document.getElementsByTagName('body')[0].offsetWidth,10);
	var h2 = parseInt(document.documentElement.clientHeight,10);
	//var w2 = parseInt(document.documentElement.clientWidth,10);
	var h = (h1<h2)?h2:h1;
	//var w = (w1<w2)?w2:w1;
	//obj.style.width = w+'px';
	if(navigator.appVersion.indexOf("MSIE")!=-1){
		obj.style.height = (h-hCorrection)+'px';
	}else{
		obj.style.minHeight = (h-hCorrection)+'px';
	}
	//document.title = w+':'+h+' - '+w1+':'+h1+' - '+w2+':'+h2;
}


