﻿//<![CDATA[
		   //翻滚新闻JS
var array = [{id:"ulNewstopgz",height:38,stoptime:2000,movetime:10}];
var $$ = function(){return function(){return this.ini.apply(this,arguments)}}
function getCurrnetStyle(o){return o.currentStyle || document.defaultView.getComputedStyle(o,null)}
window.kfc = new $$();
   kfc.prototype.ini = function(){	
	        var array = Array.prototype.slice.call(arguments,0);
			this.stoptime  = 2000;
			this.movetime  = 10;
			this.time      = 2001;
			for (i in array[0]){this[i] = array[0][i]};
			this.div = null;
			this.div = document.getElementById(this.id);
			if(this.div)
			{
			    this.moveheight  = this.div.scrollHeight;
			    this.ormove    = false;
			    this.div.innerHTML += this.div.innerHTML;
			    var me = this;
			    this.mover = function(){
				     var me = this;
				         if(me.ormove != false){
					     me.div.scrollTop = parseInt(me.div.scrollTop)+1;
                         me.div.scrollTop  == me.moveheight && (me.div.scrollTop = 0);
					     me.time = me.div.scrollTop%me.height == 0?me.stoptime:me.movetime;
					     }
				        setTimeout(function(){me.mover.apply(me)},me.time);
				    }
			    setTimeout(function(){me.ormove = true;},2000);
			    this.mover();
			}
	   }
window.onload = function(){
for (var i=0;i<array.length;i++){
	~function(i){new kfc(array[i]);}(i)
	}
}
//]]>
