Ext.applyIf = function(o, c){ if(!o || !c)return o; for(var p in c){ if(typeof o[p] == "undefined")o[p] = c[p]; } return o; }; document.getElementsByClassName = function(cls, p) { if(p && p.getElementsByClassName) return p.getElementsByClassName(cls); var arr = ($(p) || document.body).getElementsByTagName('*'); var rst = []; var regExp = new RegExp("(^|\\s)" + cls + "(\\s|$)"); for(var i=0,n=arr.length;i= 0; i--){ if(nodes[i].nodeType == 1)return nodes[i]; } return null; } });