function pig(id,len,ele,g,t){
	this.j = g||2;
	this.tt = t||100;
    this.__f;
	this.a_str=$(id).innerHTML;
	this.a_li = $(id).getElementsByTagName(ele);
	this.going =true;
	if(this.a_li.length>0){this.c_li=this.a_li.length;}
	if(this.c_li>len){$(id).innerHTML+=this.a_str;this.sc=true;}
	
	this.topvalue=0;
	this.vtime;

	this.run  = scollannounce;
	this.start = d;
	this.fun = getfun;
	this.aa=a;
	this.bb=b;
	this.setF=function (f){
		this.__f=f;
	};
	function a() {

		this.going =false;
		}
	
	function b() {
		this.going =true;}

    function	scollannounce(){
		if(this.c_li>len&&this.going){
			this.topvalue+=this.j;
			if(this.topvalue>=$(id).scrollHeight){this.topvalue=0;
			  if(this.__f){
                  this.going=false;
				  this.__f.call();
			  }
			
			}
			
			$(id).scrollTop=this.topvalue;
			
		}
	}
	
	function d(){
	    vtime=setInterval(this.fun(this,"run"),this.tt);
	}
	function getfun(t,f,p){
     return function(){
	     t[f](p); 
	  };
	}
	$(id).onmouseover=this.fun(this,"aa");	
	$(id).onmouseout=this.fun(this,"bb");	
	this.start();
}

