


function scrollUp(){};
scrollUp.prototype ={
	t:100,
	h:null,
	bH:null,
	pro:null,
	init : function(o){
		var d = $(o);
		this.h = d.offsetHeight - 1;
		//alert(this.h);
		var d = document.createElement("div");
		var d01 = document.createElement("div");
		var d02 = document.createElement("div");
		var dcls = document.createElement("div");
		dcls.className = "cls";
		d01.innerHTML = $(o).innerHTML;
		d02.innerHTML = $(o).innerHTML;
		$(o).style.height = $(o).offsetHeight + "px";		
		$(o).style.overflow = "hidden";
		$(o).innerHTML = "";
		d.appendChild(d01);
		d.appendChild(dcls);
		d.appendChild(d02);
		$(o).appendChild(d);


		//this.bH = d01.offsetHeight*2 - 1 ;
		//alert(d01.offsetHeight);
		//this.bH = parseInt(d.offsetHeight/2 - 1);
		this.bH = 95;
		//alert(this.bH);
	},
	scrolls : function(o){
		var _this = this;
		//alert(1);
		this.t = ($(o).scrollTop % (this.h) == 0 && $(o).scrollTop % this.bH !=0) ? 2000 : 100;
		
		//alert($(o).scrollTop + "," + this.bH);

		if($(o).scrollTop < this.bH){
			$(o).scrollTop = $(o).scrollTop + 1;
			//alert($(o).scrollTop + "," this.bH);
		}
		else
		{
			//alert(2);
			$(o).scrollTop = 0;
		}
		//alert($(o).scrollTop);
		this.pro = setTimeout(function(){_this.scrolls(o)},_this.t);
	}
	
	,

	startScroll : function(o){
		this.init(o);
		this.scrolls(o);
		var _this = this;
		$(o).onmouseover = function(){clearTimeout(_this.pro);};
		$(o).onmouseout = function(){_this.pro = setTimeout(function(){_this.scrolls(o)},_this.t);}
	}
	
}