if(typeof picfocusmanager == "undefined") { picfocusmanager =[]; } function picfocus(imagecontainerid,textcontainerid,buttoncontainerid,intervartime){ this.$ = function (id){return document.getelementbyid(id)} this.index = picfocusmanager.length; picfocusmanager[picfocusmanager.length] = this; this.imagecontainer = this.$(imagecontainerid); this.textcontainer = this.$(textcontainerid); this.buttoncontainer = this.$(buttoncontainerid); this.firstshow = 0; //榛樿鏄剧ず椤? this.interval = (isnan(intervartime)?0:intervartime) || 5000; //鍒囨崲鏃堕棿 this.canautoplay = true; //鏄惁鍙互鑷姩鍒囨崲 this.currentposition = this.firstshow; this.timer; this.images = []; this.texts = []; this.buttons = []; this.callback=function(){}; this.bindevent = function(){ var _self = this; for(var i=0;i= this.images.length)this.currentposition =0 ; } this.timer = settimeout('picfocusmanager[' + this.index + '].play()' , this.interval ) } this.stop = function(){ cleartimeout( this.timer ); } this.focus = function(button){ for(var i=0;i