window.onresize = windowres;
$(function(){
	windowres();
	oValidator.validateAll()
})

function validateFormSubmit(formSubmit){
	var sError = oValidator.checkLocalSubmit();
	if(sError != ''){
		alert(sError);
		return false;
	};
	return true;
}

function news_toggle(id){
	if($('.news_lead','#news_'+id).css('display')=='none'){
		$('.news_lead','#news_'+id).show();
	}else{
		$('.news_lead','#news_'+id).hide();
	}
}

function windowres(){
	var scr = document.documentElement.offsetWidth || document.body.offsetWidth;
	var wid = scr;
	if(scr<1000){
		$('.header').css('width','1000px');
		$('.cont').css('width','1000px');
		$('#foot2').css('width','1000px');
		$('.foot_links_ico').css('width','auto');
	}else{
		if(scr>1240){
			var cor = eval(Math.floor((1600-scr)/2));
			var cor2 = eval(Math.floor((scr-1240)/2));
			$('.header').css('width','1240px');
			$('.cont').css('width','1240px');
			$('.home_inner_content').css('background','url('+"/_img/cont_bg_.jpg"+') no-repeat center center');
			$('#middle_menu').css('width','90%');
			$('#foot2').css('width','1240px');
			$('#foot2').css('left',cor2+'px');
			$('.foot_links_ico').css('width','19%');
		}else{
			var cor = eval(Math.floor((1600-scr)/2));
			$('.header').css('width','100%');
			$('.cont').css('width','95%');
			$('#foot2').css('width','100%');
			$('#foot2').css('left','0px');
			$('.foot_links_ico').css('width','auto');
		};
	};
};
