function ScrollSection() {
	var section = c = 0;
	//alert($(this).parents('body').html());
	var zone = $(this).parents('.sectionScroll');
	//alert($(this).html());
	var li = $(this)[0];
	zone.find('.scrollMenu li').each(
	function (){ 
		if ($(this)[0] === li) 
		{
			$(this).addClass('sel');
			section = c;
		}
		else $(this).removeClass('sel');
		c++;
	});
	theScroll=zone.find('.scrollScroller');
	theSection = zone.find('.section:nth-child('+(section+1)+')');
	offset = zone.find('.section:nth-child(1)');
	position=findElementPos(theSection);
	if(offset.length>0)
	{
		offsetPos= findElementPos(offset);
		position[0]=position[0]-offsetPos[0];
		position[1]=position[1]-offsetPos[1];
	}
	scrollStart(theScroll,position[0],position[1]);
	scrollTimeStart(12000);
	return false;
}
function scrollNextAuto()
{
	$('.sectionScroll').each(function() {
		var next = $(this).find('.scrollMenu li.sel').next('li');
		if (next.length>0) next.click();
		else $(this).find('.scrollMenu li:first').click();
		scrollTimeStart(6000);
	});
	return false;
}

function scrollNext()
{
	var zone = $(this).parents('.sectionScroll');
	var next = zone.find('.scrollMenu li.sel').next('li');
	if (next.length>0) next.click();
	else zone.find('.scrollMenu li:first').click();
	scrollTimeStart(12000);
	return false;
}
function scrollPrev()
{
	var zone = $(this).parents('.sectionScroll');
	var next = zone.find('.scrollMenu li.sel').prev('li').click();
	if (next.length>0) next.click();
	else zone.find('.scrollMenu li:last').click();
	scrollTimeStart(12000);
	return false;
}
function scrollStart(elem, x, y) {
	elem.animate({scrollLeft:x, scrollTop:y}, 500);
}

function findElementPos(elemFind)
{
var elemX=0;
var elemY=0;
do{
	elemX+=elemFind.offset().left;
	elemY+=elemFind.offset().top;
	if(elemFind[0] === $('body')[0])
	{
		return Array(elemX,elemY);
	}
}
while(elemFind = elemFind.offsetParent())
return Array(elemX,elemY);
}
function scrollTimeStart(delay)
{
	clearTimeout(scrollTimer);
	scrollTimer = setTimeout(function() {
		scrollNextAuto();
	}, delay);
}
