var ad = {
	o:null,      // 存放滚动的UL
	cloneImg:null,  //克隆UL的第一个图片
	adY:0, //滚动值
	distan:0, //每个图片的高度
          ///
	init:function(obj){
		if(!obj.style.top){
		obj.style.top = '0px';
		}
		this.cloneImg = obj.firstChild.cloneNode(true); //克隆第一个节点
		if(this.cloneImg.nodeType == 3) this.cloneImg = obj.firstChild.nextSibling.cloneNode(true);	//除IE外第一个节点为文本节点，让克隆节点还是指向第一个元素
		obj.appendChild(this.cloneImg); //让克隆的节点放入最后
		this.adY = parseInt(obj.style.top);
		this.o = obj;
		this.distan = this.cloneImg.offsetHeight;
		this.moveCtrl();
	},
	moveCtrl:function(){
		if(Math.abs(this.adY) == this.o.offsetHeight - this.distan) this.adY = 0;//到达底部滚动跳回最上面
		if(Math.abs(this.adY)%this.distan==0){
			setTimeout('ad.moveCtrl()',200);//图片停留延迟
		} else {
			setTimeout('ad.moveCtrl()',10);//运动循环
		}
		--this.adY;
		ad.o.style.top = this.adY + 'px';
	}
}
window.onload = function(){
	//var obj = document.getElementById('adul');
	//ad.init(obj);	
}

