// news ticker function

function Ticker(elem) {
	this.el = document.getElementById(elem);
	this.line = 0;
	this.currChar = 0;
	this.currCurs = 0;
	this.timer = "";
}

Ticker.prototype.feed = function() {
	var _this = this;
	var isHTML = false;
	var f = function() { _this.feed(); }
	var line = (newslist[this.line][0]).split(' ');
	var wrd = "";
	for(i=0;i<=this.currChar;i++) {
		wrd += line[i] + " ";}
	var link = newslist[this.line][1];
	this.el.innerHTML = '<a href="'+link+'">'+wrd+'_<\/a>';
	this.currChar++;
	if(this.currChar>=line.length) {
		this.el.innerHTML = '<a href="'+link+'">'+wrd+'<\/a>';
		this.currChar=0;
		this.line++;
		if(this.line>=newslist.length) {
			this.line = 0; }
		this.timer = setTimeout(f,2500);
	} else {
		this.timer = setTimeout(f,100);
	}
	
}