if(Flash.init(9)){ try{ document.documentElement.className+=' flash_upload '; }catch(e){} } $u.wait=$class( { cl:'el-loading', el:null, fn:null, scope:null, interactive:false, constructor:function(el, fn, scope) { this.el=el, this.fn=fn, this.scope=scope; if(el.nodeName=='FORM') $e.add(el, 'submit', this.start, this); }, destroy:function() { $e.del(this.el, 'submit', this.start, this); this.el=null; }, start:function(el) { var res=true; if(this.interactive) return false; if(this.fn){ res=this.fn.call(this.scope, el); if(res==NaN) return false; } this.interactive=true; $el.addClassName(this.el, this.cl); return res; }, stop:function() { this.interactive=false; $el.removeClassName(this.el, this.cl); } }); $u.wait.init=function(wrap) { var forms=wrap && (wrap.nodeName=='FORM' && [wrap] || $q.select(wrap, 'form')) || document.forms; for(var i=0, n=forms.length; i<n; i++){ new $u.wait(forms[i]) } }; $e.onload(function(){ $u.wait.init(document.body); });