var nv2 = new Object();
nv2.Ranking2 = function(){
	this.nvscroll2 = new nv2.Scroll2();
	this.nvscroll2.name2 = "";
	this.nvscroll2.name2 = "quicknewstop2.nvscroll2";
	this.nvscroll2.height2 = 20;
	this.nvscroll2.width2 = 165;
	this.nvscroll2.scrollspeed2 = 1;
	this.nvscroll2.pausedelay2 = 2000;
	this.nvscroll2.pausemouseover2 = true;
}
nv2.Ranking2.prototype = {
	init2 : function(){
		this.nvscroll2.setDivId2("roll_list2");
	},

	add2 : function(text2){
		this.nvscroll2.add2(text2);
	},
	start2 : function(){
		this.init2();
		this.nvscroll2.start2();
	}
}
nv2.Scroll2 = function() {
	this.version2 = "0.2";
	this.name2 = "NvScroll";
	this.divId2 = "";
	this.item2 = new Array();
	this.itemcount2 = 0;
	this.currentspeed2 = 0;
	this.scrollspeed2 = 50;
	this.pausedelay2 = 1000;
	this.pausemouseover2 = false;
	this.stop2 = false;
	this.height2 = 20;
	this.width2 = 165;
	this.stopHeight2=0;
	this.i2=0;
	this.reloadData2 = 0;
}
nv2.Scroll2.prototype = {
	 add2 : function (text2) {
		   this.item2[this.itemcount2] = text2;
		   this.itemcount2 = this.itemcount2 + 1;
	 },
	 setDivId2 : function(name2) {
			this.divId2 = name2
	 },
	 start2 : function () {
		   if ( this.itemcount2 == 1 ) {
			this.add2(this.item2[0]);
		   }
		   this.display2();
		   this.currentspeed2 = this.scrollspeed2;
		   this.stop2 = true;
		   setTimeout(this.name2+'.scroll2()',this.currentspeed2);
		   window.setTimeout(this.name2+".stop2 = false", this.pausedelay2);
	 },
	 display2 : function () {
		   var htmlCode2;
		   
		   htmlCode2 = '<div id="'+this.name2+'" style="height:'+this.height2+'px; width:'+this.width2+'px; position:relative; overflow:hidden; " OnMouseOver="'+this.name2+'.onmouseover2(); " OnMouseOut="'+this.name2+'.onmouseout2(); ">';
		  
		   for(var i2 = 0; i2 < this.itemcount2; i2++) {
				htmlCode2 += '<div id="'+this.name2+'item2'+i2+'"style="left:0px; width:'+this.width2+'px; position:absolute; top:'+(this.height2*i2)+'px; ">';
				htmlCode2 += this.item2[i2];
				htmlCode2 += '</div>';
		   }
		   htmlCode2 += '</div>';
		   document.getElementById(this.divId2).innerHTML=htmlCode2;
	 },
	 scroll2 : function () {
		   this.currentspeed2 = this.scrollspeed2;
		   if ( !this.stop2 ) 
		   {
						for (var i2 = 0; i2 < this.itemcount2; i2++) 
						{
									
									 obj2 = document.getElementById(this.name2+'item2'+i2).style;
									
									 obj2.top = (parseInt(obj2.top) - 1)+"px" ;
									
									 if ( parseInt(obj2.top) <= this.height2 * (-1) ) obj2.top = this.height2 * (this.itemcount2-1);
									 if ( parseInt(obj2.top) == 0 ) 
									 {
												  this.currentspeed2 = this.pausedelay2;
												  this.i2 = i2;
									 }
						}
		   }
		   
		   window.setTimeout(this.name2+".scroll2()",this.currentspeed2);
	 },
	 onmouseover2 : function () {this.stop2=true;},
	 onmouseout2 : function () {this.stop2=false;}
}
