var position=0;
var max=5;
var timer=6000;

function news(nummax) {
	max = nummax;
	$('div.news_0').animate({
		'bottom' : '9px'
	}).show();
	setTimeout(newsticker,timer);	
}
function newsticker() {
	if ((position+1) < max) {
		$('div.news_'+position).animate({
			'bottom' : '50px',
			'opacity' : '0'
			});
		position++;
		$('div.news_'+position).animate({
			'bottom' : '9px',
			'opacity' : '1'
			});
		setTimeout(newsticker,timer);
	} else {
		position = max-1;
		$('div.news_'+position).animate({
			'bottom' : '50px',
			'opacity' : '0'
			});
		$('div.newsitems').animate({
			'bottom':'-50px'
			},0);
		position = 0;
		$('div.news_'+position).animate({
			'bottom' : '9px',
			'opacity' : '1'
			});
		setTimeout(newsticker,timer);
	}
}


