window.onload = load;
window.onresize = resize;
var page;

function load()
{
	resize();
}

function resize()
{
	$(document).ready(function(){

		if ($('#left').height()<$(window).height()-130)
		{
			$("#index_flash").css('height',$(window).height()-40+'px');
		} else {
			$("#index_flash").css('height',$('#left').height()+90+'px');
		}
		
		if ($(window).width()<1200)
		{
			$(".wrapper").css('width',960+'px');
			$("#right").css('width',800+'px');
			$("#text").css('width',300+'px');
			$("#news").css('width',340+'px');
			if (page=="iner")
			{
				$("body").css('background-image', 'url(../images/body_bg_1000.gif)');
			}

			if(!document.getElementById('text_image')) {
				$("#text").css('width',560+'px');

			}
		}  else {
			$(".wrapper").css('width',1200+'px');
			$("#right").css('width',1040+'px');
			$("#text").css('width',540+'px');
			$("#news").css('width',580+'px');
			if (page=="iner")
			{
				$("body").css('background-image', 'url(../images/body_bg.gif)');
			}
			if(!document.getElementById('text_image')) {
				$("#text").css('width',800+'px');
			}
		}

	});	
}
