window.onload = function(){
	xajax_right_GetAbout();
	xajax_right_GetLastNews();
	xajax_bottom_GetBanners();
	xajax_center_GetCenter(center_type);
	
	if (center_type == 'contacts') {
		SetTopMenuDefault();
		$('contacts').className = 'contacts_active';
	}
	
	if (center_type == 'about') {
		SetTopMenuDefault();
		$('about').className = 'about_active';
	}
}

function SetTopMenuDefault()
{
	$('main').className = 'main';
	$('news').className = 'news';
	$('about').className = 'about';
	$('clients').className = 'clients';
	$('gallery').className = 'gallery';
	$('contacts').className = 'contacts';
}

var sc_left = null;
function ScrollLeftStart()
{
	sc_left = setInterval(function(){
		$('photo_box').scrollLeft = ($('photo_box').scrollLeft+2);
	}, 1);
}

function ScrollLeftStop()
{
	clearInterval(sc_left);
}

function ScrollRightStart()
{
	sc_left = setInterval(function(){
		$('photo_box').scrollLeft = ($('photo_box').scrollLeft-2);
	}, 1);
}

function ScrollRightStop()
{
	clearInterval(sc_left);
}