

indicoAddLoad(function(){
	oNews.init();
});

oNews = function(){
	return {
		init : function(){
			var o = null;
			var a = document.getElementsByTagName("span");
			for(var i=0; i<a.length; i++){
				if(a[i].className == "newsarticlelist"){
					o = a[i];
					break;
				};
			};
			if(o){
				o.parentNode.style.position = "relative";
				o.style.display = "block";
				o.style.position = "relative";
				this.nHeight = o.offsetHeight;
				this.sHTML = o.innerHTML;
				this.oCont1 = document.createElement("div");
				this.oCont2 = document.createElement("div");
				this.oCont1.innerHTML = this.oCont2.innerHTML = this.sHTML;
				this.oCont1.style.position = this.oCont2.style.position = "absolute";
				this.oCont1.style.top = 0;
				this.oCont2.style.top = this.nHeight + 10 + "px";
				this.oCont1.onmouseover = 
				this.oCont2.onmouseover = function(){
					oNews.pause();
				};
				this.oCont1.onmouseout = 
				this.oCont2.onmouseout = function(){
					oNews.start();
				};
				o.innerHTML = "";
				o.appendChild(this.oCont1);
				o.appendChild(this.oCont2);
				o.style.overflow = "hidden";
				o.style.height = ((this.nHeight<200) ? this.nHeight : 200) + "px";
				o.style.overflow = "hidden";
				this.start();
			};
		},
		
		start : function(){
			this.oTimer = window.setInterval("oNews.scroll()", 60);
		},
		
		pause : function(){
			clearTimeout(this.oTimer);
		},
		
		scroll : function(){
			var nTop1 = parseInt(this.oCont1.style.top);
			var nTop2 = parseInt(this.oCont2.style.top);
			if(nTop1 + this.nHeight < -30){
				nTop1 = nTop2 + 10 + this.nHeight;
			}
			if(nTop2 + this.nHeight < -30){
				nTop2 = nTop1 + 10 + this.nHeight;
			}
			this.oCont1.style.top = nTop1 - 1 + "px";
			this.oCont2.style.top = nTop2 - 1 + "px";
		}
	}
}();
