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');
		$('#foot').css('width','1000px');
//		$('#big_img').css('width','1000px');
//		$('#big_img_box').css('margin-left','-300px');
		$('.cont').css('width','1000px');
		$('#img_box').css('width','1000px');
		$('#foot').css('margin-left','-500px');
	}else{
		if(scr>1240){
			var cor = eval(Math.floor((1600-scr)/2));
			var cor2 = eval(Math.floor((scr-1240)/2));
//			$('#big_img_box').css('margin-left','-'+cor+'px');
//			$('#big_img').css('width','100%');
			$('.cont').css('width','1240px');
			$('.header').css('width','1240px');
			$('#foot').css('width','1240px');
			$('#foot').css('margin-left','-620px');
			$('#img_box').css('width','1240px');
		}else{
			var cor = eval(Math.floor((1600-scr)/2));
//			$('#big_img_box').css('margin-left','-'+cor+'px');
//			$('#big_img').css('width','100%');
			$('.cont').css('width','1000px');
			$('.header').css('width','1000px');
			$('#foot').css('width','1000px');
			$('#foot').css('margin-left','-500px');
			$('#img_box').css('width','1000px');
		};
	};
};
