function HNewsScroller(scrollCont,newsCont,speed,content){
	this.sContainer = new lib_obj(scrollCont);
	this.nContainer = new lib_obj(newsCont,scrollCont);
	this.news = content;
	this.speed = speed;
	this.scrollAmount = 0;
	this.init();
}

HNewsScroller.prototype.formatNews = function(){
	var output = "";
	var newsBreak = "&nbsp;&nbsp;&nbsp;--&nbsp;&nbsp;&nbsp;";
	for (i=0;i<this.news.length;i++){
		var temp = this.news[i].split("|");
		output += '<a href="' + temp[1] + '">';
		output += temp[0] + '</a>';
		if (i!=(this.news.length-1)) output += newsBreak;
	}
	return output;
}

HNewsScroller.prototype.init = function(){
	var content = (bw.ns4)? '<span class="newsTicker">':"";
	content += (typeof this.news=='object')? this.formatNews():this.news;
	if (bw.ns4) content += "</span>";
	this.sContainer.showIt();
	this.nContainer.writeIt(("<nobr>"+content+"</nobr>"));
	this.nContainer.moveBy((this.sContainer.w+5),0);
	this.nContainer.showIt();
	this.scrollAmount = (bw.ns4)? this.nContainer.evnt.document.width : this.nContainer.evnt.offsetWidth;
}

function scrollNews(){
	if(parseInt(scroller.nContainer.css.left)>-(scroller.scrollAmount+5)){
		scroller.nContainer.moveBy(-(scroller.speed),0);
	}
	else scroller.nContainer.moveIt((scroller.sContainer.w+5),0);
}