//*�����л� (function(){ if(!function.prototype.bind){ function.prototype.bind = function(obj){ var owner = this,args = array.prototype.slice.call(arguments),callobj = array.prototype.shift.call(args); return function(e){e=e||top.window.event||window.event;owner.apply(callobj,args.concat([e]));}; }; } })(); var player = function(id){ this.ctn = document.getelementbyid(id); this.adlis = null; this.btns = null; this.animstep = 0.2;//�����ٶ�0.1��0.9 this.switchspeed = 3;//�զ����ż��(s) this.defopacity = 1; this.tmpopacity = 1; this.crtindex = 0; this.crtli = null; this.adlength = 0; this.timeranim = null; this.timerswitch = null; this.init(); }; player.prototype = { fnanim:function(toindex){ if(this.timeranim){window.cleartimeout(this.timeranim);} if(this.tmpopacity <= 0){ this.crtli.style.opacity = this.tmpopacity = this.defopacity; this.crtli.style.filter = 'alpha(opacity=' + this.defopacity*100 + ')'; this.crtli.style.zindex = 0; this.crtindex = toindex; return; } this.crtli.style.opacity = this.tmpopacity = this.tmpopacity - this.animstep; this.crtli.style.filter = 'alpha(opacity=' + this.tmpopacity*100 + ')'; this.timeranim = window.settimeout(this.fnanim.bind(this,toindex),50); }, fnnextindex:function(){ return (this.crtindex >= this.adlength-1)?0:this.crtindex+1; }, fnswitch:function(toindex){ if(this.crtindex==toindex){return;} this.crtli = this.adlis[this.crtindex]; for(var i=0;i