
function set_layer(){
	document.getElementById("page").style.height = "100%";

	if (navigator.userAgent.indexOf("MSIE") >= 0){
		var tmp = document.body.offsetHeight;
		//var tmp = window.innerHeight;
	}else{
		var tmp = window.innerHeight;
	}
	if (window.innerHeight) // all except Explorer
	{
	 tmp = window.innerHeight;
	}
	else if (document.documentElement && document.documentElement.clientHeight)
	 // Explorer 6 Strict Mode
	{
	 tmp = document.documentElement.clientHeight;
	}
	else if (document.body) // other Explorers
	{
	 tmp = document.body.clientHeight;
	}
	//alert(tmp);
	tmp = parseInt(tmp) - 130  - 30 - 42 + 5;
	//alert(tmp);
	pic = tmp/2 - 75;
	pic = Math.round(pic);
	tmp = Math.round(tmp-pic);
	document.getElementById("col1").style.height = tmp + "px";
	//alert(tmp+"  "+pic);

	document.getElementById("col1").style.paddingTop = pic + "px";
	if (navigator.userAgent.indexOf("MSIE") >= 0){
		document.getElementById("footer").style.top = tmp + 147 +pic+ "px";
		if (navigator.userAgent.indexOf("7.0") == -1){
			 if (document.documentElement && document.documentElement.clientHeight)
			 // Explorer 6 Strict Mode
			{
			 w = document.documentElement.clientWidth;
			}
			else if (document.body) // other Explorers
			{
			 w = document.body.clientWidth;
			}
			if (w > 900){
				w = Math.floor((w -900)/2);
			}
			document.getElementById("page_margins").style.paddingLeft = w+"px";
		}
	}
	if (tmp < 377){
		pic = 377/2 - 75;
		pic = Math.round(pic);
		tmp = Math.round(tmp-pic);
		document.getElementById("col1").style.height = tmp + "px";
		document.getElementById("col1").style.paddingTop = pic + "px";
		document.getElementById("page").style.height = "567px";
	}

}

window.onload = set_layer;
//window.onload=init;
window.onresize = set_layer;