<!--
if (!window.opera) {
	try {
			document.execCommand("BackgroundImageCache", false, true);
	} catch(err) {}
}

function newsCount() {
	nWidth = parseInt($('#news1').width()/230);
	nb1 = $('#news1 div.news_block').length;
	nb2 = $('#news2 div.news_block').length;
	nRes1 = (nWidth-nb1>=0) ? 0 : (nb1-nWidth)*230;
	nRes2 = (nWidth-nb2>=0) ? 0 : (nb2-nWidth)*230;
	nCur1 = 0;
	nCur2 = 0;
	$('#news_tools1 div.news_btn_right a').click(function(){
		if (nCur1<nRes1) {
			nCur1 = nCur1 + 230;
			$('#news1 div.news_container').animate({marginLeft:'-'+nCur1+'px'}, 250);
		}
	return false;
	});
	$('#news_tools1 div.news_btn_left a').click(function(){
		if (nCur1>0) {
			nCur1 = nCur1 - 230;
			$('#news1 div.news_container').animate({marginLeft:'-'+nCur1+'px'}, 250);
		}
	return false;
	});
	$('#news_tools2 div.news_btn_right a').click(function(){
		if (nCur2<nRes2) {
			nCur2 = nCur2 + 230;
			$('#news2 div.news_container').animate({marginLeft:'-'+nCur2+'px'}, 250);
		}
	return false;
	});
	$('#news_tools2 div.news_btn_left a').click(function(){
		if (nCur2>0) {
			nCur2 = nCur2 - 230;
			$('#news2 div.news_container').animate({marginLeft:'-'+nCur2+'px'}, 250);
		}
	return false;
	});
	
}

$(document).ready(
	function() {
		$('#search div input').focus(function(){
			if (($(this).val()=='ïîèñê')||($(this).val()=='search')) {
				def = $(this).val();
				$(this).val('');
			}
		});
		$('#search div input').blur(function(){
			if (!/[\wà-ÿÀ-ß]/.test($(this).val())) $(this).val(def);
		});
		newsCount();
		
		
	}
);

// -->
