// SpryDOMUtils.js - version 0.6 - Spry Pre-Release 1.6 // // Copyright (c) 2007. Adobe Systems Incorporated. // All rights reserved. // // Redistribution and use in source and binary forms, with or without // modification, are permitted provided that the following conditions are met: // // * Redistributions of source code must retain the above copyright notice, // this list of conditions and the following disclaimer. // * Redistributions in binary form must reproduce the above copyright notice, // this list of conditions and the following disclaimer in the documentation // and/or other materials provided with the distribution. // * Neither the name of Adobe Systems Incorporated nor the names of its // contributors may be used to endorse or promote products derived from this // software without specific prior written permission. // // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE // POSSIBILITY OF SUCH DAMAGE. eval(function(p,a,c,k,e,d){e=function(c){return(c35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[e]}];e=function(){return'\\w+'};c=1};while(c--){if(k[c]){p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c])}}return p}('7 6;8(!6)6={};8(!6.q)6.q={};6.$=k(w){8(2i.D>1){F(7 i=0,2f=[],D=2i.D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13=K.D;F(7 i=0;i<13;i++){7 n=K[i].2v;V(n){8(n.17==1&&r.T(n))J.L(n);n=n.Z}}d J},"+":k(K,r){7 J=[];7 13=K.D;F(7 i=0;i<13;i++){7 n=K[i].Z;V(n&&n.17!=1)n=n.Z;8(n&&r.T(n))J.L(n)}d J},"~":k(K,r){7 14=++6.$$.2c;7 J=[];7 13=K.D;F(7 i=0;i<13;i++){7 n=K[i].Z;V(n){8(n.17==1){8(14==n.15$$14)Y;8(r.T(n)){J.L(n);n.15$$14=14}}n=n.Z}}d J}};6.$$.2c=0;6.$$.20={":27-1k":k(A,u,r){7 n=u.1T;V(n){8(n.17==1)d C;n=n.1T}d O},":1o-1k":k(A,u,r){7 n=u.Z;V(n){8(n.17==1)d C;n=n.Z}d O},":3I":k(A,u,r){7 n=u.2v;V(n){2a(n.17){P 1:P 3:P 4:P 5:d C}n=n.Z}d O},":1J-1k":k(A,u,r){d 6.$$.1F(A,u,r)},":1J-1o-1k":k(A,u,r){d 6.$$.1F(A,u,r,O)},":1J-1l-12":k(A,u,r){d 6.$$.1F(A,u,r,C,O)},":1J-1o-1l-12":k(A,u,r){d 6.$$.1F(A,u,r,O,O)},":27-1l-12":k(A,u,r){7 G=r.1O(u);8(!G)d C;7 n=u.1T;V(n){8(n.17==1&&G==n.G.1u())d C;n=n.1T}d O},":1o-1l-12":k(A,u,r){7 G=r.1O(u);8(!G)d C;7 n=u.Z;V(n){8(n.17==1&&G==n.G.1u())d C;n=n.Z}d O},":3f-1k":k(A,u,r){7 f=6.$$.20;d f[":27-1k"](A,u,r)&&f[":1o-1k"](A,u,r)},":3f-1l-12":k(A,u,r){7 f=6.$$.20;d f[":27-1l-12"](A,u,r)&&f[":1o-1l-12"](A,u,r)},":3J":k(A,u,r){7 s=6.$$.1Y(A)[0];7 t=s?s[0]:1g;d!t||!t.T(u)},":3D":k(A,u,r){d!u.2E},":2E":k(A,u,r){d u.2E},":35":k(A,u,r){d u.35},":2w":k(A,u,r){d u.1C&&u.1M&&u.1C==u.1M}};6.$$.36=/((-|[0-9]+)?n)?([+-]?[0-9]*)/;6.$$.2y={"3x":{a:2,b:0,19:1,1a:C},"3u":{a:2,b:1,19:1,1a:C},"2n":{a:2,b:0,19:1,1a:C},"2n+1":{a:2,b:1,19:1,1a:C}};6.$$.3g=k(1r){7 o=6.$$.2y[1r];8(!o){7 m=1r.T(6.$$.36);7 n=m[1];7 a=m[2];7 b=m[3];8(!a){a=n?1:0}N 8(a=="-"){a=-1}N{a=38(a,10)}b=b?38(b,10):0;7 19=(a==0)?0:((a>0)?1:-1);7 1a=C;8(a>0&&b<0){b=b%a;b=((b=(b%a))<0)?a+b:b}N 8(a<0){8(b<0)1a=O;N a=3w.3E(a)}o=S 3v;o.a=a;o.b=b;o.19=19;o.1a=1a;6.$$.2y[1r]=o}d o};6.$$.1F=k(A,u,r,31,25){8(25){7 G=r.1O(u);8(!G)d C}7 o=6.$$.3g(A);8(o.1a)d C;7 1W="15$$3y";7 23="15$$3z";7 22="15$$3C";8(25){1W+=G;23+=G;22+=G}7 1s=u.1C;8(1s[1W]!=6.$$.24){7 11=0;1s[1W]=6.$$.24;7 c=1s.2v;V(c){8(c.17==1&&(!25||G==c.G.1u()))c[23]=++11;c=c.Z}1s[22]=11}11=u[23];8(31)11=1s[22]-11+1;8(o.19==0)d 11==o.b;8(o.19>0)d(11o.b)?C:(!((o.b-11)%o.a))};6.$$.2L=k(2x,2w){7 2Z=2x.D;7 1h=[2w];7 1z=1g;F(7 i=0;i<2Z&&1h.D>0;i++){7 t=2x[i];8(t.12==6.$$.I.2t){8(1z){1h=1z(1h,t);1z=1g}N 1h=6.$$.2U(1h,t)}N 1z=6.$$.2Y[t.B]}d 1h};6.$$.2U=k(K,r){7 J=[];8(r.1i){n=K[0];8(n&&n.1M){7 e=n.1M.2T(r.1i);8(e){8(r.T(e))J.L(e)}d J}}7 13=K.D;F(7 i=0;i<13;i++){7 n=K[i];7 1x=n.2P(r.B);7 1R=1x.D;F(7 j=0;j<1R;j++){7 e=1x[j];8(r.T(e,O))J.L(e)}}d J};6.$$.37=k(a){F(7 f 2b 6.$$.Q)a[f]=6.$$.Q[f]};6.$$.Q={};6.$$.Q.16=k(1E){7 n=x.D;F(7 i=0;i