var atad = 1;
function initnews() {
	 var timer=8000;
	 var step = $('newsticker');
	  step.setStyle({
	  overflow: 'hidden'
		});
	
	
	setInterval("newsfader()",timer)				
}
			
function newsfader() {
	var listofp = $('newsticker').getElementsByTagName('p');
	if (atad == listofp.length){
		new Effect.Fade(listofp[listofp.length-1],{duration:'1.3', queue: 'front'});
		
		atad=0;
		new Effect.Appear(listofp[atad],{duration:'1.3', queue: 'end'});
		atad++;
	}else{
		new Effect.Fade(listofp[atad-1],{duration:'1.3', queue: 'front'});
		
		new Effect.Appear(listofp[atad],{duration:'1.3', queue: 'end'});
		atad++;
		}
}		
	
window.onload = function(){
	initnews();
	
}
