var TT;
$(document).ready(function () {
		
});
$(window).load(function () {
	
	$(document).resize(function () {minsize ()});
	$(window).resize(function () {minsize ()});
	document.getElementById("leftmenu").getElementsByTagName("div")[0].style.paddingTop="25px";
	lelements=document.getElementById("leftmenu").getElementsByTagName("li");
	len=lelements.length;
	for (var i=0;i<len;i++) {
		otop=lelements[i].offsetTop;
		lelements[i].style.width=(((742-otop)/742)*323)+2;
	}
	var lelements = document.getElementById("zamok");
	lelements.style.width=((((742-lelements.offsetTop)/742)*323)+2)+"px";
	$(".td_header .b_content .t_head .td_menu ul li:first-child div").css({"background-image":"none","background-color":"#FFF"});

	tscroll_size=scroll_size();
	schetchik=0;
	minsize();
});

function minsize () {
	delayscrollstart();
}
function delayscrollstart () {
	clearTimeout(TT);
	TT=setTimeout("delayscroll ();",1000);
}
function delayscroll () {
	
	remove_scrolls();
	$(".maintable").width("100%");
	$(".maintable").height("100%");
	if ($("body").width()<1000) {
		$("html, body, .maintable").width("1000px");
	}
	if ($("body").height()<760) {
		$("html, body, .maintable").height("760px");
	}
	add_scroll(".td_content .pre_b_content",16);
	add_scroll(".newsblock .pre_b_content",8);
	scroll_init();
}