function RollSlider2(obj)
{
	if(!obj) return ;
	this.parent = obj.parent;
	this.back_button = new this.back_button_click( this,obj.back_button );
	this.next_button = new this.next_button_click( this,obj.next_button );
	this.children = obj.children;
	this.column_size = obj.column_size;
	this.display_range = obj.display_range;
	this.timer = false;
	this._init();
	
	
}

RollSlider2.prototype._init = function()
{
	this.max_size = this.column_size * this.children.length
	this.parent.style.width = this.max_size + "px";
	this.parent.style.marginLeft = "0px";
}

RollSlider2.prototype.back_button_click = function(self,obj)
{
	//var self = this;

	obj.style.cursor = "pointer";
	obj.onclick = function()
	{
		if(self.timer) return;
		
		var nx = self.parent.style.marginLeft.match(/[0-9\-]*/) * 1;
		var x = nx + self.column_size ;
		
		if(nx == 0 ) return;
		
		self.timer = setInterval(function()
		{
			var i = ( x - nx ) / 3;		
			nx += i;
			self.parent.style.marginLeft = nx + "px";
			if(Math.abs(i) < 1.2)
			{
				self.parent.style.marginLeft = x + "px";
				clearInterval(self.timer);
				self.timer = false;
			}
			
		},100);
	}
	
}

RollSlider2.prototype.next_button_click = function(self,obj)
{
	//var self = this;

	obj.style.cursor = "pointer";
	obj.onclick = function()
	{
		if(self.timer) return;
		
		var nx = self.parent.style.marginLeft.match(/[0-9\-]*/) * 1;
		var x = nx - self.column_size ;
		
		if(self.max_size - ( self.column_size * self.display_range ) <= Math.abs(nx)) return;

		self.timer = setInterval(function()
		{
			var i = ( nx -x  ) / 3;
			nx -= i;
			self.parent.style.marginLeft = nx + "px";
			if(Math.abs(i) < 1.2)
			{
				self.parent.style.marginLeft = x + "px";
				clearInterval(self.timer);
				self.timer = false;
			}
			
		},100);
	}
	
	this.next = function()
	{
		obj.onclick();
	}
}
