var timeGap = 8; //seconds - change this value to increase/decrease pause between items
currid = null;

function switchTickerNews(){
	$items = $('ticker_items').getElementsByTagName("li");
	if(currid == null){
		currid = 0;
		showItemNews($items[currid].id,0);
	}else{
		hideItemNews($items[currid].id);
		if(currid == ($items.length-1)){
			currid = 0;
		}else{
			currid = currid + 1;
		}
		showItemNews($items[currid].id,1);
	}
	timer = setTimeout(switchTicker,(timeGap*1000));
}

function showItemNews(id,d){
	Effect.Appear($(id),{duration: 1, from: 0, to: 1,delay:d});
}

function hideItemNews(id){
	Effect.Fade($(id),{duration: 1, from: 1, to: 0});
}
//if (window.attachEvent) window.attachEvent("onload", switchTicker);
