function $(id){ return typeof id === "string" ? document.getElementById(id) : id; } function $$(oParent, elem){ return (oParent || document).getElementsByTagName(elem); } function $$$(oParent, sClass){ var aElem = $$(oParent, '*'); var aClass = []; var i = 0; for(i=0;i 0 ? Math.ceil(this.iSpeed) : Math.floor(this.iSpeed); if(json[this.attr] != this.iCur)this.bStop = false; if(this.attr == 'opacity'){ obj.style.filter = 'alpha(opacity:' + (this.iCur + this.iSpeed) +')'; obj.style.opacity = (this.iCur + this.iSpeed ) / 100; }else{ obj.style[this.attr] = this.iCur + this.iSpeed + 'px'; } } if(this.bStop){ clearInterval(obj.timer); if(onEnd)onEnd(); } } }; window.onload = function(){ new Slide('box', 'list', 'but', 'hove', {action : 'left'}); new Slide('box1', 'list', 'but', 'hove', {method : 'mouseover', action : 'left', autoplay : 'play'}); new Slide('box2', 'list', 'but', 'hove', {action : 'left', autoplay : 'play'}); new Slide('box3', 'list', 'but', 'hove', {action : 'left', autoplay : 'play'}); };