//核心代码 function admov(element){ if(arguments.length>1){ for(var i=0,elements=[],length=arguments.length;i'+content+'×'); this.id=admov(id); this.top=top; var layout_width = 980; var client_width = null; if(!!left){ if(document.body.clientwidth < layout_width + 2*width +16){ this.id.style.left="8px"; }else{ this.id.style.left=(document.documentelement.clientwidth/2)-(layout_width/2) - width - 8 +"px"; } }else{ if(document.documentelement.clientwidth < layout_width + 2*width +16){ this.id.style.left=document.documentelement.clientwidth- 8 - width +"px"; }else{ this.id.style.left=(document.documentelement.clientwidth/2)+(layout_width/2) + 8 +"px"; }; } this.intervalid=setinterval(this.scroll.bind(this),20); this.id.style.top=top+"px"; }, scroll:function(){ this.stmnstartpoint = parseint(this.id.style.top, 10); this.stmnendpoint =document.documentelement.scrolltop+ this.top; if(navigator.useragent.indexof("chrome")>0){ this.stmnendpoint=document.body.scrolltop+this.top; } if ( this.stmnstartpoint != this.stmnendpoint ) { this.stmnscrollamount = math.ceil( math.abs( this.stmnendpoint - this.stmnstartpoint ) / 15 ); this.id.style.top = parseint(this.id.style.top, 10) + ( ( this.stmnendpoint"+this.imgoptions.alt+"关闭"; document.write(vhtmlstring); this.id=admov(this.id); this.intervalid=setinterval(this.scroll.bind(this),this.delay); this.id.onmouseover=this.stop.bind(this); this.id.onmouseout=this.start.bind(this); }, scroll:function(){ var l=t=0; var b=document.documentelement.clientheight-this.id.offsetheight; var r=document.documentelement.clientwidth-this.id.offsetwidth; this.id.style.left=this.adposition.left+document.documentelement.scrollleft+"px"; this.id.style.top=this.adposition.top+document.documentelement.scrolltop+"px"; this.adposition.left =this.adposition.left + this.step*(this.herizonflag?1:-1); if (this.adposition.left < l) { this.herizonflag = true; this.adposition.left = l;} if (this.adposition.left > r){ this.herizonflag = false; this.adposition.left = r;} this.adposition.top =this.adposition.top + this.step*(this.verticleflag?1:-1); if(this.adposition.top <= t){ this.verticleflag=true; this.adposition.top=t;} if(this.adposition.top >= b){ this.verticleflag=false; this.adposition.top=b; } }, stop:function(){ clearinterval(this.intervalid); }, start:function(){ this.intervalid=setinterval(this.scroll.bind(this),this.delay); } }