Changeset 1333

Show
Ignore:
Timestamp:
03/16/08 23:59:02 (4 months ago)
Author:
cederberg@gmail.com
Message:

Added fix for text nodes in isChildNode (see #283).
Also refactored the function to avoid checking the node tagName at all (changes the logic introduced in [1080] and updated in [1302]).

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • mochikit/trunk/MochiKit/DOM.js

    r1325 r1333  
    6464    "OL", 
    6565    "LI", 
    66        "DL", 
    67        "DT", 
    68        "DD", 
     66    "DL", 
     67    "DT", 
     68    "DD", 
    6969    "TD", 
    7070    "TR", 
     
    356356            maybeparent = self.getElement(maybeparent); 
    357357        } 
    358         if (typeof(node) == 'undefined' || node === null || node === self._document) { 
     358        if (typeof(node) == 'undefined' || node === null) { 
    359359            return false; 
    360360        } 
    361         do
     361        while (node !== self._document)
    362362            if (node === maybeparent) { 
    363363                return true; 
    364364            } 
    365             var tagName = node.tagName; 
    366365            node = node.parentNode; 
    367             if (!tagName) { 
    368                 break; 
    369             } 
    370             tagName = tagName.toUpperCase(); 
    371         } while (tagName != "BODY" && tagName != "HTML"); 
     366        } 
    372367        return false; 
    373368    }, 
  • mochikit/trunk/packed/MochiKit/MochiKit.js

    r1323 r1333  
    28112811_30d=self.getElement(_30d); 
    28122812} 
    2813 if(typeof (node)=="undefined"||node===null||node===self._document){ 
     2813if(typeof (node)=="undefined"||node===null){ 
    28142814return false; 
    28152815} 
    2816 do
     2816while(node!==self._document)
    28172817if(node===_30d){ 
    28182818return true; 
    28192819} 
    2820 var _30f=node.tagName; 
    28212820node=node.parentNode; 
    2822 if(!_30f){ 
    2823 break; 
    2824 
    2825 _30f=_30f.toUpperCase(); 
    2826 }while(_30f!="BODY"&&_30f!="HTML"); 
     2821
    28272822return false; 
    2828 },setNodeAttribute:function(node,attr,_312){ 
     2823},setNodeAttribute:function(node,attr,_311){ 
    28292824var o={}; 
    2830 o[attr]=_312
     2825o[attr]=_311
    28312826try{ 
    28322827return MochiKit.DOM.updateNodeAttributes(node,o); 
     
    28372832},getNodeAttribute:function(node,attr){ 
    28382833var self=MochiKit.DOM; 
    2839 var _317=self.attributeArray.renames[attr]; 
     2834var _316=self.attributeArray.renames[attr]; 
    28402835node=self.getElement(node); 
    28412836try{ 
    2842 if(_317){ 
    2843 return node[_317]; 
     2837if(_316){ 
     2838return node[_316]; 
    28442839} 
    28452840return node.getAttribute(attr); 
     
    28502845},removeNodeAttribute:function(node,attr){ 
    28512846var self=MochiKit.DOM; 
    2852 var _31b=self.attributeArray.renames[attr]; 
     2847var _31a=self.attributeArray.renames[attr]; 
    28532848node=self.getElement(node); 
    28542849try{ 
    2855 if(_31b){ 
    2856 return node[_31b]; 
     2850if(_31a){ 
     2851return node[_31a]; 
    28572852} 
    28582853return node.removeAttribute(attr); 
     
    28612856} 
    28622857return null; 
    2863 },updateNodeAttributes:function(node,_31d){ 
     2858},updateNodeAttributes:function(node,_31c){ 
    28642859var elem=node; 
    28652860var self=MochiKit.DOM; 
     
    28672862elem=self.getElement(node); 
    28682863} 
    2869 if(_31d){ 
    2870 var _320=MochiKit.Base.updatetree; 
     2864if(_31c){ 
     2865var _31f=MochiKit.Base.updatetree; 
    28712866if(self.attributeArray.compliant){ 
    2872 for(var k in _31d){ 
    2873 var v=_31d[k]; 
     2867for(var k in _31c){ 
     2868var v=_31c[k]; 
    28742869if(typeof (v)=="object"&&typeof (elem[k])=="object"){ 
    28752870if(k=="style"&&MochiKit.Style){ 
    28762871MochiKit.Style.setStyle(elem,v); 
    28772872}else{ 
    2878 _320(elem[k],v); 
     2873_31f(elem[k],v); 
    28792874} 
    28802875}else{ 
     
    28902885} 
    28912886}else{ 
    2892 var _323=self.attributeArray.renames; 
    2893 for(var k in _31d){ 
    2894 v=_31d[k]; 
    2895 var _324=_323[k]; 
     2887var _322=self.attributeArray.renames; 
     2888for(var k in _31c){ 
     2889v=_31c[k]; 
     2890var _323=_322[k]; 
    28962891if(k=="style"&&typeof (v)=="string"){ 
    28972892elem.style.cssText=v; 
    28982893}else{ 
    2899 if(typeof (_324)=="string"){ 
    2900 elem[_324]=v; 
     2894if(typeof (_323)=="string"){ 
     2895elem[_323]=v; 
    29012896}else{ 
    29022897if(typeof (elem[k])=="object"&&typeof (v)=="object"){ 
     
    29042899MochiKit.Style.setStyle(elem,v); 
    29052900}else{ 
    2906 _320(elem[k],v); 
     2901_31f(elem[k],v); 
    29072902} 
    29082903}else{ 
     
    29282923elem=self.getElement(node); 
    29292924} 
    2930 var _328=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; 
    2931 var _329=MochiKit.Base.concat; 
    2932 while(_328.length){ 
    2933 var n=_328.shift(); 
     2925var _327=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; 
     2926var _328=MochiKit.Base.concat; 
     2927while(_327.length){ 
     2928var n=_327.shift(); 
    29342929if(typeof (n)=="undefined"||n===null){ 
    29352930}else{ 
     
    29372932elem.appendChild(n); 
    29382933}else{ 
    2939 _328=_329(n,_328); 
     2934_327=_328(n,_327); 
    29402935} 
    29412936} 
     
    29482943elem=self.getElement(node); 
    29492944} 
    2950 var _32e=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; 
    2951 var _32f=elem.parentNode; 
    2952 var _330=MochiKit.Base.concat; 
    2953 while(_32e.length){ 
    2954 var n=_32e.shift(); 
     2945var _32d=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; 
     2946var _32e=elem.parentNode; 
     2947var _32f=MochiKit.Base.concat; 
     2948while(_32d.length){ 
     2949var n=_32d.shift(); 
    29552950if(typeof (n)=="undefined"||n===null){ 
    29562951}else{ 
    29572952if(typeof (n.nodeType)=="number"){ 
    2958 _32f.insertBefore(n,elem); 
    2959 }else{ 
    2960 _32e=_330(n,_32e); 
    2961 } 
    2962 } 
    2963 } 
    2964 return _32f
     2953_32e.insertBefore(n,elem); 
     2954}else{ 
     2955_32d=_32f(n,_32d); 
     2956} 
     2957} 
     2958} 
     2959return _32e
    29652960},insertSiblingNodesAfter:function(node){ 
    29662961var elem=node; 
     
    29692964elem=self.getElement(node); 
    29702965} 
    2971 var _335=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; 
     2966var _334=[self.coerceToDOM(MochiKit.Base.extend(null,arguments,1),elem)]; 
    29722967if(elem.nextSibling){ 
    2973 return self.insertSiblingNodesBefore(elem.nextSibling,_335); 
    2974 }else{ 
    2975 return self.appendChildNodes(elem.parentNode,_335); 
     2968return self.insertSiblingNodesBefore(elem.nextSibling,_334); 
     2969}else{ 
     2970return self.appendChildNodes(elem.parentNode,_334); 
    29762971} 
    29772972},replaceChildNodes:function(node){ 
     
    29822977arguments[0]=elem; 
    29832978} 
    2984 var _339
    2985 while((_339=elem.firstChild)){ 
    2986 elem.removeChild(_339); 
     2979var _338
     2980while((_338=elem.firstChild)){ 
     2981elem.removeChild(_338); 
    29872982} 
    29882983if(arguments.length<2){ 
     
    29912986return self.appendChildNodes.apply(this,arguments); 
    29922987} 
    2993 },createDOM:function(name,_33b){ 
     2988},createDOM:function(name,_33a){ 
    29942989var elem; 
    29952990var self=MochiKit.DOM; 
    29962991var m=MochiKit.Base; 
    2997 if(typeof (_33b)=="string"||typeof (_33b)=="number"){ 
     2992if(typeof (_33a)=="string"||typeof (_33a)=="number"){ 
    29982993var args=m.extend([name,null],arguments,1); 
    29992994return arguments.callee.apply(this,args); 
    30002995} 
    30012996if(typeof (name)=="string"){ 
    3002 var _340=self._xhtml; 
    3003 if(_33b&&!self.attributeArray.compliant){ 
    3004 var _341=""; 
    3005 if("name" in _33b){ 
    3006 _341+=" name=\""+self.escapeHTML(_33b.name)+"\""; 
    3007 } 
    3008 if(name=="input"&&"type" in _33b){ 
    3009 _341+=" type=\""+self.escapeHTML(_33b.type)+"\""; 
    3010 } 
    3011 if(_341){ 
    3012 name="<"+name+_341+">"; 
    3013 _340=false; 
     2997var _33f=self._xhtml; 
     2998if(_33a&&!self.attributeArray.compliant){ 
     2999var _340=""; 
     3000if("name" in _33a){ 
     3001_340+=" name=\""+self.escapeHTML(_33a.name)+"\""; 
     3002} 
     3003if(name=="input"&&"type" in _33a){ 
     3004_340+=" type=\""+self.escapeHTML(_33a.type)+"\""; 
     3005} 
     3006if(_340){ 
     3007name="<"+name+_340+">"; 
     3008_33f=false; 
    30143009} 
    30153010} 
    30163011var d=self._document; 
    3017 if(_340&&d===document){ 
     3012if(_33f&&d===document){ 
    30183013elem=d.createElementNS("http://www.w3.org/1999/xhtml",name); 
    30193014}else{ 
     
    30233018elem=name; 
    30243019} 
    3025 if(_33b){ 
    3026 self.updateNodeAttributes(elem,_33b); 
     3020if(_33a){ 
     3021self.updateNodeAttributes(elem,_33a); 
    30273022} 
    30283023if(arguments.length<=2){ 
     
    30423037var self=MochiKit.DOM; 
    30433038dest=self.getElement(dest); 
    3044 var _349=dest.parentNode; 
     3039var _348=dest.parentNode; 
    30453040if(src){ 
    30463041src=self.getElement(src); 
    3047 _349.replaceChild(src,dest); 
    3048 }else{ 
    3049 _349.removeChild(dest); 
     3042_348.replaceChild(src,dest); 
     3043}else{ 
     3044_348.removeChild(dest); 
    30503045} 
    30513046return src; 
     
    30573052return MochiKit.Base.map(self.getElement,arguments); 
    30583053} 
    3059 },getElementsByTagAndClassName:function(_34c,_34d,_34e){ 
     3054},getElementsByTagAndClassName:function(_34b,_34c,_34d){ 
    30603055var self=MochiKit.DOM; 
     3056if(typeof (_34b)=="undefined"||_34b===null){ 
     3057_34b="*"; 
     3058} 
     3059if(typeof (_34d)=="undefined"||_34d===null){ 
     3060_34d=self._document; 
     3061} 
     3062_34d=self.getElement(_34d); 
     3063var _34f=(_34d.getElementsByTagName(_34b)||self._document.all); 
    30613064if(typeof (_34c)=="undefined"||_34c===null){ 
    3062 _34c="*"; 
    3063 
    3064 if(typeof (_34e)=="undefined"||_34e===null){ 
    3065 _34e=self._document; 
    3066 
    3067 _34e=self.getElement(_34e); 
    3068 var _350=(_34e.getElementsByTagName(_34c)||self._document.all); 
    3069 if(typeof (_34d)=="undefined"||_34d===null){ 
    3070 return MochiKit.Base.extend(null,_350); 
    3071 
    3072 var _351=[]; 
    3073 for(var i=0;i<_350.length;i++){ 
    3074 var _353=_350[i]; 
    3075 var cls=_353.className; 
     3065return MochiKit.Base.extend(null,_34f); 
     3066
     3067var _350=[]; 
     3068for(var i=0;i<_34f.length;i++){ 
     3069var _352=_34f[i]; 
     3070var cls=_352.className; 
    30763071if(!cls){ 
    30773072continue; 
    30783073} 
    3079 var _355=cls.split(" "); 
    3080 for(var j=0;j<_355.length;j++){ 
    3081 if(_355[j]==_34d){ 
    3082 _351.push(_353); 
     3074var _354=cls.split(" "); 
     3075for(var j=0;j<_354.length;j++){ 
     3076if(_354[j]==_34c){ 
     3077_350.push(_352); 
    30833078break; 
    30843079} 
    30853080} 
    30863081} 
    3087 return _351
     3082return _350
    30883083},_newCallStack:function(path,once){ 
    30893084var rval=function(){ 
    3090 var _35a=arguments.callee.callStack; 
    3091 for(var i=0;i<_35a.length;i++){ 
    3092 if(_35a[i].apply(this,arguments)===false){ 
     3085var _359=arguments.callee.callStack; 
     3086for(var i=0;i<_359.length;i++){ 
     3087if(_359[i].apply(this,arguments)===false){ 
    30933088break; 
    30943089} 
     
    31043099rval.callStack=[]; 
    31053100return rval; 
    3106 },addToCallStack:function(_35c,path,func,once){ 
     3101},addToCallStack:function(_35b,path,func,once){ 
    31073102var self=MochiKit.DOM; 
    3108 var _361=_35c[path]; 
    3109 var _362=_361
    3110 if(!(typeof (_361)=="function"&&typeof (_361.callStack)=="object"&&_361.callStack!==null)){ 
    3111 _362=self._newCallStack(path,once); 
    3112 if(typeof (_361)=="function"){ 
    3113 _362.callStack.push(_361); 
    3114 } 
    3115 _35c[path]=_362
    3116 } 
    3117 _362.callStack.push(func); 
     3103var _360=_35b[path]; 
     3104var _361=_360
     3105if(!(typeof (_360)=="function"&&typeof (_360.callStack)=="object"&&_360.callStack!==null)){ 
     3106_361=self._newCallStack(path,once); 
     3107if(typeof (_360)=="function"){ 
     3108_361.callStack.push(_360); 
     3109} 
     3110_35b[path]=_361
     3111} 
     3112_361.callStack.push(func); 
    31183113},addLoadEvent:function(func){ 
    31193114var self=MochiKit.DOM; 
    31203115self.addToCallStack(self._window,"onload",func,true); 
    3121 },focusOnLoad:function(_365){ 
     3116},focusOnLoad:function(_364){ 
    31223117var self=MochiKit.DOM; 
    31233118self.addLoadEvent(function(){ 
    3124 _365=self.getElement(_365); 
    3125 if(_365){ 
    3126 _365.focus(); 
     3119_364=self.getElement(_364); 
     3120if(_364){ 
     3121_364.focus(); 
    31273122} 
    31283123}); 
    3129 },setElementClass:function(_367,_368){ 
     3124},setElementClass:function(_366,_367){ 
    31303125var self=MochiKit.DOM; 
    3131 var obj=self.getElement(_367); 
     3126var obj=self.getElement(_366); 
    31323127if(self.attributeArray.compliant){ 
    3133 obj.setAttribute("class",_368); 
    3134 }else{ 
    3135 obj.setAttribute("className",_368); 
    3136 } 
    3137 },toggleElementClass:function(_36b){ 
     3128obj.setAttribute("class",_367); 
     3129}else{ 
     3130obj.setAttribute("className",_367); 
     3131} 
     3132},toggleElementClass:function(_36a){ 
    31383133var self=MochiKit.DOM; 
    31393134for(var i=1;i<arguments.length;i++){ 
    31403135var obj=self.getElement(arguments[i]); 
    3141 if(!self.addElementClass(obj,_36b)){ 
    3142 self.removeElementClass(obj,_36b); 
    3143 } 
    3144 } 
    3145 },addElementClass:function(_36f,_370){ 
     3136if(!self.addElementClass(obj,_36a)){ 
     3137self.removeElementClass(obj,_36a); 
     3138} 
     3139} 
     3140},addElementClass:function(_36e,_36f){ 
    31463141var self=MochiKit.DOM; 
    3147 var obj=self.getElement(_36f); 
     3142var obj=self.getElement(_36e); 
    31483143var cls=obj.className; 
    31493144if(cls==undefined||cls.length===0){ 
    3150 self.setElementClass(obj,_370); 
     3145self.setElementClass(obj,_36f); 
    31513146return true; 
    31523147} 
    3153 if(cls==_370){ 
     3148if(cls==_36f){ 
    31543149return false; 
    31553150} 
    3156 var _374=cls.split(" "); 
    3157 for(var i=0;i<_374.length;i++){ 
    3158 if(_374[i]==_370){ 
     3151var _373=cls.split(" "); 
     3152for(var i=0;i<_373.length;i++){ 
     3153if(_373[i]==_36f){ 
    31593154return false; 
    31603155} 
    31613156} 
    3162 self.setElementClass(obj,cls+" "+_370); 
     3157self.setElementClass(obj,cls+" "+_36f); 
    31633158return true; 
    3164 },removeElementClass:function(_376,_377){ 
     3159},removeElementClass:function(_375,_376){ 
    31653160var self=MochiKit.DOM; 
    3166 var obj=self.getElement(_376); 
     3161var obj=self.getElement(_375); 
    31673162var cls=obj.className; 
    31683163if(cls==undefined||cls.length===0){ 
    31693164return false; 
    31703165} 
    3171 if(cls==_377){ 
     3166if(cls==_376){ 
    31723167self.setElementClass(obj,""); 
    31733168return true; 
    31743169} 
    3175 var _37b=cls.split(" "); 
    3176 for(var i=0;i<_37b.length;i++){ 
    3177 if(_37b[i]==_377){ 
    3178 _37b.splice(i,1); 
    3179 self.setElementClass(obj,_37b.join(" ")); 
     3170var _37a=cls.split(" "); 
     3171for(var i=0;i<_37a.length;i++){ 
     3172if(_37a[i]==_376){ 
     3173_37a.splice(i,1); 
     3174self.setElementClass(obj,_37a.join(" ")); 
    31803175return true; 
    31813176} 
    31823177} 
    31833178return false; 
    3184 },swapElementClass:function(_37d,_37e,_37f){ 
    3185 var obj=MochiKit.DOM.getElement(_37d); 
    3186 var res=MochiKit.DOM.removeElementClass(obj,_37e); 
     3179},swapElementClass:function(_37c,_37d,_37e){ 
     3180var obj=MochiKit.DOM.getElement(_37c); 
     3181var res=MochiKit.DOM.removeElementClass(obj,_37d); 
    31873182if(res){ 
    3188 MochiKit.DOM.addElementClass(obj,_37f); 
     3183MochiKit.DOM.addElementClass(obj,_37e); 
    31893184} 
    31903185return res; 
    3191 },hasElementClass:function(_382,_383){ 
    3192 var obj=MochiKit.DOM.getElement(_382); 
     3186},hasElementClass:function(_381,_382){ 
     3187var obj=MochiKit.DOM.getElement(_381); 
    31933188var cls=obj.className; 
    31943189if(!cls){ 
    31953190return false; 
    31963191} 
    3197 var _386=cls.split(" "); 
     3192var _385=cls.split(" "); 
    31983193for(var i=1;i<arguments.length;i++){ 
    31993194var good=false; 
    3200 for(var j=0;j<_386.length;j++){ 
    3201 if(_386[j]==arguments[i]){ 
     3195for(var j=0;j<_385.length;j++){ 
     3196if(_385[j]==arguments[i]){ 
    32023197good=true; 
    32033198break; 
     
    32173212lst=[]; 
    32183213} 
    3219 var _38e=[dom]; 
     3214var _38d=[dom]; 
    32203215var self=MochiKit.DOM; 
    3221 var _390=self.escapeHTML; 
    3222 var _391=self.attributeArray; 
    3223 while(_38e.length){ 
    3224 dom=_38e.pop(); 
     3216var _38f=self.escapeHTML; 
     3217var _390=self.attributeArray; 
     3218while(_38d.length){ 
     3219dom=_38d.pop(); 
    32253220if(typeof (dom)=="string"){ 
    32263221lst.push(dom); 
     
    32283223if(dom.nodeType==1){ 
    32293224lst.push("<"+dom.tagName.toLowerCase()); 
    3230 var _392=[]; 
    3231 var _393=_391(dom); 
    3232 for(var i=0;i<_393.length;i++){ 
    3233 var a=_393[i]; 
    3234 _392.push([" ",a.name,"=\"",_390(a.value),"\""]); 
    3235 } 
    3236 _392.sort(); 
    3237 for(i=0;i<_392.length;i++){ 
    3238 var _396=_392[i]; 
    3239 for(var j=0;j<_396.length;j++){ 
    3240 lst.push(_396[j]); 
     3225var _391=[]; 
     3226var _392=_390(dom); 
     3227for(var i=0;i<_392.length;i++){ 
     3228var a=_392[i]; 
     3229_391.push([" ",a.name,"=\"",_38f(a.value),"\""]); 
     3230} 
     3231_391.sort(); 
     3232for(i=0;i<_391.length;i++){ 
     3233var _395=_391[i]; 
     3234for(var j=0;j<_395.length;j++){ 
     3235lst.push(_395[j]); 
    32413236} 
    32423237} 
    32433238if(dom.hasChildNodes()){ 
    32443239lst.push(">"); 
    3245 _38e.push("</"+dom.tagName.toLowerCase()+">"); 
    3246 var _398=dom.childNodes; 
    3247 for(i=_398.length-1;i>=0;i--){ 
    3248 _38e.push(_398[i]); 
     3240_38d.push("</"+dom.tagName.toLowerCase()+">"); 
     3241var _397=dom.childNodes; 
     3242for(i=_397.length-1;i>=0;i--){ 
     3243_38d.push(_397[i]); 
    32493244} 
    32503245}else{ 
     
    32533248}else{ 
    32543249if(dom.nodeType==3){ 
    3255 lst.push(_390(dom.nodeValue)); 
     3250lst.push(_38f(dom.nodeValue)); 
    32563251} 
    32573252} 
     
    32593254} 
    32603255return lst; 
    3261 },scrapeText:function(node,_39a){ 
     3256},scrapeText:function(node,_399){ 
    32623257var rval=[]; 
    32633258(function(node){ 
     
    32683263} 
    32693264} 
    3270 var _39f=node.nodeValue; 
    3271 if(typeof (_39f)=="string"){ 
    3272 rval.push(_39f); 
     3265var _39e=node.nodeValue; 
     3266if(typeof (_39e)=="string"){ 
     3267rval.push(_39e); 
    32733268} 
    32743269})(MochiKit.DOM.getElement(node)); 
    3275 if(_39a){ 
     3270if(_399){ 
    32763271return rval; 
    32773272}else{ 
    32783273return rval.join(""); 
    32793274} 
    3280 },removeEmptyTextNodes:function(_3a0){ 
    3281 _3a0=MochiKit.DOM.getElement(_3a0); 
    3282 for(var i=0;i<_3a0.childNodes.length;i++){ 
    3283 var node=_3a0.childNodes[i]; 
     3275},removeEmptyTextNodes:function(_39f){ 
     3276_39f=MochiKit.DOM.getElement(_39f); 
     3277for(var i=0;i<_39f.childNodes.length;i++){ 
     3278var node=_39f.childNodes[i]; 
    32843279if(node.nodeType==3&&!/\S/.test(node.nodeValue)){ 
    32853280node.parentNode.removeChild(node); 
    32863281} 
    32873282} 
    3288 },makeClipping:function(_3a3){ 
    3289 _3a3=MochiKit.DOM.getElement(_3a3); 
    3290 var _3a4=_3a3.style.overflow; 
    3291 if((MochiKit.Style.getStyle(_3a3,"overflow")||"visible")!="hidden"){ 
    3292 _3a3.style.overflow="hidden"; 
    3293 } 
    3294 return _3a4
    3295 },undoClipping:function(_3a5,_3a6){ 
    3296 _3a5=MochiKit.DOM.getElement(_3a5); 
    3297 if(!_3a6){ 
     3283},makeClipping:function(_3a2){ 
     3284_3a2=MochiKit.DOM.getElement(_3a2); 
     3285var _3a3=_3a2.style.overflow; 
     3286if((MochiKit.Style.getStyle(_3a2,"overflow")||"visible")!="hidden"){ 
     3287_3a2.style.overflow="hidden"; 
     3288} 
     3289return _3a3
     3290},undoClipping:function(_3a4,_3a5){ 
     3291_3a4=MochiKit.DOM.getElement(_3a4); 
     3292if(!_3a5){ 
    32983293return; 
    32993294} 
    3300 _3a5.style.overflow=_3a6
    3301 },makePositioned:function(_3a7){ 
    3302 _3a7=MochiKit.DOM.getElement(_3a7); 
    3303 var pos=MochiKit.Style.getStyle(_3a7,"position"); 
     3295_3a4.style.overflow=_3a5
     3296},makePositioned:function(_3a6){ 
     3297_3a6=MochiKit.DOM.getElement(_3a6); 
     3298var pos=MochiKit.Style.getStyle(_3a6,"position"); 
    33043299if(pos=="static"||!pos){ 
    3305 _3a7.style.position="relative"; 
     3300_3a6.style.position="relative"; 
    33063301if(/Opera/.test(navigator.userAgent)){ 
    3307 _3a7.style.top=0; 
    3308 _3a7.style.left=0; 
    3309 } 
    3310 } 
    3311 },undoPositioned:function(_3a9){ 
    3312 _3a9=MochiKit.DOM.getElement(_3a9); 
    3313 if(_3a9.style.position=="relative"){ 
    3314 _3a9.style.position=_3a9.style.top=_3a9.style.left=_3a9.style.bottom=_3a9.style.right=""; 
    3315 } 
    3316 },getFirstElementByTagAndClassName:function(_3aa,_3ab,_3ac){ 
     3302_3a6.style.top=0; 
     3303_3a6.style.left=0; 
     3304} 
     3305} 
     3306},undoPositioned:function(_3a8){ 
     3307_3a8=MochiKit.DOM.getElement(_3a8); 
     3308if(_3a8.style.position=="relative"){ 
     3309_3a8.style.position=_3a8.style.top=_3a8.style.left=_3a8.style.bottom=_3a8.style.right=""; 
     3310} 
     3311},getFirstElementByTagAndClassName:function(_3a9,_3aa,_3ab){ 
    33173312var self=MochiKit.DOM; 
     3313if(typeof (_3a9)=="undefined"||_3a9===null){ 
     3314_3a9="*"; 
     3315} 
     3316if(typeof (_3ab)=="undefined"||_3ab===null){ 
     3317_3ab=self._document; 
     3318} 
     3319_3ab=self.getElement(_3ab); 
     3320var _3ad=(_3ab.getElementsByTagName(_3a9)||self._document.all); 
    33183321if(typeof (_3aa)=="undefined"||_3aa===null){ 
    3319 _3aa="*"; 
    3320 
    3321 if(typeof (_3ac)=="undefined"||_3ac===null){ 
    3322 _3ac=self._document; 
    3323 
    3324 _3ac=self.getElement(_3ac); 
    3325 var _3ae=(_3ac.getElementsByTagName(_3aa)||self._document.all); 
    3326 if(typeof (_3ab)=="undefined"||_3ab===null){ 
    3327 return _3ae[0]; 
    3328 
    3329 for(var i=0;i<_3ae.length;i++){ 
    3330 var _3b0=_3ae[i]; 
    3331 var _3b1=_3b0.className.split(" "); 
    3332 for(var j=0;j<_3b1.length;j++){ 
    3333 if(_3b1[j]==_3ab){ 
    3334 return _3b0; 
    3335 
    3336 
    3337 
    3338 },getFirstParentByTagAndClassName:function(elem,_3b4,_3b5){ 
     3322return _3ad[0]; 
     3323
     3324for(var i=0;i<_3ad.length;i++){ 
     3325var _3af=_3ad[i]; 
     3326var _3b0=_3af.className.split(" "); 
     3327for(var j=0;j<_3b0.length;j++){ 
     3328if(_3b0[j]==_3aa){ 
     3329return _3af; 
     3330
     3331
     3332
     3333},getFirstParentByTagAndClassName:function(elem,_3b3,_3b4){ 
    33393334var self=MochiKit.DOM; 
    33403335elem=self.getElement(elem); 
     3336if(typeof (_3b3)=="undefined"||_3b3===null){ 
     3337_3b3="*"; 
     3338}else{ 
     3339_3b3=_3b3.toUpperCase(); 
     3340} 
    33413341if(typeof (_3b4)=="undefined"||_3b4===null){ 
    3342 _3b4="*"; 
    3343 }else{ 
    3344 _3b4=_3b4.toUpperCase(); 
    3345 
    3346 if(typeof (_3b5)=="undefined"||_3b5===null){ 
    3347 _3b5=null; 
    3348 
     3342_3b4=null; 
     3343
     3344var _3b6=""; 
    33493345var _3b7=""; 
    3350 var _3b8=""; 
    33513346while(elem&&elem.tagName){ 
    33523347elem=elem.parentNode; 
    3353 if(_3b4=="*"&&_3b5===null){ 
     3348if(_3b3=="*"&&_3b4===null){ 
    33543349return elem; 
    33553350} 
    3356 _3b7=elem.className.split(" "); 
    3357 _3b8=elem.tagName.toUpperCase(); 
    3358 if(_3b5===null&&_3b4==_3b8){ 
     3351_3b6=elem.className.split(" "); 
     3352_3b7=elem.tagName.toUpperCase(); 
     3353if(_3b4===null&&_3b3==_3b7){ 
    33593354return elem; 
    33603355}else{ 
    3361 if(_3b5!==null){ 
    3362 for(var i=0;i<_3b7.length;i++){ 
    3363 if(_3b4=="*"&&_3b7[i]==_3b5){ 
     3356if(_3b4!==null){ 
     3357for(var i=0;i<_3b6.length;i++){ 
     3358if(_3b3=="*"&&_3b6[i]==_3b4){ 
    33643359return elem; 
    33653360}else{ 
    3366 if(_3b4==_3b8&&_3b7[i]==_3b5){ 
     3361if(_3b3==_3b7&&_3b6[i]==_3b4){ 
    33673362return elem; 
    33683363} 
     
    33733368} 
    33743369return elem; 
    3375 },isParent:function(_3ba,_3bb){ 
    3376 if(!_3ba.parentNode||_3ba==_3bb){ 
     3370},isParent:function(_3b9,_3ba){ 
     3371if(!_3b9.parentNode||_3b9==_3ba){ 
    33773372return false; 
    33783373} 
    3379 if(_3ba.parentNode==_3bb){ 
     3374if(_3b9.parentNode==_3ba){ 
    33803375return true; 
    33813376} 
    3382 return MochiKit.DOM.isParent(_3ba.parentNode,_3bb); 
     3377return MochiKit.DOM.isParent(_3b9.parentNode,_3ba); 
    33833378},__new__:function(win){ 
    33843379var m=MochiKit.Base; 
    33853380if(typeof (document)!="undefined"){ 
    33863381this._document=document; 
    3387 var _3be="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; 
    3388 this._xhtml=(document.documentElement&&document.createElementNS&&document.documentElement.namespaceURI===_3be); 
     3382var _3bd="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"; 
     3383this._xhtml=(document.documentElement&&document.createElementNS&&document.documentElement.namespaceURI===_3bd); 
    33893384}else{ 
    33903385if(MochiKit.MockDOM){ 
     
    33943389this._window=win; 
    33953390this.domConverters=new m.AdapterRegistry(); 
    3396 var _3bf=this._document.createElement("span"); 
    3397 var _3c0
    3398 if(_3bf&&_3bf.attributes&&_3bf.attributes.length>0){ 
    3399 var _3c1=m.filter; 
    3400 _3c0=function(node){ 
    3401 return _3c1(_3c0.ignoreAttrFilter,node.attributes); 
    3402 }; 
    3403 _3c0.ignoreAttr={}; 
    3404 var _3c3=_3bf.attributes; 
    3405 var _3c4=_3c0.ignoreAttr; 
    3406 for(var i=0;i<_3c3.length;i++){ 
    3407 var a=_3c3[i]; 
    3408 _3c4[a.name]=a.value; 
    3409 } 
    3410 _3c0.ignoreAttrFilter=function(a){ 
    3411 return (_3c0.ignoreAttr[a.name]!=a.value); 
    3412 }; 
    3413 _3c0.compliant=false; 
    3414 _3c0.renames={"class":"className","checked":"defaultChecked","usemap":"useMap","for":"htmlFor","readonly":"readOnly","colspan":"colSpan","bgcolor":"bgColor","cellspacing":"cellSpacing","cellpadding":"cellPadding"}; 
    3415 }else{ 
    3416 _3c0=function(node){ 
     3391var _3be=this._document.createElement("span"); 
     3392var _3bf
     3393if(_3be&&_3be.attributes&&_3be.attributes.length>0){ 
     3394var _3c0=m.filter; 
     3395_3bf=function(node){ 
     3396return _3c0(_3bf.ignoreAttrFilter,node.attributes); 
     3397}; 
     3398_3bf.ignoreAttr={}; 
     3399var _3c2=_3be.attributes; 
     3400var _3c3=_3bf.ignoreAttr; 
     3401for(var i=0;i<_3c2.length;i++){ 
     3402var a=_3c2[i]; 
     3403_3c3[a.name]=a.value; 
     3404} 
     3405_3bf.ignoreAttrFilter=function(a){ 
     3406return (_3bf.ignoreAttr[a.name]!=a.value); 
     3407}; 
     3408_3bf.compliant=false; 
     3409_3bf.renames={"class":"className","checked":"defaultChecked","usemap":"useMap","for":"htmlFor","readonly":"readOnly","colspan":"colSpan","bgcolor":"bgColor","cellspacing":"cellSpacing","cellpadding":"cellPadding"}; 
     3410}else{ 
     3411_3bf=function(node){ 
    34173412return node.attributes; 
    34183413}; 
    3419 _3c0.compliant=true; 
    3420 _3c0.renames={}; 
    3421 } 
    3422 this.attributeArray=_3c0
    3423 var _3c9=function(_3ca,arr){ 
    3424 var _3cc=arr[1].split("."); 
     3414_3bf.compliant=true; 
     3415_3bf.renames={}; 
     3416} 
     3417this.attributeArray=_3bf
     3418var _3c8=function(_3c9,arr){ 
     3419var _3cb=arr[1].split("."); 
    34253420var str=""; 
    34263421var obj={}; 
    3427 str+="if (!MochiKit."+_3cc[1]+") { throw new Error(\""; 
     3422str+="if (!MochiKit."+_3cb[1]+") { throw new Error(\""; 
    34283423str+="This function has been deprecated and depends on MochiKit."; 
    3429 str+=_3cc[1]+".\");}"; 
    3430 str+="return MochiKit."+_3cc[1]+"."+arr[0]; 
     3424str+=_3cb[1]+".\");}"; 
     3425str+="return MochiKit."+_3cb[1]+"."+arr[0]; 
    34313426str+=".apply(this, arguments);"; 
    3432 obj[_3cc[2]]=new Function(str); 
    3433 MochiKit.Base.update(MochiKit[_3ca],obj); 
     3427obj[_3cb[2]]=new Function(str); 
     3428MochiKit.Base.update(MochiKit[_3c9],obj); 
    34343429}; 
    34353430for(var i;i<MochiKit.DOM.DEPRECATED.length;i++){ 
    3436 _3c9("DOM",MochiKit.DOM.DEPRECATED[i]); 
    3437 } 
    3438 var _3cf=this.createDOMFunc; 
    3439 this.UL=_3cf("ul"); 
    3440 this.OL=_3cf("ol"); 
    3441 this.LI=_3cf("li"); 
    3442 this.DL=_3cf("dl"); 
    3443 this.DT=_3cf("dt"); 
    3444 this.DD=_3cf("dd"); 
    3445 this.TD=_3cf("td"); 
    3446 this.TR=_3cf("tr"); 
    3447 this.TBODY=_3cf("tbody"); 
    3448 this.THEAD=_3cf("thead"); 
    3449 this.TFOOT=_3cf("tfoot"); 
    3450 this.TABLE=_3cf("table"); 
    3451 this.TH=_3cf("th"); 
    3452 this.INPUT=_3cf("input"); 
    3453 this.SPAN=_3cf("span"); 
    3454 this.A=_3cf("a"); 
    3455 this.DIV=_3cf("div"); 
    3456 this.IMG=_3cf("img"); 
    3457 this.BUTTON=_3cf("button"); 
    3458 this.TT=_3cf("tt"); 
    3459 this.PRE=_3cf("pre"); 
    3460 this.H1=_3cf("h1"); 
    3461 this.H2=_3cf("h2"); 
    3462 this.H3=_3cf("h3"); 
    3463 this.BR=_3cf("br"); 
    3464 this.HR=_3cf("hr"); 
    3465 this.LABEL=_3cf("label"); 
    3466 this.TEXTAREA=_3cf("textarea"); 
    3467 this.FORM=_3cf("form"); 
    3468 this.P=_3cf("p"); 
    3469 this.SELECT=_3cf("select"); 
    3470 this.OPTION=_3cf("option"); 
    3471 this.OPTGROUP=_3cf("optgroup"); 
    3472 this.LEGEND=_3cf("legend"); 
    3473 this.FIELDSET=_3cf("fieldset"); 
    3474 this.STRONG=_3cf("strong"); 
    3475 this.CANVAS=_3cf("canvas"); 
     3431_3c8("DOM",MochiKit.DOM.DEPRECATED[i]); 
     3432} 
     3433var _3ce=this.createDOMFunc; 
     3434this.UL=_3ce("ul"); 
     3435this.OL=_3ce("ol"); 
     3436this.LI=_3ce("li"); 
     3437this.DL=_3ce("dl"); 
     3438this.DT=_3ce("dt"); 
     3439this.DD=_3ce("dd"); 
     3440this.TD=_3ce("td"); 
     3441this.TR=_3ce("tr"); 
     3442this.TBODY=_3ce("tbody"); 
     3443this.THEAD=_3ce("thead"); 
     3444this.TFOOT=_3ce("tfoot"); 
     3445this.TABLE=_3ce("table"); 
     3446this.TH=_3ce("th"); 
     3447this.INPUT=_3ce("input"); 
     3448this.SPAN=_3ce("span"); 
     3449this.A=_3ce("a"); 
     3450this.DIV=_3ce("div"); 
     3451this.IMG=_3ce("img"); 
     3452this.BUTTON=_3ce("button"); 
     3453this.TT=_3ce("tt"); 
     3454this.PRE=_3ce("pre"); 
     3455this.H1=_3ce("h1"); 
     3456this.H2=_3ce("h2"); 
     3457this.H3=_3ce("h3"); 
     3458this.BR=_3ce("br"); 
     3459this.HR=_3ce("hr"); 
     3460this.LABEL=_3ce("label"); 
     3461this.TEXTAREA=_3ce("textarea"); 
     3462this.FORM=_3ce("form"); 
     3463this.P=_3ce("p"); 
     3464this.SELECT=_3ce("select"); 
     3465this.OPTION=_3ce("option"); 
     3466this.OPTGROUP=_3ce("optgroup"); 
     3467this.LEGEND=_3ce("legend"); 
     3468this.FIELDSET=_3ce("fieldset"); 
     3469this.STRONG=_3ce("strong"); 
     3470this.CANVAS=_3ce("canvas"); 
    34763471this.$=this.getElement; 
    34773472this.EXPORT_TAGS={":common":this.EXPORT,":all":m.concat(this.EXPORT,this.EXPORT_OK)}; 
     
    34953490MochiKit.Selector.EXPORT=["Selector","findChildElements","findDocElements","$$"]; 
    34963491MochiKit.Selector.EXPORT_OK=[]; 
    3497 MochiKit.Selector.Selector=function(_3d0){ 
     3492MochiKit.Selector.Selector=function(_3cf){ 
    34983493this.params={classNames:[],pseudoClassNames:[]}; 
    3499 this.expression=_3d0.toString().replace(/(^\s+|\s+$)/g,""); 
     3494this.expression=_3cf.toString().replace(/(^\s+|\s+$)/g,""); 
    35003495this.parseExpression(); 
    35013496this.compileMatcher(); 
    35023497}; 
    35033498MochiKit.Selector.Selector.prototype={__class__:MochiKit.Selector.Selector,parseExpression:function(){ 
    3504 function abort(_3d1){ 
    3505 throw "Parse error in selector: "+_3d1
     3499function abort(_3d0){ 
     3500throw "Parse error in selector: "+_3d0
    35063501} 
    35073502if(this.expression==""){ 
     
    35093504} 
    35103505var repr=MochiKit.Base.repr; 
    3511 var _3d3=this.params; 
     3506var _3d2=this.params; 
    35123507var expr=this.expression; 
    3513 var _3d5,_3d6,_3d7,rest; 
    3514 while(_3d5=expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!^$*]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)){ 
    3515 _3d3.attributes=_3d3.attributes||[]; 
    3516 _3d3.attributes.push({name:_3d5[2],operator:_3d5[3],value:_3d5[4]||_3d5[5]||""}); 
    3517 expr=_3d5[1]; 
     3508var _3d4,_3d5,_3d6,rest; 
     3509while(_3d4=expr.match(/^(.*)\[([a-z0-9_:-]+?)(?:([~\|!^$*]?=)(?:"([^"]*)"|([^\]\s]*)))?\]$/i)){ 
     3510_3d2.attributes=_3d2.attributes||[]; 
     3511_3d2.attributes.push({name:_3d4[2],operator:_3d4[3],value:_3d4[4]||_3d4[5]||""}); 
     3512expr=_3d4[1]; 
    35183513} 
    35193514if(expr=="*"){ 
    35203515return this.params.wildcard=true; 
    35213516} 
    3522 while(_3d5=expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+(?:\([^)]*\))?)(.*)/i)){ 
    3523 _3d6=_3d5[1]; 
    3524 _3d7=_3d5[2]; 
    3525 rest=_3d5[3]; 
    3526 switch(_3d6){ 
     3517while(_3d4=expr.match(/^([^a-z0-9_-])?([a-z0-9_-]+(?:\([^)]*\))?)(.*)/i)){ 
     3518_3d5=_3d4[1]; 
     3519_3d6=_3d4[2]; 
     3520rest=_3d4[3]; 
     3521switch(_3d5){ 
    35273522case "#": 
    3528 _3d3.id=_3d7
     3523_3d2.id=_3d6
    35293524break; 
    35303525case ".": 
    3531 _3d3.classNames.push(_3d7); 
     3526_3d2.classNames.push(_3d6); 
    35323527break; 
    35333528case ":": 
    3534 _3d3.pseudoClassNames.push(_3d7); 
     3529_3d2.pseudoClassNames.push(_3d6); 
    35353530break; 
    35363531case "": 
    35373532case undefined: 
    3538 _3d3.tagName=_3d7.toUpperCase(); 
     3533_3d2.tagName=_3d6.toUpperCase(); 
    35393534break; 
    35403535default: 
     
    35483543},buildMatchExpression:function(){ 
    35493544var repr=MochiKit.Base.repr; 
    3550 var _3da=this.params; 
    3551 var _3db=[]; 
    3552 var _3dc,i; 
    3553 function childElements(_3de){ 
    3554 return "MochiKit.Base.filter(function (node) { return node.nodeType == 1; }, "+_3de+".childNodes)"; 
    3555 } 
    3556 if(_3da.wildcard){ 
    3557 _3db.push("true"); 
    3558 } 
    3559 if(_3dc=_3da.id){ 
    3560 _3db.push("element.id == "+repr(_3dc)); 
    3561 } 
    3562 if(_3dc=_3da.tagName){ 
    3563 _3db.push("element.tagName.toUpperCase() == "+repr(_3dc)); 
    3564 } 
    3565 if((_3dc=_3da.classNames).length>0){ 
    3566 for(i=0;i<_3dc.length;i++){ 
    3567 _3db.push("MochiKit.DOM.hasElementClass(element, "+repr(_3dc[i])+")"); 
    3568 } 
    3569 } 
    3570 if((_3dc=_3da.pseudoClassNames).length>0){ 
    3571 for(i=0;i<_3dc.length;i++){ 
    3572 var _3df=_3dc[i].match(/^([^(]+)(?:\((.*)\))?$/); 
    3573 var _3e0=_3df[1]; 
    3574 var _3e1=_3df[2]; 
    3575 switch(_3e0){ 
     3545var _3d9=this.params; 
     3546var _3da=[]; 
     3547var _3db,i; 
     3548function childElements(_3dd){ 
     3549return "MochiKit.Base.filter(function (node) { return node.nodeType == 1; }, "+_3dd+".childNodes)"; 
     3550} 
     3551if(_3d9.wildcard){ 
     3552_3da.push("true"); 
     3553} 
     3554if(_3db=_3d9.id){ 
     3555_3da.push("element.id == "+repr(_3db)); 
     3556} 
     3557if(_3db=_3d9.tagName){ 
     3558_3da.push("element.tagName.toUpperCase() == "+repr(_3db)); 
     3559} 
     3560if((_3db=_3d9.classNames).length>0){ 
     3561for(i=0;i<_3db.length;i++){ 
     3562_3da.push("MochiKit.DOM.hasElementClass(element, "+repr(_3db[i])+")"); 
     3563} 
     3564} 
     3565if((_3db=_3d9.pseudoClassNames).length>0){ 
     3566for(i=0;i<_3db.length;i++){ 
     3567var _3de=_3db[i].match(/^([^(]+)(?:\((.*)\))?$/); 
     3568var _3df=_3de[1]; 
     3569var _3e0=_3de[2]; 
     3570switch(_3df){ 
    35763571case "root": 
    3577 _3db.push("element.nodeType == 9 || element === element.ownerDocument.documentElement"); 
     3572_3da.push("element.nodeType == 9 || element === element.ownerDocument.documentElement"); 
    35783573break; 
    35793574case "nth-child": 
     
    35813576case "nth-of-type": 
    35823577case "nth-last-of-type": 
    3583 _3df=_3e1.match(/^((?:(\d+)n\+)?(\d+)|odd|even)$/); 
    3584 if(!_3df){ 
    3585 throw "Invalid argument to pseudo element nth-child: "+_3e1
     3578_3de=_3e0.match(/^((?:(\d+)n\+)?(\d+)|odd|even)$/); 
     3579if(!_3de){ 
     3580throw "Invalid argument to pseudo element nth-child: "+_3e0
    35863581} 
    35873582var a,b; 
    3588 if(_3df[0]=="odd"){ 
     3583if(_3de[0]=="odd"){ 
    35893584a=2; 
    35903585b=1; 
    35913586}else{ 
    3592 if(_3df[0]=="even"){ 
     3587if(_3de[0]=="even"){ 
    35933588a=2; 
    35943589b=0; 
    35953590}else{ 
    3596 a=_3df[2]&&parseInt(_3df)||null; 
    3597 b=parseInt(_3df[3]); 
    3598 } 
    3599 } 
    3600 _3db.push("this.nthChild(element,"+a+","+b+","+!!_3e0.match("^nth-last")+","+!!_3e0.match("of-type$")+")"); 
     3591a=_3de[2]&&parseInt(_3de)||null; 
     3592b=parseInt(_3de[3]); 
     3593} 
     3594} 
     3595_3da.push("this.nthChild(element,"+a+","+b+","+!!_3df.match("^nth-last")+","+!!_3df.match("of-type$")+")"); 
    36013596break; 
    36023597case "first-child": 
    3603 _3db.push("this.nthChild(element, null, 1)"); 
     3598_3da.push("this.nthChild(element, null, 1)"); 
    36043599break; 
    36053600case "last-child": 
    3606 _3db.push("this.nthChild(element, null, 1, true)"); 
     3601_3da.push("this.nthChild(element, null, 1, true)"); 
    36073602break; 
    36083603case "first-of-type": 
    3609 _3db.push("this.nthChild(element, null, 1, false, true)"); 
     3604_3da.push("this.nthChild(element, null, 1, false, true)"); 
    36103605break; 
    36113606case "last-of-type": 
    3612 _3db.push("this.nthChild(element, null, 1, true, true)"); 
     3607_3da.push("this.nthChild(element, null, 1, true, true)"); 
    36133608break; 
    36143609case "only-child": 
    3615 _3db.push(childElements("element.parentNode")+".length == 1"); 
     3610_3da.push(childElements("element.parentNode")+".length == 1"); 
    36163611break; 
    36173612case "only-of-type": 
    3618 _3db.push("MochiKit.Base.filter(function (node) { return node.tagName == element.tagName; }, "+childElements("element.parentNode")+").length == 1"); 
     3613_3da.push("MochiKit.Base.filter(function (node) { return node.tagName == element.tagName; }, "+childElements("element.parentNode")+").length == 1"); 
    36193614break; 
    36203615case "empty": 
    3621 _3db.push("element.childNodes.length == 0"); 
     3616_3da.push("element.childNodes.length == 0"); 
    36223617break; 
    36233618case "enabled": 
    3624 _3db.push("(this.isUIElement(element) && element.disabled === false)"); 
     3619_3da.push("(this.isUIElement(element) && element.disabled === false)"); 
    36253620break; 
    36263621case "disabled": 
    3627 _3db.push("(this.isUIElement(element) && element.disabled === true)"); 
     3622_3da.push("(this.isUIElement(element) && element.disabled === true)"); 
    36283623break; 
    36293624case "checked": 
    3630 _3db.push("(this.isUIElement(element) && element.checked === true)"); 
     3625_3da.push("(this.isUIElement(element) && element.checked === true)"); 
    36313626break; 
    36323627case "not": 
    3633 var _3e4=new MochiKit.Selector.Selector(_3e1); 
    3634 _3db.push("!( "+_3e4.buildMatchExpression()+")"); 
     3628var _3e3=new MochiKit.Selector.Selector(_3e0); 
     3629_3da.push("!( "+_3e3.buildMatchExpression()+")"); 
    36353630break; 
    36363631} 
    36373632} 
    36383633} 
    3639 if(_3dc=_3da.attributes){ 
    3640 MochiKit.Base.map(function(_3e5){ 
    3641 var _3e6="MochiKit.DOM.getNodeAttribute(element, "+repr(_3e5.name)+")"; 
    3642 var _3e7=function(_3e8){ 
    3643 return _3e6+".split("+repr(_3e8)+")"; 
    3644 }; 
    3645 switch(_3e5.operator){ 
     3634if(_3db=_3d9.attributes){ 
     3635MochiKit.Base.map(function(_3e4){ 
     3636var _3e5="MochiKit.DOM.getNodeAttribute(element, "+repr(_3e4.name)+")"; 
     3637var _3e6=function(_3e7){ 
     3638return _3e5+".split("+repr(_3e7)+")"; 
     3639}; 
     3640switch(_3e4.operator){ 
    36463641case "=": 
    3647 _3db.push(_3e6+" == "+repr(_3e5.value)); 
     3642_3da.push(_3e5+" == "+repr(_3e4.value)); 
    36483643break; 
    36493644case "~=": 
    3650 _3db.push(_3e6+" && MochiKit.Base.findValue("+_3e7(" ")+", "+repr(_3e5.value)+") > -1"); 
     3645_3da.push(_3e5+" && MochiKit.Base.findValue("+_3e6(" ")+", "+repr(_3e4.value)+") > -1"); 
    36513646break; 
    36523647case "^=": 
    3653 _3db.push(_3e6+".substring(0, "+_3e5.value.length+") == "+repr(_3e5.value)); 
     3648_3da.push(_3e5+".substring(0, "+_3e4.value.length+") == "+repr(_3e4.value)); 
    36543649break; 
    36553650case "$=":