function ticker(){
	this.addEntry = fn_addEntry;
	this.init 		= fn_init;
	this.changeNews = fn_changeNews;
	
	this.news = new Array();
	this.actual = 0;
	
	function fn_addEntry(teaser, popup, date){
	  idx = this.news.length;
		this.news[idx] = new Array();
		this.news[idx]['teaser'] = teaser;
		this.news[idx]['popup'] = popup;
		this.news[idx]['date'] = date;
	}
	
	function fn_init(){	
		this.changeNews();
	}
	
	function fn_changeNews(){
		te = document.getElementById("tickerentry");
		te.innerHTML = "<table class='tickertable' border='0'><tr><td class='tickerdate'>"+this.news[this.actual % this.news.length]['date']+"</td></tr><tr><td class='tickertitle'>"+this.news[this.actual % this.news.length]['teaser']+"</td></tr><tr><td class='tickermore'><a class=\"tickerentry\" href=\"\" onclick=\"a=window.open('popup.html?url="+ this.news[this.actual % this.news.length]['popup'] +"','News','width=600, height=400, scrollbars=yes');a.focus();return false;\"><span style='text-decoration:underline;'>mehr</span>&nbsp;<img style='border:none;' src='system/pfeile.gif'/></a></td></tr></table>"; 
		this.actual++;
		if(this.news.length > 1)
			setTimeout('ticker.changeNews()',3000);
	}
}
