function newsScroll(){
	galleryScroll(
		"div.leftcolumn",
		false,
		false,
		"div.centercolumn ul li a"
	);
}
function galleryScroll(_gallery, _leftArrow, _rightArrow, _tabs){
	//var _step = 405;
	var _duration = 600;

	var _numList = 0;
	var _lenghtSlide = $(_gallery+" li.slide").length;
	
	var _gWidth = $(_gallery).get(0).offsetWidth;
	var _liWidth = $(_gallery+" li.slide").get(0).offsetWidth;
	var _liSum = $(_gallery+" li.slide").length * _liWidth;
	var _margin = 0;
	var f = 0;
	
	var _slideHieght = $(_gallery + " > ul > li:eq(0)").get(0).offsetHeight;
	var minHeight = $('div.centercolumn').height();
	if (minHeight > _slideHieght) _slideHieght = minHeight;
	$(_gallery + " > ul").parent().animate({height: _slideHieght + "px"}, {queue:false, duration: _duration/2});
	
	var _step = _gWidth;
	
	$(_tabs).click(function(){
		$(_tabs).parent().removeClass("active");
		var _gn = $(_tabs).index($(this));
		_margin = _step*_gn;
		_slideHieght = $(_gallery + " > ul > li:eq("+ _gn +")").get(0).offsetHeight;
		if (minHeight > _slideHieght) _slideHieght = minHeight;		
		$(_gallery + " > ul").parent().animate({height: _slideHieght + "px"}, {queue:false, duration: _duration/2});
		$(_gallery + " > ul").animate({marginLeft: -_margin + "px"}, {queue:false, duration: _duration});
		$(this).parent().addClass("active");
		return false;
	});
}

if (window.addEventListener)
	window.addEventListener("load", newsScroll, false);
else if (window.attachEvent)
	window.attachEvent("onload", newsScroll);
