eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[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}('B a6={a7:\'1.11\'};m $59(a){o(a!=7G)};m $R(a){C(!$59(a))o K;C(a.3U)o\'J\';B b=5a a;C(b==\'2d\'&&a.a8){1z(a.6c){Q 1:o\'J\';Q 3:o(/\\S/).2o(a.7H)?\'a9\':\'aa\'}}C(b==\'2d\'||b==\'m\'){1z(a.7I){Q 1R:o\'3s\';Q 6d:o\'6e\';Q U:o\'3V\'}C(5a a.P==\'3t\'){C(a.ab)o\'ac\';C(a.6f)o\'W\'}}o b};m $1D(){B a={};I(B i=0;i<W.P;i++){I(B b Y W[i]){B c=W[i][b];B d=a[b];C(d&&$R(c)==\'2d\'&&$R(d)==\'2d\')a[b]=$1D(d,c);T a[b]=c}}o a};B $N=m(){B a=W;C(!a[1])a=[k,a[0]];I(B b Y a[1])a[0][b]=a[1][b];o a[0]};B $3W=m(){I(B i=0,l=W.P;i<l;i++){W[i].N=m(a){I(B b Y a){C(!k.1m[b])k.1m[b]=a[b];C(!k[b])k[b]=$3W.5b(b)}}}};$3W.5b=m(b){o m(a){o k.1m[b].36(a,1R.1m.7J.1w(W,1))}};$3W(6g,1R,5c,7K);m $1S(a){o!!(a||a===0)};m $3X(a,b){o $59(a)?a:b};m $6h(a,b){o 12.7L(12.6h()*(b-a+1)+a)};m $3Y(){o G 7M().7N()};m $3Z(a){ad(a);ae(a);o 1d};B 2L=m(a){a=a||{};a.N=$N;o a};B af=G 2L(O);B ag=G 2L(M);M.5d=M.2p(\'5d\')[0];O.4q=!!(M.4r);C(O.7O)O.26=O[O.5e?\'7P\':\'5f\']=14;T C(M.7Q&&!M.ah&&!ai.aj)O.3u=O[O.4q?\'ak\':\'6i\']=14;T C(M.al!=1d)O.4s=14;O.6j=O.3u;6k.N=$N;C(5a 4t==\'7G\'){B 4t=m(){};C(O.3u)M.7R("am");4t.1m=(O.3u)?O["[[an.1m]]"]:{}}4t.1m.3U=m(){};C(O.5f)41{M.ao("ap",K,14)}42(e){};B U=m(a){B b=m(){o(W[0]!==1d&&k.17&&$R(k.17)==\'m\')?k.17.36(k,W):k};$N(b,k);b.1m=a;b.7I=U;o b};U.1c=m(){};U.1m={N:m(a){B b=G k(1d);I(B c Y a){B d=b[c];b[c]=U.7S(d,a[c])}o G U(b)},2z:m(){I(B i=0,l=W.P;i<l;i++)$N(k.1m,W[i])}};U.7S=m(a,b){C(a&&a!=b){B c=$R(b);C(c!=$R(a))o b;1z(c){Q\'m\':B d=m(){k.1p=W.6f.1p;o b.36(k,W)};d.1p=a;o d;Q\'2d\':o $1D(a,b)}}o b};B 6l=G U({aq:m(a){k.3v=k.3v||[];k.3v.19(a);o k},6m:m(){C(k.3v&&k.3v.P)k.3v.7T().2q(10,k)},ar:m(){k.3v=[]}});B 1M=G U({1h:m(a,b){C(b!=U.1c){k.$V=k.$V||{};k.$V[a]=k.$V[a]||[];k.$V[a].4u(b)}o k},18:m(b,c,d){C(k.$V&&k.$V[b]){k.$V[b].1e(m(a){a.2r({\'1g\':k,\'2q\':d,\'W\':c})()},k)}o k},3w:m(a,b){C(k.$V&&k.$V[a])k.$V[a].28(b);o k}});B 3a=G U({2e:m(){k.F=$1D.36(1d,[k.F].N(W));C(k.1h){I(B a Y k.F){C($R(k.F[a]==\'m\')&&(/^4v[A-Z]/).2o(a))k.1h(a,k.F[a])}}o k}});1R.N({5g:m(a,b){I(B i=0,j=k.P;i<j;i++)a.1w(b,k[i],i,k)},3x:m(a,b){B c=[];I(B i=0,j=k.P;i<j;i++){C(a.1w(b,k[i],i,k))c.19(k[i])}o c},1W:m(a,b){B c=[];I(B i=0,j=k.P;i<j;i++)c[i]=a.1w(b,k[i],i,k);o c},6n:m(a,b){I(B i=0,j=k.P;i<j;i++){C(!a.1w(b,k[i],i,k))o K}o 14},as:m(a,b){I(B i=0,j=k.P;i<j;i++){C(a.1w(b,k[i],i,k))o 14}o K},2A:m(a,b){B c=k.P;I(B i=(b<0)?12.2B(0,c+b):b||0;i<c;i++){C(k[i]===a)o i}o-1},6o:m(a,b){a=a||0;C(a<0)a=k.P+a;b=b||(k.P-a);B c=[];I(B i=0;i<b;i++)c[i]=k[a++];o c},28:m(a){B i=0;B b=k.P;5h(i<b){C(k[i]===a){k.5i(i,1);b--}T{i++}}o k},1a:m(a,b){o k.2A(a,b)!=-1},at:m(a){B b={},P=12.4w(k.P,a.P);I(B i=0;i<P;i++)b[a[i]]=k[i];o b},N:m(a){I(B i=0,j=a.P;i<j;i++)k.19(a[i]);o k},1D:m(a){I(B i=0,l=a.P;i<l;i++)k.4u(a[i]);o k},4u:m(a){C(!k.1a(a))k.19(a);o k},au:m(){o k[$6h(0,k.P-1)]||1d},6p:m(){o k[k.P-1]||1d}});1R.1m.1e=1R.1m.5g;1R.1e=1R.5g;m $A(a){o 1R.6o(a)};m $1e(a,b,c){C(a&&5a a.P==\'3t\'&&$R(a)!=\'2d\'){1R.5g(a,b,c)}T{I(B d Y a)b.1w(c||a,a[d],d)}};1R.1m.2o=1R.1m.1a;5c.N({2o:m(a,b){o(($R(a)==\'2M\')?G 6d(a,b):a).2o(k)},2s:m(){o 4x(k,10)},7U:m(){o 4y(k)},6q:m(){o k.2C(/-\\D/g,m(a){o a.6r(1).6s()})},7V:m(){o k.2C(/\\w[A-Z]/g,m(a){o(a.6r(0)+\'-\'+a.6r(1).4z())})},6t:m(){o k.2C(/\\b[a-z]/g,m(a){o a.6s()})},4A:m(){o k.2C(/^\\s+|\\s+$/g,\'\')},6u:m(){o k.2C(/\\s{2,}/g,\' \').4A()},4B:m(a){B b=k.4C(/\\d{1,3}/g);o(b)?b.4B(a):K},4D:m(a){B b=k.4C(/^#?(\\w{1,2})(\\w{1,2})(\\w{1,2})$/);o(b)?b.7J(1).4D(a):K},1a:m(a,s){o(s)?(s+k+s).2A(s+a+s)>-1:k.2A(a)>-1},7W:m(){o k.2C(/([.*+?^${}()|[\\]\\/\\\\])/g,\'\\\\$1\')}});1R.N({4B:m(a){C(k.P<3)o K;C(k.P==4&&k[3]==0&&!a)o\'av\';B b=[];I(B i=0;i<3;i++){B c=(k[i]-0).3y(16);b.19((c.P==1)?\'0\'+c:c)}o a?b:\'#\'+b.1E(\'\')},4D:m(a){C(k.P!=3)o K;B b=[];I(B i=0;i<3;i++){b.19(4x((k[i].P==1)?k[i]+k[i]:k[i],16))}o a?b:\'2N(\'+b.1E(\',\')+\')\'}});6g.N({2r:m(d){B e=k;d=$1D({\'1g\':e,\'1N\':K,\'W\':1d,\'2q\':K,\'3b\':K,\'5j\':K},d);C($1S(d.W)&&$R(d.W)!=\'3s\')d.W=[d.W];o m(a){B b;C(d.1N){a=a||O.1N;b=[(d.1N===14)?a:G d.1N(a)];C(d.W)b.N(d.W)}T b=d.W||W;B c=m(){o e.36($3X(d.1g,e),b)};C(d.2q)o 7X(c,d.2q);C(d.3b)o aw(c,d.3b);C(d.5j)41{o c()}42(ax){o K};o c()}},ay:m(a,b){o k.2r({\'W\':a,\'1g\':b})},5j:m(a,b){o k.2r({\'W\':a,\'1g\':b,\'5j\':14})()},1g:m(a,b){o k.2r({\'1g\':a,\'W\':b})},az:m(a,b){o k.2r({\'1g\':a,\'1N\':14,\'W\':b})},2q:m(a,b,c){o k.2r({\'2q\':a,\'1g\':b,\'W\':c})()},3b:m(a,b,c){o k.2r({\'3b\':a,\'1g\':b,\'W\':c})()}});7K.N({2s:m(){o 4x(k)},7U:m(){o 4y(k)},1A:m(a,b){o 12.4w(b,12.2B(a,k))},1O:m(a){a=12.2O(10,a||0);o 12.1O(k*a)/a},aA:m(a){I(B i=0;i<k;i++)a(i)}});B L=G U({17:m(a,b){C($R(a)==\'2M\'){C(O.26&&b&&(b.2D||b.R)){B c=(b.2D)?\' 2D="\'+b.2D+\'"\':\'\';B d=(b.R)?\' R="\'+b.R+\'"\':\'\';43 b.2D;43 b.R;a=\'<\'+a+c+d+\'>\'}a=M.7R(a)}a=$(a);o(!b||!a)?a:a.1G(b)}});B 1B=G U({17:m(a){o(a)?$N(a,k):k}});1B.N=m(a){I(B b Y a){k.1m[b]=a[b];k[b]=$3W.5b(b)}};m $(a){C(!a)o 1d;C(a.3U)o 1X.44(a);C([O,M].1a(a))o a;B b=$R(a);C(b==\'2M\'){a=M.5k(a);b=(a)?\'J\':K}C(b!=\'J\')o 1d;C(a.3U)o 1X.44(a);C([\'2d\',\'aB\'].1a(a.7Y.4z()))o a;$N(a,L.1m);a.3U=m(){};o 1X.44(a)};M.5l=M.2p;m $$(){B a=[];I(B i=0,j=W.P;i<j;i++){B b=W[i];1z($R(b)){Q\'J\':a.19(b);Q\'aC\':1i;Q K:1i;Q\'2M\':b=M.5l(b,14);4E:a.N(b)}}o $$.4F(a)};$$.4F=m(a){B b=[];I(B i=0,l=a.P;i<l;i++){C(a[i].$5m)5n;B c=$(a[i]);C(c&&!c.$5m){c.$5m=14;b.19(c)}}I(B n=0,d=b.P;n<d;n++)b[n].$5m=1d;o G 1B(b)};1B.5o=m(d){o m(){B a=W;B b=[];B c=14;I(B i=0,j=k.P,5p;i<j;i++){5p=k[i][d].36(k[i],a);C($R(5p)!=\'J\')c=K;b.19(5p)};o(c)?$$.4F(b):b}};L.N=m(a){I(B b Y a){4t.1m[b]=a[b];L.1m[b]=a[b];L[b]=$3W.5b(b);B c=(1R.1m[b])?b+\'1B\':b;1B.1m[c]=1B.5o(b)}};L.N({1G:m(a){I(B b Y a){B c=a[b];1z(b){Q\'6v\':k.3z(c);1i;Q\'V\':C(k.5q)k.5q(c);1i;Q\'aD\':k.5r(c);1i;4E:k.5s(b,c)}}o k},1C:m(a,b){a=$(a);1z(b){Q\'7Z\':a.2E.6w(k,a);1i;Q\'80\':B c=a.6x();C(!c)a.2E.6y(k);T a.2E.6w(k,c);1i;Q\'1j\':B d=a.6z;C(d){a.6w(k,d);1i}4E:a.6y(k)}o k},6A:m(a){o k.1C(a,\'7Z\')},5t:m(a){o k.1C(a,\'80\')},aE:m(a){o k.1C(a,\'2P\')},aF:m(a){o k.1C(a,\'1j\')},81:m(){B b=[];$1e(W,m(a){b=b.6B(a)});$$(b).1C(k);o k},28:m(){o k.2E.82(k)},83:m(a){B b=$(k.aG(a!==K));C(!b.$V)o b;b.$V={};I(B c Y k.$V)b.$V[c]={\'1Y\':$A(k.$V[c].1Y),\'45\':$A(k.$V[c].45)};o b.5u()},aH:m(a){a=$(a);k.2E.aI(a,k);o a},84:m(a){k.6y(M.aJ(a));o k},6C:m(a){o k.2f.1a(a,\' \')},85:m(a){C(!k.6C(a))k.2f=(k.2f+\' \'+a).6u();o k},86:m(a){k.2f=k.2f.2C(G 6d(\'(^|\\\\s)\'+a+\'(?:\\\\s|$)\'),\'$1\').6u();o k},aK:m(a){o k.6C(a)?k.86(a):k.85(a)},1r:m(a,b){1z(a){Q\'1T\':o k.87(4y(b));Q\'aL\':a=(O.26)?\'aM\':\'aN\'}a=a.6q();1z($R(b)){Q\'3t\':C(![\'aO\',\'88\'].1a(a))b+=\'47\';1i;Q\'3s\':b=\'2N(\'+b.1E(\',\')+\')\'}k.1Z[a]=b;o k},3z:m(a){1z($R(a)){Q\'2d\':L.5v(k,\'1r\',a);1i;Q\'2M\':k.1Z.6D=a}o k},87:m(a){C(a==0){C(k.1Z.3A!="3B")k.1Z.3A="3B"}T{C(k.1Z.3A!="6E")k.1Z.3A="6E"}C(!k.5w||!k.5w.aP)k.1Z.88=1;C(O.26)k.1Z.3x=(a==1)?\'\':"aQ(1T="+a*2t+")";k.1Z.1T=k.$1x.1T=a;o k},1H:m(b){b=b.6q();B c=k.1Z[b];C(!$1S(c)){C(b==\'1T\')o k.$1x.1T;c=[];I(B d Y L.3c){C(b==d){L.3c[d].1e(m(s){B a=k.1H(s);c.19(4x(a)?a:\'89\')},k);C(b==\'2g\'){B e=c.6n(m(a){o(a==c[0])});o(e)?c[0]:K}o c.1E(\' \')}}C(b.1a(\'2g\')){C(L.3c.2g.1a(b)){o[\'8a\',\'6F\',\'29\'].1W(m(p){o k.1H(b+p)},k).1E(\' \')}T C(L.8b.1a(b)){o[\'8c\',\'8d\',\'8e\',\'8f\'].1W(m(p){o k.1H(\'2g\'+p+b.2C(\'2g\',\'\'))},k).1E(\' \')}}C(M.8g)c=M.8g.aR(k,1d).aS(b.7V());T C(k.5w)c=k.5w[b]}C(O.26)c=L.8h(b,c,k);C(c&&b.2o(/8i/i)&&c.1a(\'2N\')){o c.4G(\'2N\').5i(1,4).1W(m(a){o a.4B()}).1E(\' \')}o c},8j:m(){o L.6G(k,\'1H\',W)},4H:m(a,b){a+=\'aT\';B c=(b)?k[b]:k[a];5h(c&&$R(c)!=\'J\')c=c[a];o $(c)},8k:m(){o k.4H(\'2u\')},6x:m(){o k.4H(\'8l\')},aU:m(){o k.4H(\'8l\',\'6z\')},6p:m(){o k.4H(\'2u\',\'aV\')},aW:m(){o $(k.2E)},6H:m(){o $$(k.7Q)},6I:m(a){o!!$A(k.2p(\'*\')).1a(a)},4I:m(a){B b=L.5x[a];C(b)o k[b];B c=L.8m[a]||0;C(!O.26||c)o k.aX(a,c);B d=k.aY[a];o(d)?d.7H:1d},aZ:m(a){B b=L.5x[a];C(b)k[b]=\'\';T k.8n(a);o k},b0:m(){o L.6G(k,\'4I\',W)},5s:m(a,b){B c=L.5x[a];C(c)k[c]=b;T k.b1(a,b);o k},5r:m(a){o L.5v(k,\'5s\',a)},4J:m(){k.8o=$A(W).1E(\'\');o k},b2:m(a){B b=k.3C();C([\'1Z\',\'2F\'].1a(b)){C(O.26){C(b==\'1Z\')k.8p.6D=a;T C(b==\'2F\')k.5s(\'1I\',a);o k}T{k.82(k.6z);o k.84(a)}}k[$59(k.6J)?\'6J\':\'8q\']=a;o k},b3:m(){B a=k.3C();C([\'1Z\',\'2F\'].1a(a)){C(O.26){C(a==\'1Z\')o k.8p.6D;T C(a==\'2F\')o k.4I(\'1I\')}T{o k.8o}}o($3X(k.6J,k.8q))},3C:m(){o k.7Y.4z()},1c:m(){1X.3d(k.2p(\'*\'));o k.4J(\'\')}});L.8h=m(b,c,d){C($1S(4x(c)))o c;C([\'2a\',\'1U\'].1a(b)){B e=(b==\'1U\')?[\'1s\',\'3D\']:[\'1j\',\'2P\'];B f=0;e.1e(m(a){f+=d.1H(\'2g-\'+a+\'-1U\').2s()+d.1H(\'3E-\'+a).2s()});o d[\'1k\'+b.6t()]-f+\'47\'}T C(b.2o(/2g(.+)8a|2v|3E/)){o\'89\'}o c};L.3c={\'2g\':[],\'3E\':[],\'2v\':[]};[\'8c\',\'8d\',\'8e\',\'8f\'].1e(m(a){I(B b Y L.3c)L.3c[b].19(b+a)});L.8b=[\'b4\',\'b5\',\'b6\'];L.6G=m(b,c,d){B e={};$1e(d,m(a){e[a]=b[c](a)});o e};L.5v=m(a,b,c){I(B d Y c)a[b](d,c[d]);o a};L.5x=G 2L({\'3V\':\'2f\',\'I\':\'b7\',\'b8\':\'b9\',\'ba\':\'bb\',\'bc\':\'bd\',\'be\':\'bf\',\'bg\':\'bh\',\'bi\':\'bj\',\'bk\':\'bl\',\'1J\':\'1J\',\'6K\':\'6K\',\'6L\':\'6L\',\'6M\':\'6M\',\'6N\':\'6N\'});L.8m={\'3F\':2,\'4K\':2};L.21={5y:{22:m(a,b){C(k.6O)k.6O(a,b,K);T k.bm(\'4v\'+a,b);o k},2G:m(a,b){C(k.8r)k.8r(a,b,K);T k.bn(\'4v\'+a,b);o k}}};O.N(L.21.5y);M.N(L.21.5y);L.N(L.21.5y);B 1X={1q:[],44:m(a){C(!a.$1x){1X.1q.19(a);a.$1x={\'1T\':1}}o a},3d:m(a){I(B i=0,j=a.P,2h;i<j;i++){C(!(2h=a[i])||!2h.$1x)5n;C(2h.$V)2h.18(\'3d\').5u();I(B p Y 2h.$1x)2h.$1x[p]=1d;I(B d Y L.1m)2h[d]=1d;1X.1q[1X.1q.2A(2h)]=1d;2h.3U=2h.$1x=2h=1d}1X.1q.28(1d)},1c:m(){1X.44(O);1X.44(M);1X.3d(1X.1q)}};O.22(\'8s\',m(){O.22(\'6P\',1X.1c);C(O.26)O.22(\'6P\',bo)});B 2i=G U({17:m(a){C(a&&a.$8t)o a;k.$8t=14;a=a||O.1N;k.1N=a;k.R=a.R;k.48=a.48||a.bp;C(k.48.6c==3)k.48=k.48.2E;k.7T=a.bq;k.br=a.bs;k.bt=a.bu;k.bv=a.bw;C([\'6Q\',\'49\'].1a(k.R)){k.bx=(a.8u)?a.8u/by:-(a.bz||0)/3}T C(k.R.1a(\'3G\')){k.5z=a.8v||a.bA;I(B b Y 2i.1Y){C(2i.1Y[b]==k.5z){k.3G=b;1i}}C(k.R==\'8w\'){B c=k.5z-bB;C(c>0&&c<13)k.3G=\'f\'+c}k.3G=k.3G||5c.bC(k.5z).4z()}T C(k.R.2o(/(5A|2H|bD)/)){k.1y={\'x\':a.6R||a.8x+M.2j.4L,\'y\':a.6S||a.8y+M.2j.4M};k.8z={\'x\':a.6R?a.6R-O.8A:a.8x,\'y\':a.6S?a.6S-O.8B:a.8y};k.bE=(a.8v==3)||(a.bF==2);1z(k.R){Q\'6T\':k.1P=a.1P||a.bG;1i;Q\'6U\':k.1P=a.1P||a.6V}k.8C()}o k},1t:m(){o k.5B().5C()},5B:m(){C(k.1N.5B)k.1N.5B();T k.1N.bH=14;o k},5C:m(){C(k.1N.5C)k.1N.5C();T k.1N.bI=K;o k}});2i.5D={1P:m(){C(k.1P&&k.1P.6c==3)k.1P=k.1P.2E},8D:m(){41{2i.5D.1P.1w(k)}42(e){k.1P=k.48}}};2i.1m.8C=(O.4s)?2i.5D.8D:2i.5D.1P;2i.1Y=G 2L({\'bJ\':13,\'bK\':38,\'bL\':40,\'1s\':37,\'3D\':39,\'bM\':27,\'bN\':32,\'bO\':8,\'bP\':9,\'43\':46});L.21.1M={1h:m(a,b){k.$V=k.$V||{};k.$V[a]=k.$V[a]||{\'1Y\':[],\'45\':[]};C(k.$V[a].1Y.1a(b))o k;k.$V[a].1Y.19(b);B c=a;B d=L.1M[a];C(d){C(d.6W)d.6W.1w(k,b);C(d.1W)b=d.1W;C(d.R)c=d.R}C(!k.6O)b=b.2r({\'1g\':k,\'1N\':14});k.$V[a].45.19(b);o(L.6X.1a(c))?k.22(c,b):k},3w:m(a,b){C(!k.$V||!k.$V[a])o k;B c=k.$V[a].1Y.2A(b);C(c==-1)o k;B d=k.$V[a].1Y.5i(c,1)[0];B e=k.$V[a].45.5i(c,1)[0];B f=L.1M[a];C(f){C(f.28)f.28.1w(k,b);C(f.R)a=f.R}o(L.6X.1a(a))?k.2G(a,e):k},5q:m(a){o L.5v(k,\'1h\',a)},5u:m(b){C(!k.$V)o k;C(!b){I(B c Y k.$V)k.5u(c);k.$V=1d}T C(k.$V[b]){k.$V[b].1Y.1e(m(a){k.3w(b,a)},k);k.$V[b]=1d}o k},18:m(b,c,d){C(k.$V&&k.$V[b]){k.$V[b].1Y.1e(m(a){a.2r({\'1g\':k,\'2q\':d,\'W\':c})()},k)}o k},8E:m(b,c){C(!b.$V)o k;C(!c){I(B d Y b.$V)k.8E(b,d)}T C(b.$V[c]){b.$V[c].1Y.1e(m(a){k.1h(c,a)},k)}o k}};O.N(L.21.1M);M.N(L.21.1M);L.N(L.21.1M);L.1M=G 2L({\'6Y\':{R:\'6T\',1W:m(a){a=G 2i(a);C(a.1P!=k&&!k.6I(a.1P))k.18(\'6Y\',a)}},\'6Z\':{R:\'6U\',1W:m(a){a=G 2i(a);C(a.1P!=k&&!k.6I(a.1P))k.18(\'6Z\',a)}},\'49\':{R:(O.4s)?\'6Q\':\'49\'}});L.6X=[\'5A\',\'bQ\',\'4N\',\'4a\',\'49\',\'6Q\',\'6T\',\'6U\',\'2b\',\'8w\',\'bR\',\'bS\',\'3e\',\'6P\',\'8s\',\'bT\',\'4b\',\'bU\',\'bV\',\'8F\',\'bW\',\'bX\',\'3f\',\'8G\',\'70\',\'bY\',\'2k\'];6g.N({2w:m(a,b){o k.2r({\'1g\':a,\'W\':b,\'1N\':2i})}});1B.N({bZ:m(b){o G 1B(k.3x(m(a){o(L.3C(a)==b)}))},8H:m(b,c){B d=k.3x(m(a){o(a.2f&&a.2f.1a(b,\' \'))});o(c)?d:G 1B(d)},8I:m(b,c){B d=k.3x(m(a){o(a.71==b)});o(c)?d:G 1B(d)},8J:m(c,d,e,f){B g=k.3x(m(a){B b=L.4I(a,c);C(!b)o K;C(!d)o 14;1z(d){Q\'=\':o(b==e);Q\'*=\':o(b.1a(e));Q\'^=\':o(b.5E(0,e.P)==e);Q\'$=\':o(b.5E(b.P-e.P)==e);Q\'!=\':o(b!=e);Q\'~=\':o b.1a(e,\' \')}o K});o(f)?g:G 1B(g)}});m $E(a,b){o($(b)||M).8K(a)};m $c0(a,b){o($(b)||M).5l(a)};$$.2Q={\'6e\':/^(\\w*|\\*)(?:#([\\w-]+)|\\.([\\w-]+))?(?:\\[(\\w+)(?:([!*^$]?=)["\']?([^"\'\\]]*)["\']?)?])?$/,\'4q\':{72:m(a,b,c,i){B d=[b.c1?\'73:\':\'\',c[1]];C(c[2])d.19(\'[@71="\',c[2],\'"]\');C(c[3])d.19(\'[1a(6B(" ", @3V, " "), " \',c[3],\' ")]\');C(c[4]){C(c[5]&&c[6]){1z(c[5]){Q\'*=\':d.19(\'[1a(@\',c[4],\', "\',c[6],\'")]\');1i;Q\'^=\':d.19(\'[c2-c3(@\',c[4],\', "\',c[6],\'")]\');1i;Q\'$=\':d.19(\'[c4(@\',c[4],\', 2M-P(@\',c[4],\') - \',c[6].P,\' + 1) = "\',c[6],\'"]\');1i;Q\'=\':d.19(\'[@\',c[4],\'="\',c[6],\'"]\');1i;Q\'!=\':d.19(\'[@\',c[4],\'!="\',c[6],\'"]\')}}T{d.19(\'[@\',c[4],\']\')}}a.19(d.1E(\'\'));o a},74:m(a,b,c){B d=[];B e=M.4r(\'.//\'+a.1E(\'//\'),b,$$.2Q.8L,c5.c6,1d);I(B i=0,j=e.c7;i<j;i++)d.19(e.c8(i));o(c)?d:G 1B(d.1W($))}},\'8M\':{72:m(a,b,c,i){C(i==0){C(c[2]){B d=b.5k(c[2]);C(!d||((c[1]!=\'*\')&&(L.3C(d)!=c[1])))o K;a=[d]}T{a=$A(b.2p(c[1]))}}T{a=$$.2Q.2p(a,c[1]);C(c[2])a=1B.8I(a,c[2],14)}C(c[3])a=1B.8H(a,c[3],14);C(c[4])a=1B.8J(a,c[4],c[5],c[6],14);o a},74:m(a,b,c){o(c)?a:$$.4F(a)}},8L:m(a){o(a==\'73\')?\'8N://8O.c9.ca/cb/73\':K},2p:m(a,b){B c=[];I(B i=0,j=a.P;i<j;i++)c.N(a[i].2p(b));o c}};$$.2Q.2l=(O.4q)?\'4q\':\'8M\';L.21.75={5F:m(a,b){B c=[];a=a.4A().4G(\' \');I(B i=0,j=a.P;i<j;i++){B d=a[i];B e=d.4C($$.2Q.6e);C(!e)1i;e[1]=e[1]||\'*\';B f=$$.2Q[$$.2Q.2l].72(c,k,e,i);C(!f)1i;c=f}o $$.2Q[$$.2Q.2l].74(c,k,b)},8K:m(a){o $(k.5F(a,14)[0]||K)},5l:m(a,b){B c=[];a=a.4G(\',\');I(B i=0,j=a.P;i<j;i++)c=c.6B(k.5F(a[i],14));o(b)?c:$$.4F(c)}};L.N({5k:m(a){B b=M.5k(a);C(!b)o K;I(B c=b.2E;c!=k;c=c.2E){C(!c)o K}o b},cc:m(a){o k.5F(\'.\'+a)}});M.N(L.21.75);L.N(L.21.75);L.N({3g:m(){1z(k.3C()){Q\'3f\':B b=[];$1e(k.F,m(a){C(a.6N)b.19($3X(a.1J,a.1I))});o(k.6M)?b:b[0];Q\'8P\':C(!(k.6L&&[\'cd\',\'ce\'].1a(k.R))&&![\'3B\',\'1I\',\'cf\'].1a(k.R))1i;Q\'8Q\':o k.1J}o K},8R:m(){o $$(k.2p(\'8P\'),k.2p(\'3f\'),k.2p(\'8Q\'))},4O:m(){B f=[];k.8R().1e(m(b){B c=b.2D;B d=b.3g();C(d===K||!c||b.6K)o;B e=m(a){f.19(c+\'=\'+5G(a))};C($R(d)==\'3s\')d.1e(e);T e(d)});o f.1E(\'&\')}});L.N({2R:m(x,y){k.4L=x;k.4M=y},5H:m(){o{\'2k\':{\'x\':k.4L,\'y\':k.4M},\'3H\':{\'x\':k.3h,\'y\':k.2S},\'5I\':{\'x\':k.5J,\'y\':k.4P}}},2I:m(b){b=b||[];B c=k,1s=0,1j=0;do{1s+=c.cg||0;1j+=c.ch||0;c=c.ci}5h(c);b.1e(m(a){1s-=a.4L||0;1j-=a.4M||0});o{\'x\':1s,\'y\':1j}},8S:m(a){o k.2I(a).y},8T:m(a){o k.2I(a).x},3I:m(a){B b=k.2I(a);B c={\'1U\':k.3h,\'2a\':k.2S,\'1s\':b.x,\'1j\':b.y};c.3D=c.1s+c.1U;c.2P=c.1j+c.2a;o c}});L.1M.76={6W:m(a){C(O.5K){a.1w(k);o}B b=m(){C(O.5K)o;O.5K=14;O.1u=$3Z(O.1u);k.18(\'76\')}.1g(k);C(M.4c&&O.3u){O.1u=m(){C([\'5K\',\'77\'].1a(M.4c))b()}.3b(50)}T C(M.4c&&O.26){C(!$(\'78\')){B c=(O.79.cj==\'ck:\')?\'://0\':\'7a:cl(0)\';M.cm(\'<2F 71="78" cn 4K="\'+c+\'"><\\/2F>\');$(\'78\').5L=m(){C(k.4c==\'77\')b()}}}T{O.22("3e",b);M.22("co",b)}}};O.cp=m(a){o k.1h(\'76\',a)};O.N({7b:m(){C(k.6j)o k.cq;C(k.8U||k.4s||k.5f||k.7P)o M.3J.8V;o M.2j.8V},7c:m(){C(k.6j)o k.cr;C(k.8U||k.4s||k.5f)o M.3J.8W;o M.2j.8W},8X:m(){C(k.26)o 12.2B(M.2j.3h,M.2j.5J);C(k.3u)o M.3J.5J;o M.2j.5J},8Y:m(){C(k.26)o 12.2B(M.2j.2S,M.2j.4P);C(k.3u)o M.3J.4P;o M.2j.4P},7d:m(){o k.8A||M.2j.4L},7e:m(){o k.8B||M.2j.4M},5H:m(){o{\'3H\':{\'x\':k.7b(),\'y\':k.7c()},\'5I\':{\'x\':k.8X(),\'y\':k.8Y()},\'2k\':{\'x\':k.7d(),\'y\':k.7e()}}},2I:m(){o{\'x\':0,\'y\':0}}});B 15={};15.2m=G U({F:{3i:U.1c,1v:U.1c,7f:U.1c,8Z:m(p){o-(12.90(12.7g*p)-1)/2},3j:cs,3k:\'47\',2T:14,91:50},17:m(a){k.J=k.J||1d;k.2e(a);C(k.F.17)k.F.17.1w(k)},2c:m(){B a=$3Y();C(a<k.3Y+k.F.3j){k.92=k.F.8Z((a-k.3Y)/k.F.3j);k.3K();k.3L()}T{k.1t(14);k.1G(k.1n);k.18(\'1v\',k.J,10);k.6m()}},1G:m(a){k.1b=a;k.3L();o k},3K:m(){k.1b=k.3M(k.23,k.1n)},3M:m(a,b){o(b-a)*k.92+a},1f:m(a,b){C(!k.F.2T)k.1t();T C(k.1u)o k;k.23=a;k.1n=b;k.8F=k.1n-k.23;k.3Y=$3Y();k.1u=k.2c.3b(12.1O(93/k.F.91),k);k.18(\'3i\',k.J);o k},1t:m(a){C(!k.1u)o k;k.1u=$3Z(k.1u);C(!a)k.18(\'7f\',k.J);o k},ct:m(a,b){o k.1f(a,b)},cu:m(a){o k.1t(a)}});15.2m.2z(G 6l,G 1M,G 3a);15.2J={3f:m(a,b){C(a.2o(/8i/i))o k.29;B c=$R(b);C((c==\'3s\')||(c==\'2M\'&&b.1a(\' \')))o k.5o;o k.94},2n:m(a,b,c){C(!c.19)c=[c];B d=c[0],1n=c[1];C(!$1S(1n)){1n=d;d=a.1H(b)}B e=k.3f(b,1n);o{\'23\':e.2n(d),\'1n\':e.2n(1n),\'1o\':e}}};15.2J.94={2n:m(a){o 4y(a)},4d:m(a,b,c){o c.3M(a,b)},3g:m(a,b,c){C(b==\'47\'&&c!=\'1T\')a=12.1O(a);o a+b}};15.2J.5o={2n:m(a){o a.19?a:a.4G(\' \').1W(m(v){o 4y(v)})},4d:m(a,b,c){B d=[];I(B i=0;i<a.P;i++)d[i]=c.3M(a[i],b[i]);o d},3g:m(a,b,c){C(b==\'47\'&&c!=\'1T\')a=a.1W(12.1O);o a.1E(b+\' \')+b}};15.2J.29={2n:m(a){o a.19?a:a.4D(14)},4d:m(a,b,c){B d=[];I(B i=0;i<a.P;i++)d[i]=12.1O(c.3M(a[i],b[i]));o d},3g:m(a){o\'2N(\'+a.1E(\',\')+\')\'}};15.6F=15.2m.N({17:m(a,b,c){k.J=$(a);k.4Q=b;k.1p(c)},4R:m(){o k.1G(0)},3K:m(){k.1b=k.1o.4d(k.23,k.1n,k)},1G:m(a){k.1o=15.2J.3f(k.4Q,a);o k.1p(k.1o.2n(a))},1f:m(a,b){C(k.1u&&k.F.2T)o k;B c=15.2J.2n(k.J,k.4Q,[a,b]);k.1o=c.1o;o k.1p(c.23,c.1n)},3L:m(){k.J.1r(k.4Q,k.1o.3g(k.1b,k.F.3k,k.4Q))}});L.N({cv:m(a,b){o G 15.6F(k,a,b)}});15.3c=15.2m.N({17:m(a,b){k.J=$(a);k.1p(b)},3K:m(){I(B p Y k.23)k.1b[p]=k.1o[p].4d(k.23[p],k.1n[p],k)},1G:m(a){B b={};k.1o={};I(B p Y a){k.1o[p]=15.2J.3f(p,a[p]);b[p]=k.1o[p].2n(a[p])}o k.1p(b)},1f:m(a){C(k.1u&&k.F.2T)o k;k.1b={};k.1o={};B b={},1n={};I(B p Y a){B c=15.2J.2n(k.J,p,a[p]);b[p]=c.23;1n[p]=c.1n;k.1o[p]=c.1o}o k.1p(b,1n)},3L:m(){I(B p Y k.1b)k.J.1r(p,k.1o[p].3g(k.1b[p],k.F.3k,p))}});L.N({2U:m(a){o G 15.3c(k,a)}});15.1B=15.2m.N({17:m(a,b){k.1q=$$(a);k.1p(b)},3K:m(){I(B i Y k.23){B a=k.23[i],5M=k.1n[i],2V=k.1o[i],95=k.1b[i]={};I(B p Y a)95[p]=2V[p].4d(a[p],5M[p],k)}},1G:m(a){B b={};k.1o={};I(B i Y a){B c=a[i],2V=k.1o[i]={},96=b[i]={};I(B p Y c){2V[p]=15.2J.3f(p,c[p]);96[p]=2V[p].2n(c[p])}}o k.1p(b)},1f:m(a){C(k.1u&&k.F.2T)o k;k.1b={};k.1o={};B b={},1n={};I(B i Y a){B c=a[i],97=b[i]={},5M=1n[i]={},2V=k.1o[i]={};I(B p Y c){B d=15.2J.2n(k.1q[i],p,c[p]);97[p]=d.23;5M[p]=d.1n;2V[p]=d.1o}}o k.1p(b,1n)},3L:m(){I(B i Y k.1b){B a=k.1b[i],2V=k.1o[i];I(B p Y a)k.1q[i].1r(p,2V[p].3g(a[p],k.F.3k,p))}}});15.98=15.2m.N({F:{3N:[],1k:{\'x\':0,\'y\':0},99:14},17:m(a,b){k.1b=[];k.J=$(a);k.1l={\'1t\':k.1t.1g(k,K)};k.1p(b);C(k.F.99){k.1h(\'3i\',m(){M.1h(\'49\',k.1l.1t)}.1g(k));k.1h(\'1v\',m(){M.3w(\'49\',k.1l.1t)}.1g(k))}},3K:m(){I(B i=0;i<2;i++)k.1b[i]=k.3M(k.23[i],k.1n[i])},2R:m(x,y){C(k.1u&&k.F.2T)o k;B a=k.J.5H();B b={\'x\':x,\'y\':y};I(B z Y a.3H){B c=a.5I[z]-a.3H[z];C($1S(b[z]))b[z]=($R(b[z])==\'3t\')?b[z].1A(0,c):c;T b[z]=a.2k[z];b[z]+=k.F.1k[z]}o k.1f([a.2k.x,a.2k.y],[b.x,b.y])},cw:m(){o k.2R(K,0)},cx:m(){o k.2R(K,\'9a\')},cy:m(){o k.2R(0,K)},cz:m(){o k.2R(\'9a\',K)},6V:m(a){B b=k.J.2I(k.F.3N);B c=$(a).2I(k.F.3N);o k.2R(c.x-b.x,c.y-b.y)},3L:m(){k.J.2R(k.1b[0],k.1b[1])}});15.cA=15.2m.N({F:{3O:\'7h\'},17:m(a,b){k.J=$(a);k.2x=G L(\'4e\',{\'6v\':$N(k.J.8j(\'2v\'),{\'9b\':\'3B\'})}).5t(k.J).81(k.J);k.J.1r(\'2v\',0);k.2e(b);k.1b=[];k.1p(k.F);k.4f=14;k.1h(\'1v\',m(){k.4f=(k.1b[0]===0)});C(O.6i)k.1h(\'1v\',m(){C(k.4f)k.J.28().1C(k.2x)})},3K:m(){I(B i=0;i<2;i++)k.1b[i]=k.3M(k.23[i],k.1n[i])},7h:m(){k.2v=\'2v-1j\';k.4S=\'2a\';k.1k=k.J.2S},7i:m(){k.2v=\'2v-1s\';k.4S=\'1U\';k.1k=k.J.3h},9c:m(a){k[a||k.F.3O]();o k.1f([k.J.1H(k.2v).2s(),k.2x.1H(k.4S).2s()],[0,k.1k])},9d:m(a){k[a||k.F.3O]();o k.1f([k.J.1H(k.2v).2s(),k.2x.1H(k.4S).2s()],[-k.1k,0])},4R:m(a){k[a||k.F.3O]();k.4f=K;o k.1G([-k.1k,0])},3l:m(a){k[a||k.F.3O]();k.4f=14;o k.1G([0,k.1k])},cB:m(a){C(k.2x.2S==0||k.2x.3h==0)o k.9c(a);o k.9d(a)},3L:m(){k.J.1r(k.2v,k.1b[0]+k.F.3k);k.2x.1r(k.4S,k.1b[1]+k.F.3k)}});15.7j=m(b,c){c=c||[];C($R(c)!=\'3s\')c=[c];o $N(b,{cC:m(a){o b(a,c)},cD:m(a){o 1-b(1-a,c)},cE:m(a){o(a<=0.5)?b(2*a,c)/2:(2-b(2*(1-a),c))/2}})};15.2K=G 2L({cF:m(p){o p}});15.2K.N=m(a){I(B b Y a){15.2K[b]=G 15.7j(a[b]);15.2K.7k(b)}};15.2K.7k=m(b){[\'cG\',\'cH\',\'cI\'].1e(m(a){15.2K[b.4z()+a]=15.2K[b][\'cJ\'+a]})};15.2K.N({cK:m(p,x){o 12.2O(p,x[0]||6)},cL:m(p){o 12.2O(2,8*(p-1))},cM:m(p){o 1-12.9e(12.cN(p))},cO:m(p){o 1-12.9e((1-p)*12.7g/2)},cP:m(p,x){x=x[0]||1.cQ;o 12.2O(p,2)*((x+1)*p-x)},cR:m(p){B c;I(B a=0,b=1;1;a+=b,b/=2){C(p>=(7-4*a)/11){c=-12.2O((11-6*a-11*p)/4,2)+b*b;1i}}o c},cS:m(p,x){o 12.2O(2,10*--p)*12.90(20*p*12.7g*(x[0]||1)/3)}});[\'cT\',\'cU\',\'cV\',\'cW\'].1e(m(a,i){15.2K[a]=G 15.7j(m(p){o 12.2O(p,[i+2])});15.2K.7k(a)});B 3m={};3m.2m=G U({F:{4T:K,3k:\'47\',3i:U.1c,9f:U.1c,1v:U.1c,9g:U.1c,7l:U.1c,1A:K,2W:{x:\'1s\',y:\'1j\'},3P:K,5N:6},17:m(a,b){k.2e(b);k.J=$(a);k.4T=$(k.F.4T)||k.J;k.2H={\'1b\':{},\'7m\':{}};k.1J={\'1f\':{},\'1b\':{}};k.1l={\'1f\':k.1f.2w(k),\'3n\':k.3n.2w(k),\'2X\':k.2X.2w(k),\'1t\':k.1t.1g(k)};k.5O();C(k.F.17)k.F.17.1w(k)},5O:m(){k.4T.1h(\'4a\',k.1l.1f);o k},9h:m(){k.4T.3w(\'4a\',k.1l.1f);o k},1f:m(a){k.18(\'9f\',k.J);k.2H.1f=a.1y;B b=k.F.1A;k.1A={\'x\':[],\'y\':[]};I(B z Y k.F.2W){C(!k.F.2W[z])5n;k.1J.1b[z]=k.J.1H(k.F.2W[z]).2s();k.2H.7m[z]=a.1y[z]-k.1J.1b[z];C(b&&b[z]){I(B i=0;i<2;i++){C($1S(b[z][i]))k.1A[z][i]=($R(b[z][i])==\'m\')?b[z][i]():b[z][i]}}}C($R(k.F.3P)==\'3t\')k.F.3P={\'x\':k.F.3P,\'y\':k.F.3P};M.22(\'2b\',k.1l.3n);M.22(\'4N\',k.1l.1t);k.18(\'3i\',k.J);a.1t()},3n:m(a){B b=12.1O(12.cX(12.2O(a.1y.x-k.2H.1f.x,2)+12.2O(a.1y.y-k.2H.1f.y,2)));C(b>k.F.5N){M.2G(\'2b\',k.1l.3n);M.22(\'2b\',k.1l.2X);k.2X(a);k.18(\'9g\',k.J)}a.1t()},2X:m(a){k.4U=K;k.2H.1b=a.1y;I(B z Y k.F.2W){C(!k.F.2W[z])5n;k.1J.1b[z]=k.2H.1b[z]-k.2H.7m[z];C(k.1A[z]){C($1S(k.1A[z][1])&&(k.1J.1b[z]>k.1A[z][1])){k.1J.1b[z]=k.1A[z][1];k.4U=14}T C($1S(k.1A[z][0])&&(k.1J.1b[z]<k.1A[z][0])){k.1J.1b[z]=k.1A[z][0];k.4U=14}}C(k.F.3P[z])k.1J.1b[z]-=(k.1J.1b[z]%k.F.3P[z]);k.J.1r(k.F.2W[z],k.1J.1b[z]+k.F.3k)}k.18(\'7l\',k.J);a.1t()},1t:m(){M.2G(\'2b\',k.1l.3n);M.2G(\'2b\',k.1l.2X);M.2G(\'4N\',k.1l.1t);k.18(\'1v\',k.J)}});3m.2m.2z(G 1M,G 3a);L.N({cY:m(a){o G 3m.2m(k,$1D({2W:{x:\'1U\',y:\'2a\'}},a))}});3m.9i=3m.2m.N({F:{5P:[],1F:K,3N:[]},17:m(a,b){k.2e(b);k.J=$(a);k.5P=$$(k.F.5P);k.1F=$(k.F.1F);k.1K={\'J\':k.J.1H(\'1K\'),\'1F\':K};C(k.1F)k.1K.1F=k.1F.1H(\'1K\');C(![\'5Q\',\'3o\',\'4g\'].1a(k.1K.J))k.1K.J=\'3o\';B c=k.J.1H(\'1j\').2s();B d=k.J.1H(\'1s\').2s();C(k.1K.J==\'3o\'&&![\'5Q\',\'3o\',\'4g\'].1a(k.1K.1F)){c=$1S(c)?c:k.J.8S(k.F.3N);d=$1S(d)?d:k.J.8T(k.F.3N)}T{c=$1S(c)?c:0;d=$1S(d)?d:0}k.J.3z({\'1j\':c,\'1s\':d,\'1K\':k.1K.J});k.1p(k.J)},1f:m(a){k.3Q=1d;C(k.1F){B b=k.1F.3I();B c=k.J.3I();C(k.1K.J==\'3o\'&&![\'5Q\',\'3o\',\'4g\'].1a(k.1K.1F)){k.F.1A={\'x\':[b.1s,b.3D-c.1U],\'y\':[b.1j,b.2P-c.2a]}}T{k.F.1A={\'y\':[0,b.2a-c.2a],\'x\':[0,b.1U-c.1U]}}}k.1p(a)},2X:m(a){k.1p(a);B b=k.4U?K:k.5P.3x(k.9j,k).6p();C(k.3Q!=b){C(k.3Q)k.3Q.18(\'cZ\',[k.J,k]);k.3Q=b?b.18(\'d0\',[k.J,k]):1d}o k},9j:m(a){a=a.3I(k.F.3N);B b=k.2H.1b;o(b.x>a.1s&&b.x<a.3D&&b.y<a.2P&&b.y>a.1j)},1t:m(){C(k.3Q&&!k.4U)k.3Q.18(\'d1\',[k.J,k]);T k.J.18(\'d2\',k);k.1p();o k}});L.N({d3:m(a){o G 3m.9i(k,a)}});B 5R=G U({F:{2l:\'4h\',9k:14,9l:U.1c,4i:U.1c,5S:U.1c,9m:14,7n:\'d4-8\',9n:K,3R:{}},7o:m(){k.1V=(O.5e)?G 5e():(O.26?G 7O(\'d5.d6\'):K);o k},17:m(a){k.7o().2e(a);k.F.4V=k.F.4V||k.4V;k.3R={};C(k.F.9m&&k.F.2l==\'4h\'){B b=(k.F.7n)?\'; d7=\'+k.F.7n:\'\';k.4j(\'9o-R\',\'9p/x-8O-d8-d9\'+b)}C(k.F.17)k.F.17.1w(k)},9q:m(){C(k.1V.4c!=4||!k.4k)o;k.4k=K;B a=0;41{a=k.1V.da}42(e){};C(k.F.4V.1w(k,a))k.4i();T k.5S();k.1V.5L=U.1c},4V:m(a){o((a>=db)&&(a<dc))},4i:m(){k.2Y={\'1I\':k.1V.dd,\'4W\':k.1V.de};k.18(\'4i\',[k.2Y.1I,k.2Y.4W]);k.6m()},5S:m(){k.18(\'5S\',k.1V)},4j:m(a,b){k.3R[a]=b;o k},4X:m(a,b){C(k.F.9n)k.9r();T C(k.4k)o k;k.4k=14;C(b&&k.F.2l==\'4l\'){a=a+(a.1a(\'?\')?\'&\':\'?\')+b;b=1d}k.1V.4f(k.F.2l.6s(),a,k.F.9k);k.1V.5L=k.9q.1g(k);C((k.F.2l==\'4h\')&&k.1V.df)k.4j(\'dg\',\'dh\');$N(k.3R,k.F.3R);I(B c Y k.3R)41{k.1V.di(c,k.3R[c])}42(e){};k.18(\'9l\');k.1V.4X($3X(b,1d));o k},9r:m(){C(!k.4k)o k;k.4k=K;k.1V.70();k.1V.5L=U.1c;k.7o();k.18(\'7f\');o k}});5R.2z(G 6l,G 1M,G 3a);B 9s=5R.N({F:{4Y:1d,7p:1d,1v:U.1c,5T:K,7q:K},17:m(a,b){k.1h(\'4i\',k.1v);k.2e(b);k.F.4Y=k.F.4Y||k.F.dj;C(![\'4h\',\'4l\'].1a(k.F.2l)){k.4Z=\'4Z=\'+k.F.2l;k.F.2l=\'4h\'}k.1p();k.4j(\'X-dk-dl\',\'5e\');k.4j(\'dm\',\'1I/7a, 1I/dn, 9p/4W, 1I/4W, */*\');k.5U=a},1v:m(){C(k.F.7p)$(k.F.7p).1c().4J(k.2Y.1I);C(k.F.5T||k.F.7q)k.5T();k.18(\'1v\',[k.2Y.1I,k.2Y.4W],20)},9t:m(a){a=a||k.F.4Y;1z($R(a)){Q\'J\':a=$(a).4O();1i;Q\'2d\':a=6k.4O(a)}C(k.4Z)a=(a)?[k.4Z,a].1E(\'&\'):k.4Z;o k.4X(k.5U,a)},5T:m(){B a,2Z;C(k.F.7q||(/(dp|dq)2F/).2o(k.9u(\'9o-R\')))2Z=k.2Y.1I;T{2Z=[];B b=/<2F[^>]*>([\\s\\S]*?)<\\/2F>/dr;5h((a=b.ds(k.2Y.1I)))2Z.19(a[1]);2Z=2Z.1E(\'\\n\')}C(2Z)(O.9v)?O.9v(2Z):O.7X(2Z,0)},9u:m(a){41{o k.1V.dt(a)}42(e){};o 1d}});6k.4O=m(a){B b=[];I(B c Y a)b.19(5G(c)+\'=\'+5G(a[c]));o b.1E(\'&\')};L.N({4X:m(a){o G 9s(k.4I(\'du\'),$1D({4Y:k.4O()},a,{2l:\'4h\'})).9t()}});B 31=G 2L({F:{5V:K,5W:K,3j:K,5X:K},1G:m(a,b,c){c=$1D(k.F,c);b=5G(b);C(c.5V)b+=\'; 5V=\'+c.5V;C(c.5W)b+=\'; 5W=\'+c.5W;C(c.3j){B d=G 7M();d.dv(d.7N()+c.3j*24*60*60*93);b+=\'; dw=\'+d.dx()}C(c.5X)b+=\'; 5X\';M.9w=a+\'=\'+b;o $N(c,{\'3G\':a,\'1J\':b})},4l:m(a){B b=M.9w.4C(\'(?:^|;)\\\\s*\'+a.7W()+\'=([^;]*)\');o b?dy(b[1]):K},28:m(a,b){C($R(a)==\'2d\')k.1G(a.3G,\'\',$1D(a,{3j:-1}));T k.1G(a,\'\',$1D(b,{3j:-1}))}});B 33={3y:m(a){1z($R(a)){Q\'2M\':o\'"\'+a.2C(/(["\\\\])/g,\'\\\\$1\')+\'"\';Q\'3s\':o\'[\'+a.1W(33.3y).1E(\',\')+\']\';Q\'2d\':B b=[];I(B c Y a)b.19(33.3y(c)+\':\'+33.3y(a[c]));o\'{\'+b.1E(\',\')+\'}\';Q\'3t\':C(dz(a))1i;Q K:o\'1d\'}o 5c(a)},4r:m(a,b){o(($R(a)!=\'2M\')||(b&&!a.2o(/^("(\\\\.|[^"\\\\\\n\\r])*?"|[,:{}\\[\\]0-9.\\-+dA-u \\n\\r\\t])+?$/)))?1d:dB(\'(\'+a+\')\')}};33.dC=5R.N({17:m(a,b){k.5U=a;k.1h(\'4i\',k.1v);k.1p(b);k.4j(\'X-dD\',\'dE\')},4X:m(a){o k.1p(k.5U,\'dF=\'+33.3y(a))},1v:m(){k.18(\'1v\',[33.4r(k.2Y.1I,k.F.5X)])}});B 9x=G 2L({7a:m(a,b){b=$1D({\'51\':U.1c},b);B c=G L(\'2F\',{\'4K\':a}).5q({\'3e\':b.51,\'dG\':m(){C(k.4c==\'77\')k.18(\'3e\')}});43 b.51;o c.5r(b).1C(M.5d)},1o:m(a,b){o G L(\'dH\',$1D({\'9y\':\'dI\',\'dJ\':\'dK\',\'R\':\'1I/1o\',\'3F\':a},b)).1C(M.5d)},9z:m(c,d){d=$1D({\'51\':U.1c,\'dL\':U.1c,\'dM\':U.1c},d);B e=G dN();e.4K=c;B f=G L(\'dO\',{\'4K\':c});[\'3e\',\'70\',\'8G\'].1e(m(a){B b=d[\'4v\'+a];43 d[\'4v\'+a];f.1h(a,m(){k.3w(a,W.6f);b.1w(k)})});C(e.1U&&e.2a)f.18(\'3e\',f,1);o f.5r(d)},dP:m(c,d){d=$1D({1v:U.1c,9A:U.1c},d);C(!c.19)c=[c];B e=[];B f=0;c.1e(m(a){B b=G 9x.9z(a,{\'51\':m(){d.9A.1w(k,f);f++;C(f==c.P)d.1v()}});e.19(b)});o G 1B(e)}});B 34=G U({P:0,17:m(a){k.1Q=a||{};k.52()},4l:m(a){o(k.5Y(a))?k.1Q[a]:1d},5Y:m(a){o(a Y k.1Q)},1G:m(a,b){C(!k.5Y(a))k.P++;k.1Q[a]=b;o k},52:m(){k.P=0;I(B p Y k.1Q)k.P++;o k},28:m(a){C(k.5Y(a)){43 k.1Q[a];k.P--}o k},1e:m(a,b){$1e(k.1Q,a,b)},N:m(a){$N(k.1Q,a);o k.52()},1D:m(){k.1Q=$1D.36(1d,[k.1Q].N(W));o k.52()},1c:m(){k.1Q={};k.P=0;o k},1Y:m(){B a=[];I(B b Y k.1Q)a.19(b);o a},45:m(){B a=[];I(B b Y k.1Q)a.19(k.1Q[b]);o a}});m $H(a){o G 34(a)};34.31=34.N({17:m(a,b){k.2D=a;k.F=$N({\'9B\':14},b||{});k.3e()},9C:m(){C(k.P==0){31.28(k.2D,k.F);o 14}B a=33.3y(k.1Q);C(a.P>dQ)o K;31.1G(k.2D,a,k.F);o 14},3e:m(){k.1Q=33.4r(31.4l(k.2D),14)||{};k.52()}});34.31.21={};[\'N\',\'1G\',\'1D\',\'1c\',\'28\'].1e(m(a){34.31.21[a]=m(){34.1m[a].36(k,W);C(k.F.9B)k.9C();o k}});34.31.2z(34.31.21);B 29=G U({17:m(a,b){b=b||(a.19?\'2N\':\'9D\');B c,1L;1z(b){Q\'2N\':c=a;1L=c.7r();1i;Q\'1L\':c=a.9E();1L=a;1i;4E:c=a.4D(14);1L=c.7r()}c.1L=1L;c.9D=c.4B();o $N(c,29.1m)},dR:m(){B b=$A(W);B c=($R(b[b.P-1])==\'3t\')?b.dS():50;B d=k.6o();b.1e(m(a){a=G 29(a);I(B i=0;i<3;i++)d[i]=12.1O((d[i]/2t*(2t-c))+(a[i]/2t*c))});o G 29(d,\'2N\')},dT:m(){o G 29(k.1W(m(a){o 4m-a}))},dU:m(a){o G 29([a,k.1L[1],k.1L[2]],\'1L\')},dV:m(a){o G 29([k.1L[0],a,k.1L[2]],\'1L\')},dW:m(a){o G 29([k.1L[0],k.1L[1],a],\'1L\')}});m $dX(r,g,b){o G 29([r,g,b],\'2N\')};m $dY(h,s,b){o G 29([h,s,b],\'1L\')};1R.N({7r:m(){B a=k[0],53=k[1],5Z=k[2];B b,61,7s;B c=12.2B(a,53,5Z),4w=12.4w(a,53,5Z);B d=c-4w;7s=c/4m;61=(c!=0)?d/c:0;C(61==0){b=0}T{B e=(c-a)/d;B f=(c-53)/d;B g=(c-5Z)/d;C(a==c)b=g-f;T C(53==c)b=2+e-g;T b=4+f-e;b/=6;C(b<0)b++}o[12.1O(b*9F),12.1O(61*2t),12.1O(7s*2t)]},9E:m(){B a=12.1O(k[2]/2t*4m);C(k[1]==0){o[a,a,a]}T{B b=k[0]%9F;B f=b%60;B p=12.1O((k[2]*(2t-k[1]))/dZ*4m);B q=12.1O((k[2]*(9G-k[1]*f))/9H*4m);B t=12.1O((k[2]*(9G-k[1]*(60-f)))/9H*4m);1z(12.7L(b/60)){Q 0:o[a,t,p];Q 1:o[q,a,p];Q 2:o[p,a,t];Q 3:o[p,q,a];Q 4:o[t,p,a];Q 5:o[a,p,q]}}o K}});B 9I=G U({F:{54:20,7t:1,62:m(x,y){k.J.2R(x,y)}},17:m(a,b){k.2e(b);k.J=$(a);k.7u=([O,M].1a(a))?$(M.3J):k.J},1f:m(){k.7v=k.9J.2w(k);k.7u.22(\'2b\',k.7v)},1t:m(){k.7u.2G(\'2b\',k.7v);k.1u=$3Z(k.1u)},9J:m(a){k.1y=(k.J==O)?a.8z:a.1y;C(!k.1u)k.1u=k.2k.3b(50,k)},2k:m(){B a=k.J.5H();B b=k.J.2I();B c={\'x\':0,\'y\':0};I(B z Y k.1y){C(k.1y[z]<(k.F.54+b[z])&&a.2k[z]!=0)c[z]=(k.1y[z]-k.F.54-b[z])*k.F.7t;T C(k.1y[z]+k.F.54>(a.3H[z]+b[z])&&a.2k[z]+a.3H[z]!=a.5I[z])c[z]=(k.1y[z]-a.3H[z]+k.F.54-b[z])*k.F.7t}C(c.y||c.x)k.18(\'62\',[a.2k.x+c.x,a.2k.y+c.y])}});9I.2z(G 1M,G 3a);B 7w=G U({F:{62:U.1c,1v:U.1c,7x:m(a){k.4n.1r(k.p,a)},3O:\'7i\',63:2t,1k:0},17:m(a,b,c){k.J=$(a);k.4n=$(b);k.2e(c);k.7y=-1;k.7z=-1;k.2c=-1;k.J.1h(\'4a\',k.9K.2w(k));B d,1k;1z(k.F.3O){Q\'7i\':k.z=\'x\';k.p=\'1s\';d={\'x\':\'1s\',\'y\':K};1k=\'3h\';1i;Q\'7h\':k.z=\'y\';k.p=\'1j\';d={\'x\':K,\'y\':\'1j\'};1k=\'2S\'}k.2B=k.J[1k]-k.4n[1k]+(k.F.1k*2);k.9L=k.4n[1k]/2;k.9M=k.J[\'4l\'+k.p.6t()].1g(k.J);k.4n.1r(\'1K\',\'5Q\').1r(k.p,-k.F.1k);B e={};e[k.z]=[-k.F.1k,k.2B-k.F.1k];k.2X=G 3m.2m(k.4n,{1A:e,2W:d,5N:0,3i:m(){k.64()}.1g(k),7l:m(){k.64()}.1g(k),1v:m(){k.64();k.2y()}.1g(k)});C(k.F.17)k.F.17.1w(k)},1G:m(a){k.2c=a.1A(0,k.F.63);k.65();k.2y();k.18(\'7x\',k.9N(k.2c));o k},9K:m(a){B b=a.1y[k.z]-k.9M()-k.9L;b=b.1A(-k.F.1k,k.2B-k.F.1k);k.2c=k.7A(b);k.65();k.2y();k.18(\'7x\',b)},64:m(){k.2c=k.7A(k.2X.1J.1b[k.z]);k.65()},65:m(){C(k.7y!=k.2c){k.7y=k.2c;k.18(\'62\',k.2c)}},2y:m(){C(k.7z!==k.2c){k.7z=k.2c;k.18(\'1v\',k.2c+\'\')}},7A:m(a){o 12.1O((a+k.F.1k)/k.2B*k.F.63)},9N:m(a){o k.2B*a/k.F.63}});7w.2z(G 1M);7w.2z(G 3a);B e0=15.98.N({17:m(c){k.1p(O,c);k.55=(k.F.55)?$$(k.F.55):$$(M.55);B d=O.79.3F.4C(/^[^#]*/)[0]+\'#\';k.55.1e(m(a){C(a.3F.2A(d)!=0)o;B b=a.3F.5E(d.P);C(b&&$(b))k.9O(a,b)},k);C(!O.6i)k.1h(\'1v\',m(){O.79.e1=k.9P})},9O:m(b,c){b.1h(\'5A\',m(a){k.9P=c;k.6V(c);a.1t()}.2w(k))}});B 9Q=G U({F:{3S:K,3i:U.1c,1v:U.1c,3p:14,5N:3,9R:m(a,b){b.1r(\'1T\',0.7);a.1r(\'1T\',0.7)},9S:m(a,b){a.1r(\'1T\',1);b.28();k.3d.28()}},17:m(a,b){k.2e(b);k.66=$(a);k.1q=k.66.6H();k.3S=(k.F.3S)?$$(k.F.3S):k.1q;k.1l={\'1f\':[],\'56\':k.56.2w(k)};I(B i=0,l=k.3S.P;i<l;i++){k.1l.1f[i]=k.1f.2w(k,k.1q[i])}k.5O();C(k.F.17)k.F.17.1w(k);k.1l.4b=k.4b.2w(k);k.1l.2y=k.2y.1g(k)},5O:m(){k.3S.1e(m(a,i){a.1h(\'4a\',k.1l.1f[i])},k)},9h:m(){k.3S.1e(m(a,i){a.3w(\'4a\',k.1l.1f[i])},k)},1f:m(a,b){k.3T=b;k.7B=k.66.3I();C(k.F.3p){B c=b.2I();k.1k=a.1y.y-c.y;k.3d=G L(\'4e\').1C(M.3J);k.3p=b.83().1C(k.3d).3z({\'1K\':\'3o\',\'1s\':c.x,\'1j\':a.1y.y-k.1k});M.22(\'2b\',k.1l.56);k.18(\'9R\',[b,k.3p])}M.22(\'2b\',k.1l.4b);M.22(\'4N\',k.1l.2y);k.18(\'3i\',b);a.1t()},56:m(a){B b=a.1y.y-k.1k;b=b.1A(k.7B.1j,k.7B.2P-k.3p.2S);k.3p.1r(\'1j\',b);a.1t()},4b:m(a){B b=a.1y.y;k.2u=k.2u||b;B c=((k.2u-b)>0);B d=k.3T.8k();B e=k.3T.6x();C(d&&c&&b<d.3I().2P)k.3T.6A(d);C(e&&!c&&b>e.3I().1j)k.3T.5t(e);k.2u=b},e2:m(b){o k.66.6H().1W(b||m(a){o k.1q.2A(a)},k)},2y:m(){k.2u=1d;M.2G(\'2b\',k.1l.4b);M.2G(\'4N\',k.1l.2y);C(k.F.3p){M.2G(\'2b\',k.1l.56);k.18(\'9S\',[k.3T,k.3p])}k.18(\'1v\',k.3T)}});9Q.2z(G 1M,G 3a);B 9T=G U({F:{9U:m(a){a.1r(\'3A\',\'6E\')},9V:m(a){a.1r(\'3A\',\'3B\')},7C:30,9W:2t,9X:2t,2f:\'e3\',57:{\'x\':16,\'y\':16},4g:K},17:m(a,b){k.2e(b);k.3q=G L(\'4e\',{\'3V\':k.F.2f+\'-e4\',\'6v\':{\'1K\':\'3o\',\'1j\':\'0\',\'1s\':\'0\',\'3A\':\'3B\'}}).1C(M.3J);k.2x=G L(\'4e\').1C(k.3q);$$(a).1e(k.9Y,k);C(k.F.17)k.F.17.1w(k)},9Y:m(b){b.$1x.3r=(b.3F&&b.3C()==\'a\')?b.3F.2C(\'8N://\',\'\'):(b.9y||K);C(b.4o){B c=b.4o.4G(\'::\');C(c.P>1){b.$1x.3r=c[0].4A();b.$1x.58=c[1].4A()}T{b.$1x.58=b.4o}b.8n(\'4o\')}T{b.$1x.58=K}C(b.$1x.3r&&b.$1x.3r.P>k.F.7C)b.$1x.3r=b.$1x.3r.5E(0,k.F.7C-1)+"&e5;";b.1h(\'6Y\',m(a){k.1f(b);C(!k.F.4g)k.7D(a);T k.1K(b)}.1g(k));C(!k.F.4g)b.1h(\'2b\',k.7D.2w(k));B d=k.2y.1g(k);b.1h(\'6Z\',d);b.1h(\'3d\',d)},1f:m(a){k.2x.1c();C(a.$1x.3r){k.4o=G L(\'9Z\').1C(G L(\'4e\',{\'3V\':k.F.2f+\'-4o\'}).1C(k.2x)).4J(a.$1x.3r)}C(a.$1x.58){k.1I=G L(\'9Z\').1C(G L(\'4e\',{\'3V\':k.F.2f+\'-1I\'}).1C(k.2x)).4J(a.$1x.58)}$3Z(k.1u);k.1u=k.3l.2q(k.F.9W,k)},2y:m(a){$3Z(k.1u);k.1u=k.4R.2q(k.F.9X,k)},1K:m(a){B b=a.2I();k.3q.3z({\'1s\':b.x+k.F.57.x,\'1j\':b.y+k.F.57.y})},7D:m(a){B b={\'x\':O.7b(),\'y\':O.7c()};B c={\'x\':O.7d(),\'y\':O.7e()};B d={\'x\':k.3q.3h,\'y\':k.3q.2S};B e={\'x\':\'1s\',\'y\':\'1j\'};I(B z Y e){B f=a.1y[z]+k.F.57[z];C((f+d[z]-c[z])>b[z])f=a.1y[z]-k.F.57[z]-d[z];k.3q.1r(e[z],f)}},3l:m(){C(k.F.a0)k.1u=k.4R.2q(k.F.a0,k);k.18(\'9U\',[k.3q])},4R:m(){k.18(\'9V\',[k.3q])}});9T.2z(G 1M,G 3a);B e6=G U({17:m(){k.67=$A(W);k.V={};k.4p={}},1h:m(b,c){k.4p[b]=k.4p[b]||{};k.V[b]=k.V[b]||[];C(k.V[b].1a(c))o K;T k.V[b].19(c);k.67.1e(m(a,i){a.1h(b,k.3n.1g(k,[b,a,i]))},k);o k},3n:m(b,c,i){k.4p[b][i]=14;B d=k.67.6n(m(a,j){o k.4p[b][j]||K},k);C(!d)o;k.4p[b]={};k.V[b].1e(m(a){a.1w(k,k.67,c)},k)}});B 7E=15.1B.N({F:{7F:U.1c,a1:U.1c,35:0,3l:K,2a:14,1U:K,1T:14,68:K,69:K,2T:K,6a:K},17:m(){B c,25,1q,1F;$1e(W,m(a,i){1z($R(a)){Q\'2d\':c=a;1i;Q\'J\':1F=$(a);1i;4E:B b=$$(a);C(!25)25=b;T 1q=b}});k.25=25||[];k.1q=1q||[];k.1F=$(1F);k.2e(c);k.2u=-1;C(k.F.6a)k.F.2T=14;C($1S(k.F.3l)){k.F.35=K;k.2u=k.F.3l}C(k.F.1f){k.F.35=K;k.F.3l=K}k.2U={};C(k.F.1T)k.2U.1T=\'a2\';C(k.F.1U)k.2U.1U=k.F.69?\'a3\':\'3h\';C(k.F.2a)k.2U.2a=k.F.68?\'a4\':\'4P\';I(B i=0,l=k.25.P;i<l;i++)k.a5(k.25[i],k.1q[i]);k.1q.1e(m(a,i){C(k.F.3l===i){k.18(\'7F\',[k.25[i],a])}T{I(B b Y k.2U)a.1r(b,0)}},k);k.1p(k.1q);C($1S(k.F.35))k.35(k.F.35)},a5:m(a,b,c){a=$(a);b=$(b);B d=k.25.1a(a);B e=k.25.P;k.25.4u(a);k.1q.4u(b);C(e&&(!d||c)){c=$3X(c,e-1);a.6A(k.25[c]);b.5t(a)}T C(k.1F&&!d){a.1C(k.1F);b.1C(k.1F)}B f=k.25.2A(a);a.1h(\'5A\',k.35.1g(k,f));C(k.F.2a)b.3z({\'3E-1j\':0,\'2g-1j\':\'6b\',\'3E-2P\':0,\'2g-2P\':\'6b\'});C(k.F.1U)b.3z({\'3E-1s\':0,\'2g-1s\':\'6b\',\'3E-3D\':0,\'2g-3D\':\'6b\'});b.a2=1;C(k.F.69)b.a3=k.F.69;C(k.F.68)b.a4=k.F.68;b.1r(\'9b\',\'3B\');C(!d){I(B g Y k.2U)b.1r(g,0)}o k},35:m(d){d=($R(d)==\'J\')?k.1q.2A(d):d;C((k.1u&&k.F.2T)||(d===k.2u&&!k.F.6a))o k;k.2u=d;B e={};k.1q.1e(m(a,i){e[i]={};B b=(i!=d)||(k.F.6a&&(a.2S>0));k.18(b?\'a1\':\'7F\',[k.25[i],a]);I(B c Y k.2U)e[i][c]=b?0:a[k.2U[c]]},k);o k.1f(e)},e7:m(a){o k.35(a)}});15.7E=7E;',62,876,'||||||||||||||||||||this||function||return|||||||||||||var|if|||options|new||for|element|false|Element|document|extend|window|length|case|type||else|Class|events|arguments||in||||Math||true|Fx||initialize|fireEvent|push|contains|now|empty|null|each|start|bind|addEvent|break|top|offset|bound|prototype|to|css|parent|elements|setStyle|left|stop|timer|onComplete|call|tmp|page|switch|limit|Elements|inject|merge|join|container|set|getStyle|text|value|position|hsb|Events|event|round|relatedTarget|obj|Array|chk|opacity|width|transport|map|Garbage|keys|style||Methods|addListener|from||togglers|ie||remove|Color|height|mousemove|step|object|setOptions|className|border|el|Event|documentElement|scroll|method|Base|parse|test|getElementsByTagName|delay|create|toInt|100|previous|margin|bindWithEvent|wrapper|end|implement|indexOf|max|replace|name|parentNode|script|removeListener|mouse|getPosition|CSS|Transitions|Abstract|string|rgb|pow|bottom|shared|scrollTo|offsetHeight|wait|effects|iCss|modifiers|drag|response|scripts||Cookie||Json|Hash|display|apply||||Options|periodical|Styles|trash|load|select|getValue|offsetWidth|onStart|duration|unit|show|Drag|check|absolute|ghost|toolTip|myTitle|array|number|webkit|chains|removeEvent|filter|toString|setStyles|visibility|hidden|getTag|right|padding|href|key|size|getCoordinates|body|setNow|increase|compute|overflown|mode|grid|overed|headers|handles|active|htmlElement|class|native|pick|time|clear||try|catch|delete|collect|values||px|target|mousewheel|mousedown|move|readyState|getNow|div|open|fixed|post|onSuccess|setHeader|running|get|255|knob|title|checker|xpath|evaluate|gecko|HTMLElement|include|on|min|parseInt|parseFloat|toLowerCase|trim|rgbToHex|match|hexToRgb|default|unique|split|walk|getProperty|setHTML|src|scrollLeft|scrollTop|mouseup|toQueryString|scrollHeight|property|hide|layout|handle|out|isSuccess|xml|send|data|_method||onload|setLength|green|area|links|moveGhost|offsets|myText|defined|typeof|generic|String|head|XMLHttpRequest|ie6|forEach|while|splice|attempt|getElementById|getElementsBySelector|included|continue|Multi|returns|addEvents|setProperties|setProperty|injectAfter|removeEvents|setMany|currentStyle|Properties|Listeners|code|click|stopPropagation|preventDefault|fix|substr|getElements|encodeURIComponent|getSize|scrollSize|scrollWidth|loaded|onreadystatechange|iTo|snap|attach|droppables|relative|XHR|onFailure|evalScripts|url|domain|path|secure|hasKey|blue||saturation|onChange|steps|draggedKnob|checkStep|list|instances|fixedHeight|fixedWidth|alwaysHide|none|nodeType|RegExp|regexp|callee|Function|random|webkit419|khtml|Object|Chain|callChain|every|copy|getLast|camelCase|charAt|toUpperCase|capitalize|clean|styles|insertBefore|getNext|appendChild|firstChild|injectBefore|concat|hasClass|cssText|visible|Style|getMany|getChildren|hasChild|innerText|disabled|checked|multiple|selected|addEventListener|unload|DOMMouseScroll|pageX|pageY|mouseover|mouseout|toElement|add|NativeEvents|mouseenter|mouseleave|abort|id|getParam|xhtml|getItems|Dom|domready|complete|ie_ready|location|javascript|getWidth|getHeight|getScrollLeft|getScrollTop|onCancel|PI|vertical|horizontal|Transition|compat|onDrag|pos|encoding|setTransport|update|evalResponse|rgbToHsb|brightness|velocity|mousemover|coord|Slider|onTick|previousChange|previousEnd|toStep|coordinates|maxTitleChars|locate|Accordion|onActive|undefined|nodeValue|constructor|slice|Number|floor|Date|getTime|ActiveXObject|ie7|childNodes|createElement|Merge|shift|toFloat|hyphenate|escapeRegExp|setTimeout|tagName|before|after|adopt|removeChild|clone|appendText|addClass|removeClass|setOpacity|zoom|0px|Width|borderShort|Top|Right|Bottom|Left|defaultView|fixStyle|color|getStyles|getPrevious|next|PropertiesIFlag|removeAttribute|innerHTML|styleSheet|textContent|removeEventListener|beforeunload|extended|wheelDelta|which|keydown|clientX|clientY|client|pageXOffset|pageYOffset|fixRelatedTarget|relatedTargetGecko|cloneEvents|change|error|filterByClass|filterById|filterByAttribute|getElement|resolver|normal|http|www|input|textarea|getFormElements|getTop|getLeft|opera|clientWidth|clientHeight|getScrollWidth|getScrollHeight|transition|cos|fps|delta|1000|Single|iNow|iParsed|iFrom|Scroll|wheelStops|full|overflow|slideIn|slideOut|sin|onBeforeStart|onSnap|detach|Move|checkAgainst|async|onRequest|urlEncoded|autoCancel|Content|application|onStateChange|cancel|Ajax|request|getHeader|execScript|cookie|Asset|rel|image|onProgress|autoSave|save|hex|hsbToRgb|360|6000|600000|Scroller|getCoords|clickedElement|half|getPos|toPosition|useLink|anchor|Sortables|onDragStart|onDragComplete|Tips|onShow|onHide|showDelay|hideDelay|build|span|timeout|onBackground|fullOpacity|fullWidth|fullHeight|addSection|MooTools|version|nodeName|textnode|whitespace|item|collection|clearTimeout|clearInterval|Window|Document|all|navigator|taintEnabled|webkit420|getBoxObjectFor|iframe|DOMElement|execCommand|BackgroundImageCache|chain|clearChain|some|associate|getRandom|transparent|setInterval|err|pass|bindAsEventListener|times|embed|boolean|properties|injectInside|injectTop|cloneNode|replaceWith|replaceChild|createTextNode|toggleClass|float|styleFloat|cssFloat|zIndex|hasLayout|alpha|getComputedStyle|getPropertyValue|Sibling|getFirst|lastChild|getParent|getAttribute|attributes|removeProperty|getProperties|setAttribute|setText|getText|borderWidth|borderStyle|borderColor|htmlFor|colspan|colSpan|rowspan|rowSpan|accesskey|accessKey|tabindex|tabIndex|maxlength|maxLength|readonly|readOnly|frameborder|frameBorder|attachEvent|detachEvent|CollectGarbage|srcElement|shiftKey|control|ctrlKey|alt|altKey|meta|metaKey|wheel|120|detail|keyCode|111|fromCharCode|menu|rightClick|button|fromElement|cancelBubble|returnValue|enter|up|down|esc|space|backspace|tab|dblclick|keypress|keyup|resize|focus|blur|submit|reset|contextmenu|filterByTag|ES|namespaceURI|starts|with|substring|XPathResult|UNORDERED_NODE_SNAPSHOT_TYPE|snapshotLength|snapshotItem|w3|org|1999|getElementsByClassName|checkbox|radio|password|offsetLeft|offsetTop|offsetParent|protocol|https|void|write|defer|DOMContentLoaded|onDomReady|innerWidth|innerHeight|500|custom|clearTimer|effect|toTop|toBottom|toLeft|toRight|Slide|toggle|easeIn|easeOut|easeInOut|linear|In|Out|InOut|ease|Pow|Expo|Circ|acos|Sine|Back|618|Bounce|Elastic|Quad|Cubic|Quart|Quint|sqrt|makeResizable|leave|over|drop|emptydrop|makeDraggable|utf|Microsoft|XMLHTTP|charset|form|urlencoded|status|200|300|responseText|responseXML|overrideMimeType|Connection|close|setRequestHeader|postBody|Requested|With|Accept|html||ecma|java|gi|exec|getResponseHeader|action|setTime|expires|toGMTString|decodeURIComponent|isFinite|Eaeflnr|eval|Remote|Request|JSON|json|readystatechange|link|stylesheet|media|screen|onabort|onerror|Image|img|images|4096|mix|pop|invert|setHue|setSaturation|setBrightness|RGB|HSB|10000|SmoothScroll|hash|serialize|tool|tip|hellip|Group|showThisHideOpen'.split('|'),0,{}))/*
    This file is part of JonDesign's SmoothGallery v1.0.1.

    JonDesign's SmoothGallery is free software; you can redistribute it and/or modify
    it under the terms of the GNU General Public License as published by
    the Free Software Foundation; either version 2 of the License, or
    (at your option) any later version.

    JonDesign's SmoothGallery is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.

    You should have received a copy of the GNU General Public License
    along with JonDesign's SmoothGallery; if not, write to the Free Software
    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA

    Main Developer: Jonathan Schemoul (JonDesign: www.jondesign.net/)
    Contributed code by:
    - Christian Ehret (bugfix)
	- Nitrix (bugfix)
	- Valerio from Mad4Milk for his great help with the carousel scrolling and many other things.
	- Archie Cowan for helping me find a bugfix on carousel inner width problem.
	Many thanks to:
	- The mootools team for the great mootools lib, and it's help and support throughout the project.
*/


var $removeEvents = function (object, type)
{
	if (!object.events) return object;
	if (type){
		if (!object.events[type]) return object;
		for (var fn in object.events[type]) object.removeEvent(type, fn);
		object.events[type] = null;
	} else {
		for (var evType in object.events) object.removeEvents(evType);
		object.events = null;
	}
	return object;
};
		
		
// declaring the class
var gallery = new Class({
	initialize: function(element, options) {
		this.setOptions({
			messagetext: "Bitte klicken Sie auf die Farbfelder &gt;&gt;",
			showArrows: true,
			showCarousel: true,
			showInfopane: true,
			thumbHeight: 17,
			thumbWidth: 17,
			thumbSpacing: 2,
			embedLinks: true,
			fadeDuration: 500,
			timed: false,
			delay: 9000,
			preloader: true,
			manualData: [],
			populateData: true,
			elementSelector: "div.imageElement",
			titleSelector: "h3",
			subtitleSelector: "p",
			linkSelector: "a.open",
			imageSelector: "img.full",
			thumbnailSelector: "img.thumbnail",
			slideInfoZoneOpacity: 0.8,
			carouselMinimizedOpacity: 0.9,
			carouselMinimizedHeight: 20,
			carouselMaximizedOpacity: 0.9, 
			destroyAfterPopulate: true,
			baseClass: 'jdGallery',
			withArrowsClass: 'withArrows',
			textShowCarousel: 'Pictures',
			useThumbGenerator: false,
			thumbGenerator: 'resizer.php'
		}, options);
		this.fireEvent('onInit');
		this.currentIter = 0;
		this.lastIter = 0;
		this.maxIter = 0;
		this.galleryElement = element;
		this.galleryData = this.options.manualData;
		this.galleryInit = 1;
		this.galleryElements = Array();
		this.thumbnailElements = Array();
		this.galleryElement.addClass(this.options.baseClass);
		if (this.options.populateData)
			this.populateData();
		element.style.display="block";
		
		if (this.options.embedLinks)
		{
			this.currentLink = new Element('a').addClass('open').setProperties({
				href: '#',
				title: ''
			}).injectInside(element);
			if ((!this.options.showArrows) && (!this.options.showCarousel))
				this.galleryElement = element = this.currentLink;
			else
				this.currentLink.setStyle('display', 'none');
		}
		
		this.constructElements();
		if ((data.length>1)&&(this.options.showArrows))
		{
			var leftArrow = new Element('a').addClass('left').addEvent(
				'click',
				this.prevItem.bind(this)
			).injectInside(element);
			var rightArrow = new Element('a').addClass('right').addEvent(
				'click',
				this.nextItem.bind(this)
			).injectInside(element);
			this.galleryElement.addClass(this.options.withArrowsClass);
		}
		this.loadingElement = new Element('div').addClass('loadingElement').injectInside(element);
		if (this.options.showInfopane) this.initInfoSlideshow();
		if (this.options.showCarousel) this.initCarousel();
		this.doSlideShow(1);
	},
	populateData: function() {
		currentArrayPlace = this.galleryData.length;
		options = this.options;
		data = this.galleryData;
		this.galleryElement.getElements(options.elementSelector).each(function(el) {
			elementDict = {
				image: el.getElement(options.imageSelector).getProperty('src'),
				number: currentArrayPlace
			};
			if ((options.showInfopane) | (options.showCarousel))
				Object.extend(elementDict, {
					title: el.getElement(options.titleSelector).innerHTML,
					description: el.getElement(options.subtitleSelector).innerHTML
				});
			if (options.embedLinks)
				Object.extend(elementDict, {
					link: el.getElement(options.linkSelector).href||false,
					linkTitle: el.getElement(options.linkSelector).title||false
				});
			if ((!options.useThumbGenerator) && (options.showCarousel))
				Object.extend(elementDict, {
					thumbnail: el.getElement(options.thumbnailSelector).src
				});
			else if (options.useThumbGenerator)
				Object.extend(elementDict, {
					thumbnail: 'resizer.php?imgfile=' + elementDict.image + '&max_width=' + options.thumbWidth + '&max_height=' + options.thumbHeight
				});
			
			data[currentArrayPlace] = elementDict;
			currentArrayPlace++;
			if (this.options.destroyAfterPopulate)
				el.remove();
		});
		this.galleryData = data;
		this.fireEvent('onPopulated');
	},
	constructElements: function() {
		el = this.galleryElement;
		this.maxIter = this.galleryData.length;
		var currentImg;
		for(i=0;i<this.galleryData.length;i++)
		{
			var currentImg = new Fx.Style(
				new Element('div').addClass('slideElement').setStyles({
					'position':'absolute',
					'left':'0px',
					'right':'0px',
					'margin':'0px',
					'padding':'0px',
					'backgroundImage':"url('" + this.galleryData[i].image + "')",
					'backgroundPosition':"center center",
					'opacity':'0'
				}).injectInside(el),
				'opacity',
				{duration: this.options.fadeDuration}
			);
			this.galleryElements[parseInt(i)] = currentImg;
		}
	},
	destroySlideShow: function(element) {
		var myClassName = element.className;
		var newElement = new Element('div').addClass('myClassName');
		element.parentNode.replaceChild(newElement, element);
	},
	startSlideShow: function() {
		this.fireEvent('onStart');
		this.loadingElement.style.display = "none";
		this.lastIter = this.maxIter - 1;
		this.currentIter = 0;
		this.galleryInit = 0;
		this.galleryElements[parseInt(this.currentIter)].set(1);
		if (this.options.showInfopane)
			this.showInfoSlideShow.delay(1000, this);
		this.prepareTimer();
		if (this.options.embedLinks)
			this.makeLink(this.currentIter);
	},
	nextItem: function() {
		this.fireEvent('onNextCalled');
		this.nextIter = this.currentIter+1;
		if (this.nextIter >= this.maxIter)
			this.nextIter = 0;
		this.galleryInit = 0;
		this.goTo(this.nextIter);
	},
	prevItem: function() {
		this.fireEvent('onPreviousCalled');
		this.nextIter = this.currentIter-1;
		if (this.nextIter <= -1)
			this.nextIter = this.maxIter - 1;
		this.galleryInit = 0;
		this.goTo(this.nextIter);
	},
	goTo: function(num) {
		this.clearTimer();
		if (this.options.embedLinks)
			this.clearLink();
		if (this.options.showInfopane)
		{
			this.slideInfoZone.clearChain();
			this.hideInfoSlideShow().chain(this.changeItem.pass(num, this));
		} else
			this.changeItem.delay(500, this, num);
		if (this.options.embedLinks)
			this.makeLink(num);
		this.prepareTimer();
		/*if (this.options.showCarousel)
			this.clearThumbnailsHighlights();*/
	},
	changeItem: function(num) {
		this.fireEvent('onStartChanging');
		this.galleryInit = 0;
		if (this.currentIter != num)
		{
			for(i=0;i<this.maxIter;i++)
			{
				if ((i != this.currentIter)) this.galleryElements[i].set(0);
			}
			if (num > this.currentIter) this.galleryElements[num].custom(1);
			else
			{
				this.galleryElements[num].set(1);
				this.galleryElements[this.currentIter].custom(0);
			}
			this.currentIter = num;
		}
		this.doSlideShow.bind(this)();
		this.fireEvent('onChanged');
	},
	clearTimer: function() {
		if (this.options.timed)
			$clear(this.timer);
	},
	prepareTimer: function() {
		if (this.options.timed)
			this.timer = this.nextItem.delay(this.options.delay, this);
	},
	doSlideShow: function(position) {
		if (this.galleryInit == 1)
		{
			imgPreloader = new Image();
			imgPreloader.onload=function(){
				this.startSlideShow.delay(10, this);
			}.bind(this);
			imgPreloader.src = this.galleryData[0].image;
		} else {
			if (this.options.showInfopane)
			{
				if (this.options.showInfopane)
				{
					this.showInfoSlideShow.delay((500 + this.options.fadeDuration), this);
				} else
					if (this.options.showCarousel)
						this.centerCarouselOn(position);
			}
		}
	},
	initCarousel: function () {
		var carouselContainerElement = new Element('div').addClass('carouselContainer').injectInside(this.galleryElement);
		this.carouselContainer = new Fx.Styles(carouselContainerElement, {transition: Fx.Transitions.expoOut});
		this.carouselContainer.normalHeight = carouselContainerElement.offsetHeight;
		this.carouselContainer.set({'opacity': this.options.carouselMinimizedOpacity, 'top': (this.options.carouselMinimizedHeight - this.carouselContainer.normalHeight)});
		
		this.carouselBtn = new Element('a').addClass('carouselBtn').setProperties({
			title: this.options.textShowCarousel
		}).setHTML(this.options.textShowCarousel).injectInside(carouselContainerElement);
		
		this.toggleCarousel(); // gleich beim Aufruf aufklappen
		this.carouselBtn.addEvent(
			'click',
			function () {
				this.carouselContainer.clearTimer();
				this.toggleCarousel();
			}.bind(this)
		);
		this.carouselActive = false;

		var carouselElement = new Element('div').addClass('carousel').injectInside(carouselContainerElement);
		this.carousel = new Fx.Styles(carouselElement);
		
		this.carouselLabel = new Element('p').addClass('label').injectInside(this.carousel.element);
		this.carouselWrapper = new Element('div').addClass('carouselWrapper').injectInside(this.carousel.element);
		this.carouselInner = new Element('div').addClass('carouselInner').injectInside(this.carouselWrapper);

		this.carouselWrapper.scroller = new Scroller(this.carouselWrapper, {
			area: 100,
			velocity: 0.2
		})
		
		this.carouselWrapper.elementScroller = new Fx.Scroll(this.carouselWrapper, {
			duration: 400,
			onStart: this.carouselWrapper.scroller.stop.bind(this.carouselWrapper.scroller),
			onComplete: this.carouselWrapper.scroller.start.bind(this.carouselWrapper.scroller)
		});

		this.constructThumbnails();
		/* this.carouselInner.style.width = ((this.maxIter * (this.options.thumbWidth + this.options.thumbSpacing)) - this.options.thumbSpacing + this.options.thumbWidth)+6 + "px"; */
		this.carouselInner.style.width = ((this.maxIter * (this.options.thumbWidth + this.options.thumbSpacing)) - this.options.thumbSpacing + this.options.thumbWidth)+6 + "px";
	},
	toggleCarousel: function() {
		if (this.carouselActive)
			this.hideCarousel();
		else
			this.showCarousel();
	},
	showCarousel: function () {
		this.fireEvent('onShowCarousel');
		this.carouselContainer.custom({
			'opacity': this.options.carouselMaximizedOpacity,
			'top': 0
		}).addEvent('onComplete', function() { this.carouselActive = true; this.carouselWrapper.scroller.start(); }.bind(this));
	},
	hideCarousel: function () {
		this.fireEvent('onHideCarousel');
		this.carouselContainer.custom({
			'opacity': this.options.carouselMinimizedOpacity,
			'top': (this.options.carouselMinimizedHeight - this.carouselContainer.normalHeight)
		}).addEvent('onComplete', function() { this.carouselActive = false; this.carouselWrapper.scroller.stop(); }.bind(this));
	},
	constructThumbnails: function () {
					$(this.carouselLabel).setHTML('<span class="number">' + options.messagetext + '</span>');
		element = this.carouselInner;
		for(i=0;i<this.galleryData.length;i++)
		{
			var currentImg = new Fx.Style(new Element ('div').addClass("thumbnail").setStyles({
					backgroundImage: "url('" + this.galleryData[i].thumbnail + "')",
					backgroundPosition: "center center",
					backgroundRepeat: 'no-repeat',
					marginLeft: this.options.thumbSpacing + "px",
					width: this.options.thumbWidth + "px",
					height: this.options.thumbHeight + "px"
				}).injectInside(element), "opacity", {duration: 200}).set(1.0);
			currentImg.element.addEvents({
				'mouseover': function (myself) {
					myself.clearTimer();
					myself.custom(1.0);
				//	$(this.carouselLabel).setHTML('<span class="number">' + options.messagetext + '</span>');
				}.pass(currentImg, this),
				'mouseout': function (myself) {
					myself.clearTimer();
					myself.custom(1.0);
				}.pass(currentImg, this),
				'click': function (myself) {
					this.goTo(myself.relatedImage.number);
				}.pass(currentImg, this)
			});
			
			currentImg.relatedImage = this.galleryData[i];
			this.thumbnailElements[parseInt(i)] = currentImg;
		}
	},
	clearThumbnailsHighlights: function()
	{
		for(i=0;i<this.galleryData.length;i++)
		{
			this.thumbnailElements[i].clearTimer();
			this.thumbnailElements[i].custom(0.2);
		}
	},
	centerCarouselOn: function(num) {
		var carouselElement = this.thumbnailElements[num];
		var position = carouselElement.element.offsetLeft + (carouselElement.element.offsetWidth / 2);
		var carouselWidth = this.carouselWrapper.offsetWidth;
		var carouselInnerWidth = this.carouselInner.offsetWidth;
		var diffWidth = carouselWidth / 2;
		var scrollPos = position-diffWidth;
		this.carouselWrapper.elementScroller.scrollTo(scrollPos,0);
	},
	initInfoSlideshow: function() {
		/*if (this.slideInfoZone.element)
			this.slideInfoZone.element.remove();*/
		this.slideInfoZone = new Fx.Styles(new Element('div').addClass('slideInfoZone').injectInside($(this.galleryElement))).set({'opacity':0});
		var slideInfoZoneTitle = new Element('h2').injectInside(this.slideInfoZone.element);
		var slideInfoZoneDescription = new Element('p').injectInside(this.slideInfoZone.element);
		this.slideInfoZone.normalHeight = this.slideInfoZone.element.offsetHeight;
		this.slideInfoZone.element.setStyle('opacity',0);
	},
	changeInfoSlideShow: function()
	{
		this.hideInfoSlideShow.delay(10, this);
		this.showInfoSlideShow.delay(500, this);
	},
	showInfoSlideShow: function() {
		this.fireEvent('onShowInfopane');
		this.slideInfoZone.clearTimer();
		element = this.slideInfoZone.element;
		element.getElement('h2').setHTML(this.galleryData[this.currentIter].title);
		element.getElement('p').setHTML(this.galleryData[this.currentIter].description);
		this.slideInfoZone.custom({'opacity': [0, this.options.slideInfoZoneOpacity], 'height': [0, this.slideInfoZone.normalHeight]});
		if (this.options.showCarousel)
			this.slideInfoZone.chain(this.centerCarouselOn.pass(this.currentIter, this));
		return this.slideInfoZone;
	},
	hideInfoSlideShow: function() {
		this.fireEvent('onHideInfopane');
		this.slideInfoZone.clearTimer();
		this.slideInfoZone.custom({'opacity': 0, 'height': 0});
		return this.slideInfoZone;
	},
	makeLink: function(num) {
		this.currentLink.setProperties({
			href: this.galleryData[num].link,
			title: this.galleryData[num].linkTitle
		})
		if (!((this.options.embedLinks) && (!this.options.showArrows) && (!this.options.showCarousel)))
			this.currentLink.setStyle('display', 'block');
	},
	clearLink: function() {
		this.currentLink.setProperties({href: '', title: ''});
		if (!((this.options.embedLinks) && (!this.options.showArrows) && (!this.options.showCarousel)))
			this.currentLink.setStyle('display', 'none');
	}
});
gallery.implement(new Events);
gallery.implement(new Options);

/* All code copyright 2006 Jonathan Schemoul */infotext_is_displayed = 1;
function removeText() {
	if (infotext_is_displayed==1)
	{
		document.suche.suchbegriff.value = "";
		document.suche.suchbegriff.style.color = "#000000";
		infotext_is_displayed = 0;
	}
}

function checkForm() {
	if(document.suche.suchbegriff.value == "" || document.suche.suchbegriff.value == "Suchbegriff eingeben" || document.suche.suchbegriff.value == null)
	{
		alert("Bitte geben Sie einen Suchbegriff ein.");
		return false;
	}
	return true;
}


function openit(addr,h,b) {
	window.open("/bild/showpic.php?url="+addr, "open","width="+b+",height="+h+", scrollbars=0");
}


/* PNG-Fix für IE >= 5.5 */
function correctPNG() // correctly handle PNG transparency in Win IE 5.5 or higher.
   {
   for(var i=0; i<document.images.length; i++)
      {
      var img = document.images[i]
      var imgName = img.src.toUpperCase()
      if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
         {
         var imgID = (img.id) ? "id='" + img.id + "' " : ""
         var imgClass = (img.className) ? "class='" + img.className + "' " : ""
         var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
         var imgStyle = "display:inline-block;" + img.style.cssText
         if (img.align == "left") imgStyle = "float:left;" + imgStyle
         if (img.align == "right") imgStyle = "float:right;" + imgStyle
         if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
         var strNewHTML = "<span " + imgID + imgClass + imgTitle
         + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
         + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
         + "(src=\'" + img.src + "\', sizingMethod='scale');\"></span>"
         img.outerHTML = strNewHTML
         i = i-1
         }
      }
   }
if(window.ie == true) {
    window.attachEvent("onload", correctPNG);
}

/* Milieu-Tool */
function add_overlay(obj,x,y,mid) {
    if(window.ie == true) {
        var suffix = ".gif";
    } else {
        var suffix = ".png";
    }

    var filename = "circle"+suffix;

    var top = $(obj).getTop()+parseInt(y)-19;
    var left = $(obj).getLeft()+parseInt(x)-19;
    var fxMid = new Fx.Styles($(mid), {duration:200, wait:false});
    new Element('img', {
        'styles': {
			'opacity': 0.5,
            'position': 'absolute',
            'top': top,
            'left': left,
            'cursor': 'pointer'
        },
        'events': {
            'mouseenter': function(){
                fxMid.start({
                    'opacity': 1
                });
            }
        },
        'src': 'http://www.allnatura.de/bild/'+filename,
        'id': 'circle_'+mid,
        'class': 'noprint'
    }).injectInside($E('body'));
    $(mid).setStyles({
        'opacity': '0',
        'display': 'block',
        'top': top-19-50,
        'left': left-19
    }).injectInside($E('body'));
    $(mid).addEvents({
            'mouseleave': function(){
                fxMid.start({
                    'opacity': 0
                });
            }});
    // Faden lassen
    var fx_fade = function() {
        new Fx.Styles($('circle_'+mid), {duration:1600, wait:true}).start({'opacity': 0.01}).chain(function(){new Fx.Styles($('circle_'+mid), {duration:1600, wait:true}).start({'opacity': 0.8})});
    }
    fx_fade.periodical(3600);

}
function platziere_overlay(obj,x,y,mid) {
    var top = $(obj).getTop()+parseInt(y)-19;
    var left = $(obj).getLeft()+parseInt(x)-19;

    $('circle_'+mid).setStyles({
        'top': top,
        'left': left
    });

    //if(window.ie == true) var left = left-$('container').getLeft();
    $(mid).setStyles({
        'top': top-19-50,
        'left': left-19
    });
}

function setBookmark (where) { 
	burl = encodeURIComponent(location.href); 
	btitle = encodeURIComponent(document.title); 
	switch(where) { 
		case 'Delicious': window.open('http://del.icio.us/post?url='+burl+'&title='+btitle); break; 
		case 'Digg': window.open('http://digg.com/submit?phase=2&url='+burl+'&title='+btitle); break; 
		case 'Furl': window.open('http://www.furl.net/storeIt.jsp?u='+burl+'&t='+btitle); break; 
		case 'Linkarena': window.open('http://linkarena.com/bookmarks/addlink/?url='+burl+'&title='+btitle); break; 
		case 'Mrwong': window.open('http://www.mister-wong.de/index.php?action=addurl&bm_url='+burl+'&bm_notice=&bm_description='+btitle); break;
		case 'Reddit': window.open('http://reddit.com/submit?url='+burl+'&title='+btitle); break; 
		case 'Slashdot': window.open('http://slashdot.org/bookmark.pl?url='+burl+'&title='+btitle); break; 
		case 'Spurl': window.open('http://www.spurl.net/spurl.php?title='+btitle+'&url='+burl); break; 
		case 'Stumbleupon': window.open('http://www.stumbleupon.com/submit?url='+burl+'&title='+btitle); break; 
		case 'Technorati': window.open('http://technorati.com/faves?add='+burl); break; 
		case 'Webnews': window.open('http://www.webnews.de/einstellen?url='+burl+'&title='+btitle); break; 
		case 'Yigg': window.open('http://yigg.de/neu?exturl='+burl); break; 
	} 
}

function check() {
	if (document.getElementById('mod').value == "" || document.getElementById('mod').value == null) {
		alert("Sie müssen eine Länge angeben um den Teppich in den Warenkorb legen zu können.");
		document.getElementById('mod').focus();
		return false;
	}
}

function zahl() {
	var zahl = document.getElementById('mod');
	for (var i = 0; i < zahl.value.length; i++) {
		var z = zahl.value.substring(i, i + 1);
		if (z < "0" || "9" < z)  {
			var zahl2 = zahl.value.substring(0, zahl.value.length-1);
			zahl.value = zahl2;
			zahl.focus();
			return false;
		}
	}
}

function runden(x) {
	var k = (Math.round(x * 100) / 100).toString();
	k += (k.indexOf('.') == -1)? '.00' : '00';
	var p = k.indexOf('.'), m = k.indexOf('-.');
	var f = (p == 0 || m == 0)? '0,' : ',';
	return k.substring(0, p) + f + k.substring(p+1, p+3);
}

function calc(qmpreis_value) {
	var selObj			= document.getElementById('dropdown1');
	var selIndex 		= selObj.selectedIndex;
	var rollenbreite 	= selObj.options[selObj.selectedIndex].text.replace(/cm/g,"");
	var laenge 			= document.getElementById('mod').value.replace(/[^\d]/g,'');

	if (laenge.length==0 || laenge==null) { 
		alert("Geben Sie bitte die gewünschte Länge in Zentimetern ein!"); 
	} else { 
		var qm = ((laenge * rollenbreite) /10000);
		var summe = (qm * qmpreis_value);
		document.orderform.price.value = runden(summe); 
	}
	return true;
}

function checkArticleConfig() {
	if (document.getElementById('mod').value == '') {
		alert("Bitte geben Sie eine Länge ein.");
		return false;
	}
	return true;
}

function urldecode (str) {
    // http://kevin.vanzonneveld.net
    // +   original by: Philip Peterson
    // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +      input by: AJ
    // +   improved by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: Brett Zamir (http://brett-zamir.me)
    // +      input by: travc
    // +      input by: Brett Zamir (http://brett-zamir.me)
    // +   bugfixed by: Kevin van Zonneveld (http://kevin.vanzonneveld.net)
    // +   improved by: Lars Fischer
    // +      input by: Ratheous
    // +   improved by: Orlando
    // %        note 1: info on what encoding functions to use from: http://xkr.us/articles/javascript/encode-compare/
    // *     example 1: urldecode('Kevin+van+Zonneveld%21');
    // *     returns 1: 'Kevin van Zonneveld!'
    // *     example 2: urldecode('http%3A%2F%2Fkevin.vanzonneveld.net%2F');
    // *     returns 2: 'http://kevin.vanzonneveld.net/'
    // *     example 3: urldecode('http%3A%2F%2Fwww.google.nl%2Fsearch%3Fq%3Dphp.js%26ie%3Dutf-8%26oe%3Dutf-8%26aq%3Dt%26rls%3Dcom.ubuntu%3Aen-US%3Aunofficial%26client%3Dfirefox-a');
    // *     returns 3: 'http://www.google.nl/search?q=php.js&ie=utf-8&oe=utf-8&aq=t&rls=com.ubuntu:en-US:unofficial&client=firefox-a'
    
    var hash_map = {}, ret = str.toString(), unicodeStr='', hexEscStr='';
    
    var replacer = function (search, replace, str) {
        var tmp_arr = [];
        tmp_arr = str.split(search);
        return tmp_arr.join(replace);
    };
    
    // The hash_map is identical to the one in urlencode.
    hash_map["'"]   = '%27';
    hash_map['(']   = '%28';
    hash_map[')']   = '%29';
    hash_map['*']   = '%2A';
    hash_map['~']   = '%7E';
    hash_map['!']   = '%21';
    hash_map['%20'] = '+';
    hash_map['\u00DC'] = '%DC';
    hash_map['\u00FC'] = '%FC';
    hash_map['\u00C4'] = '%D4';
    hash_map['\u00E4'] = '%E4';
    hash_map['\u00D6'] = '%D6';
    hash_map['\u00F6'] = '%F6';
    hash_map['\u00DF'] = '%DF';
    hash_map['\u20AC'] = '%80';
    hash_map['\u0081'] = '%81';
    hash_map['\u201A'] = '%82';
    hash_map['\u0192'] = '%83';
    hash_map['\u201E'] = '%84';
    hash_map['\u2026'] = '%85';
    hash_map['\u2020'] = '%86';
    hash_map['\u2021'] = '%87';
    hash_map['\u02C6'] = '%88';
    hash_map['\u2030'] = '%89';
    hash_map['\u0160'] = '%8A';
    hash_map['\u2039'] = '%8B';
    hash_map['\u0152'] = '%8C';
    hash_map['\u008D'] = '%8D';
    hash_map['\u017D'] = '%8E';
    hash_map['\u008F'] = '%8F';
    hash_map['\u0090'] = '%90';
    hash_map['\u2018'] = '%91';
    hash_map['\u2019'] = '%92';
    hash_map['\u201C'] = '%93';
    hash_map['\u201D'] = '%94';
    hash_map['\u2022'] = '%95';
    hash_map['\u2013'] = '%96';
    hash_map['\u2014'] = '%97';
    hash_map['\u02DC'] = '%98';
    hash_map['\u2122'] = '%99';
    hash_map['\u0161'] = '%9A';
    hash_map['\u203A'] = '%9B';
    hash_map['\u0153'] = '%9C';
    hash_map['\u009D'] = '%9D';
    hash_map['\u017E'] = '%9E';
    hash_map['\u0178'] = '%9F';
    hash_map['\u00C6'] = '%C3%86';
    hash_map['\u00D8'] = '%C3%98';
    hash_map['\u00C5'] = '%C3%85';
 
    for (unicodeStr in hash_map) {
        hexEscStr = hash_map[unicodeStr]; // Switch order when decoding
        ret = replacer(hexEscStr, unicodeStr, ret); // Custom replace. No regexing
    }
    
    // End with decodeURIComponent, which most resembles PHP's encoding functions
    ret = decodeURIComponent(ret);
 
    return ret;
}

function gup( name ) {
  name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
  var regexS = "[\\?&]"+name+"=([^&#]*)";
  var regex = new RegExp( regexS );
  var results = regex.exec( window.location.href );
  if( results == null )
    return "";
  else
    return urldecode(results[1]);
}
//***********************************************************************************************************************************/
//	LyteBox v3.22
//
//	 Author: Markus F. Hay
//  Website: http://www.dolem.com/lytebox
//	   Date: October 2, 2007
//	License: Creative Commons Attribution 3.0 License (http://creativecommons.org/licenses/by/3.0/)
// Browsers: Tested successfully on WinXP with the following browsers (using no DOCTYPE and Strict/Transitional/Loose DOCTYPES):
//				* Firefox: 2.0.0.7, 1.5.0.12
//				* Internet Explorer: 7.0, 6.0 SP2, 5.5 SP2
//				* Opera: 9.23
//
// Releases: For up-to-date and complete release information, visit http://www.dolem.com/forum/showthread.php?tid=62
//				* v3.22 (10/02/07)
//				* v3.21 (09/30/07)
//				* v3.20 (07/12/07)
//				* v3.10 (05/28/07)
//				* v3.00 (05/15/07)
//				* v2.02 (11/13/06)
//
//   Credit: LyteBox was originally derived from the Lightbox class (v2.02) that was written by Lokesh Dhakar. For more
//			 information please visit http://huddletogether.com/projects/lightbox2/
//***********************************************************************************************************************************/
Array.prototype.removeDuplicates = function () { for (var i = 1; i < this.length; i++) { if (this[i][0] == this[i-1][0]) { this.splice(i,1); } } }
Array.prototype.empty = function () { for (var i = 0; i <= this.length; i++) { this.shift(); } }
String.prototype.trim = function () { return this.replace(/^\s+|\s+$/g, ''); }
 
function LyteBox() {
	/*** Start Global Configuration ***/
		this.theme				= 'green';	// themes: grey (default), red, green, blue, gold
		this.hideFlash			= true;		// controls whether or not Flash objects should be hidden
		this.outerBorder		= true;		// controls whether to show the outer grey (or theme) border
		this.resizeSpeed		= 9;		// controls the speed of the image resizing (1=slowest and 10=fastest)
		this.maxOpacity			= 8;		// higher opacity = darker overlay, lower opacity = lighter overlay
		this.navType			= 1;		// 1 = "Prev/Next" buttons on top left and left (default), 2 = "<< prev | next >>" links next to image number
		this.autoResize			= true;		// controls whether or not images should be resized if larger than the browser window dimensions
		this.doAnimations		= true;		// controls whether or not "animate" Lytebox, i.e. resize transition between images, fade in/out effects, etc.
		
		this.borderSize			= 12;		// if you adjust the padding in the CSS, you will need to update this variable -- otherwise, leave this alone...
	/*** End Global Configuration ***/
	
	/*** Configure Slideshow Options ***/
		this.slideInterval		= 4000;		// Change value (milliseconds) to increase/decrease the time between "slides" (10000 = 10 seconds)
		this.showNavigation		= false;		// true to display Next/Prev buttons/text during slideshow, false to hide
		this.showClose			= true;		// true to display the Close button, false to hide
		this.showDetails		= true;		// true to display image details (caption, count), false to hide
		this.showPlayPause		= true;		// true to display pause/play buttons next to close button, false to hide
		this.autoEnd			= true;		// true to automatically close Lytebox after the last image is reached, false to keep open
		this.pauseOnNextClick	= false;	// true to pause the slideshow when the "Next" button is clicked
        this.pauseOnPrevClick 	= true;		// true to pause the slideshow when the "Prev" button is clicked
	/*** End Slideshow Configuration ***/
	
	if(this.resizeSpeed > 10) { this.resizeSpeed = 10; }
	if(this.resizeSpeed < 1) { resizeSpeed = 1; }
	this.resizeDuration = (11 - this.resizeSpeed) * 0.15;
	this.resizeWTimerArray		= new Array();
	this.resizeWTimerCount		= 0;
	this.resizeHTimerArray		= new Array();
	this.resizeHTimerCount		= 0;
	this.showContentTimerArray	= new Array();
	this.showContentTimerCount	= 0;
	this.overlayTimerArray		= new Array();
	this.overlayTimerCount		= 0;
	this.imageTimerArray		= new Array();
	this.imageTimerCount		= 0;
	this.timerIDArray			= new Array();
	this.timerIDCount			= 0;
	this.slideshowIDArray		= new Array();
	this.slideshowIDCount		= 0;
	this.imageArray	 = new Array();
	this.activeImage = null;
	this.slideArray	 = new Array();
	this.activeSlide = null;
	this.frameArray	 = new Array();
	this.activeFrame = null;
	this.checkFrame();
	this.isSlideshow = false;
	this.isLyteframe = false;
	/*@cc_on
		/*@if (@_jscript)
			this.ie = (document.all && !window.opera) ? true : false;
		/*@else @*/
			this.ie = false;
		/*@end
	@*/
	this.ie7 = (this.ie && window.XMLHttpRequest);	
	this.initialize();
}
LyteBox.prototype.initialize = function() {
	this.updateLyteboxItems();
	var objBody = this.doc.getElementsByTagName("body").item(0);	
	if (this.doc.getElementById('lbOverlay')) {
		objBody.removeChild(this.doc.getElementById("lbOverlay"));
		objBody.removeChild(this.doc.getElementById("lbMain"));
	}
	
	var objCloseDiv = this.doc.createElement("div");
		objCloseDiv.setAttribute('id','lbClosediv');
	var objClose = this.doc.createElement("a");
		objClose.setAttribute('id','lbClose');
		objClose.setAttribute((this.ie ? 'className' : 'class'), this.theme);
		objClose.setAttribute('href','#');
		objCloseDiv.appendChild(objClose);
 
	
	var objOverlay = this.doc.createElement("div");
		objOverlay.setAttribute('id','lbOverlay');
		objOverlay.setAttribute((this.ie ? 'className' : 'class'), this.theme);
		if ((this.ie && !this.ie7) || (this.ie7 && this.doc.compatMode == 'BackCompat')) {
			objOverlay.style.position = 'absolute';
		}
		objOverlay.style.display = 'none';
		objBody.appendChild(objOverlay);
	var objLytebox = this.doc.createElement("div");
		objLytebox.setAttribute('id','lbMain');
		objLytebox.style.display = 'none';
		objBody.appendChild(objLytebox);
	var objOuterContainer = this.doc.createElement("div");
		objOuterContainer.setAttribute('id','lbOuterContainer');
		objOuterContainer.setAttribute((this.ie ? 'className' : 'class'), this.theme);
		objLytebox.appendChild(objOuterContainer);
		objOuterContainer.appendChild(objCloseDiv);
	var objLoading = this.doc.createElement("div");
		objLoading.setAttribute('id','lbLoading');
		objOuterContainer.appendChild(objLoading);
	var objIframeContainer = this.doc.createElement("div");
		objIframeContainer.setAttribute('id','lbIframeContainer');
		objIframeContainer.style.display = 'none';
		objOuterContainer.appendChild(objIframeContainer);
	var objIframe = this.doc.createElement("iframe");
		objIframe.setAttribute('id','lbIframe');
		objIframe.setAttribute('name','lbIframe');
		objIframe.style.display = 'none';
		objIframeContainer.appendChild(objIframe);
	var objImageContainer = this.doc.createElement("div");
		objImageContainer.setAttribute('id','lbImageContainer');
		objOuterContainer.appendChild(objImageContainer);
	var objLyteboxImage = this.doc.createElement("img");
		objLyteboxImage.setAttribute('id','lbImage');
		objImageContainer.appendChild(objLyteboxImage);
	var objDetailsContainer = this.doc.createElement("div");
		objDetailsContainer.setAttribute('id','lbDetailsContainer');
		objDetailsContainer.setAttribute((this.ie ? 'className' : 'class'), this.theme);
		objLytebox.appendChild(objDetailsContainer);
	var objDetailsData =this.doc.createElement("div");
		objDetailsData.setAttribute('id','lbDetailsData');
		objDetailsData.setAttribute((this.ie ? 'className' : 'class'), this.theme);
		objDetailsContainer.appendChild(objDetailsData);
	var objDetails = this.doc.createElement("div");
		objDetails.setAttribute('id','lbDetails');
		objDetailsData.appendChild(objDetails);
	var objCaption = this.doc.createElement("span");
		objCaption.setAttribute('id','lbCaption');
		objDetails.appendChild(objCaption);
	var objHoverNav = this.doc.createElement("div");
		objHoverNav.setAttribute('id','lbHoverNav');
		objImageContainer.appendChild(objHoverNav);
	var objBottomNav = this.doc.createElement("div");
		objBottomNav.setAttribute('id','lbBottomNav');
		objDetailsData.appendChild(objBottomNav);
	var objPrev = this.doc.createElement("a");
		objPrev.setAttribute('id','lbPrev');
		objPrev.setAttribute((this.ie ? 'className' : 'class'), this.theme);
		objPrev.setAttribute('href','#');
		objHoverNav.appendChild(objPrev);
	var objNext = this.doc.createElement("a");
		objNext.setAttribute('id','lbNext');
		objNext.setAttribute((this.ie ? 'className' : 'class'), this.theme);
		objNext.setAttribute('href','#');
		objHoverNav.appendChild(objNext);
	var objNumberDisplay = this.doc.createElement("span");
		objNumberDisplay.setAttribute('id','lbNumberDisplay');
		objDetails.appendChild(objNumberDisplay);
	var objNavDisplay = this.doc.createElement("span");
		objNavDisplay.setAttribute('id','lbNavDisplay');
		objNavDisplay.style.display = 'none';
		objDetails.appendChild(objNavDisplay);
	var objPause = this.doc.createElement("a");
		objPause.setAttribute('id','lbPause');
		objPause.setAttribute((this.ie ? 'className' : 'class'), this.theme);
		objPause.setAttribute('href','#');
		objPause.style.display = 'none';
		objBottomNav.appendChild(objPause);
	var objPlay = this.doc.createElement("a");
		objPlay.setAttribute('id','lbPlay');
		objPlay.setAttribute((this.ie ? 'className' : 'class'), this.theme);
		objPlay.setAttribute('href','#');
		objPlay.style.display = 'none';
		objBottomNav.appendChild(objPlay);
};
LyteBox.prototype.updateLyteboxItems = function() {	
	var anchors = (this.isFrame) ? window.parent.frames[window.name].document.getElementsByTagName('a') : document.getElementsByTagName('a');
	for (var i = 0; i < anchors.length; i++) {
		var anchor = anchors[i];
		var relAttribute = String(anchor.getAttribute('rel'));
		if (anchor.getAttribute('href')) {
			if (relAttribute.toLowerCase().match('lytebox')) {
				anchor.onclick = function () { myLytebox.start(this, false, false); return false; }
			} else if (relAttribute.toLowerCase().match('lyteshow')) {
				anchor.onclick = function () { myLytebox.start(this, true, false); return false; }
			} else if (relAttribute.toLowerCase().match('lyteframe')) {
				anchor.onclick = function () { myLytebox.start(this, false, true); return false; }
			}
		}
	}
};
LyteBox.prototype.start = function(imageLink, doSlide, doFrame) {
	if (this.ie && !this.ie7) {	this.toggleSelects('hide');	}
	if (this.hideFlash) { this.toggleFlash('hide'); }
	this.isLyteframe = (doFrame ? true : false);
	var pageSize	= this.getPageSize();
	var objOverlay	= this.doc.getElementById('lbOverlay');
	var objBody		= this.doc.getElementsByTagName("body").item(0);
	objOverlay.style.height = pageSize[1] + "px";
	objOverlay.style.display = '';
	this.appear('lbOverlay', (this.doAnimations ? 0 : this.maxOpacity));
	var anchors = (this.isFrame) ? window.parent.frames[window.name].document.getElementsByTagName('a') : document.getElementsByTagName('a');
	if (this.isLyteframe) {
		this.frameArray = [];
		this.frameNum = 0;
		if ((imageLink.getAttribute('rel') == 'lyteframe')) {
			var rev = imageLink.getAttribute('rev');
			this.frameArray.push(new Array(imageLink.getAttribute('href'), imageLink.getAttribute('title'), (rev == null || rev == '' ? 'width: 400px; height: 400px; scrolling: auto;' : rev)));
		} else {
			if (imageLink.getAttribute('rel').indexOf('lyteframe') != -1) {
				for (var i = 0; i < anchors.length; i++) {
					var anchor = anchors[i];
					if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))) {
						var rev = anchor.getAttribute('rev');
						this.frameArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title'), (rev == null || rev == '' ? 'width: 400px; height: 400px; scrolling: auto;' : rev)));
					}
				}
				this.frameArray.removeDuplicates();
				while(this.frameArray[this.frameNum][0] != imageLink.getAttribute('href')) { this.frameNum++; }
			}
		}
	} else {
		this.imageArray = [];
		this.imageNum = 0;
		this.slideArray = [];
		this.slideNum = 0;
		if ((imageLink.getAttribute('rel') == 'lytebox')) {
			this.imageArray.push(new Array(imageLink.getAttribute('href'), imageLink.getAttribute('title')));
		} else {
			if (imageLink.getAttribute('rel').indexOf('lytebox') != -1) {
				for (var i = 0; i < anchors.length; i++) {
					var anchor = anchors[i];
					if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))) {
						this.imageArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title')));
					}
				}
				this.imageArray.removeDuplicates();
				while(this.imageArray[this.imageNum][0] != imageLink.getAttribute('href')) { this.imageNum++; }
			}
			if (imageLink.getAttribute('rel').indexOf('lyteshow') != -1) {
				for (var i = 0; i < anchors.length; i++) {
					var anchor = anchors[i];
					if (anchor.getAttribute('href') && (anchor.getAttribute('rel') == imageLink.getAttribute('rel'))) {
						this.slideArray.push(new Array(anchor.getAttribute('href'), anchor.getAttribute('title')));
					}
				}
				this.slideArray.removeDuplicates();
				while(this.slideArray[this.slideNum][0] != imageLink.getAttribute('href')) { this.slideNum++; }
			}
		}
	}
	var object = this.doc.getElementById('lbMain');
		object.style.top = (this.getPageScroll() + (pageSize[3] / 15)) + "px";
		object.style.display = '';
	if (!this.outerBorder) {
		this.doc.getElementById('lbOuterContainer').style.border = 'none';
		this.doc.getElementById('lbDetailsContainer').style.border = 'none';
	} else {
		this.doc.getElementById('lbOuterContainer').style.borderBottom = '';
		this.doc.getElementById('lbOuterContainer').setAttribute((this.ie ? 'className' : 'class'), this.theme);
	}
	this.doc.getElementById('lbOverlay').onclick = function() { myLytebox.end(); return false; }
	this.doc.getElementById('lbMain').onclick = function(e) {
		var e = e;
		if (!e) {
			if (window.parent.frames[window.name] && (parent.document.getElementsByTagName('frameset').length <= 0)) {
				e = window.parent.window.event;
			} else {
				e = window.event;
			}
		}
		var id = (e.target ? e.target.id : e.srcElement.id);
		if (id == 'lbMain') { myLytebox.end(); return false; }
	}
	this.doc.getElementById('lbClose').onclick = function() { myLytebox.end(); return false; }
	this.doc.getElementById('lbImageContainer').onclick = function() { myLytebox.end(); return false; } /* schliessen durch klick auf bild */
	this.doc.getElementById('lbPause').onclick = function() { myLytebox.togglePlayPause("lbPause", "lbPlay"); return false; }
	this.doc.getElementById('lbPlay').onclick = function() { myLytebox.togglePlayPause("lbPlay", "lbPause"); return false; }	
	this.isSlideshow = doSlide;
	this.isPaused = (this.slideNum != 0 ? true : false);
	if (this.isSlideshow && this.showPlayPause && this.isPaused) {
		this.doc.getElementById('lbPlay').style.display = '';
		this.doc.getElementById('lbPause').style.display = 'none';
	}
	if (this.isLyteframe) {
		this.changeContent(this.frameNum);
	} else {
		if (this.isSlideshow) {
			this.changeContent(this.slideNum);
		} else {
			this.changeContent(this.imageNum);
		}
	}
};
LyteBox.prototype.changeContent = function(imageNum) {
	if (this.isSlideshow) {
		for (var i = 0; i < this.slideshowIDCount; i++) { window.clearTimeout(this.slideshowIDArray[i]); }
	}
	this.activeImage = this.activeSlide = this.activeFrame = imageNum;
	if (!this.outerBorder) {
		this.doc.getElementById('lbOuterContainer').style.border = 'none';
		this.doc.getElementById('lbDetailsContainer').style.border = 'none';
	} else {
		this.doc.getElementById('lbOuterContainer').style.borderBottom = '';
		this.doc.getElementById('lbOuterContainer').setAttribute((this.ie ? 'className' : 'class'), this.theme);
	}
	this.doc.getElementById('lbLoading').style.display = '';
	this.doc.getElementById('lbImage').style.display = 'none';
	this.doc.getElementById('lbIframe').style.display = 'none';
	this.doc.getElementById('lbPrev').style.display = 'none';
	this.doc.getElementById('lbNext').style.display = 'none';
	this.doc.getElementById('lbIframeContainer').style.display = 'none';
	this.doc.getElementById('lbDetailsContainer').style.display = 'none';
	this.doc.getElementById('lbNumberDisplay').style.display = 'none';
	if (this.navType == 2 || this.isLyteframe) {
		object = this.doc.getElementById('lbNavDisplay');
		object.innerHTML = '&nbsp;&nbsp;&nbsp;<span id="lbPrev2_Off" style="display: none;" class="' + this.theme + '">&laquo; prev</span><a href="#" id="lbPrev2" class="' + this.theme + '" style="display: none;">&laquo; prev</a> <b id="lbSpacer" class="' + this.theme + '">||</b> <span id="lbNext2_Off" style="display: none;" class="' + this.theme + '">next &raquo;</span><a href="#" id="lbNext2" class="' + this.theme + '" style="display: none;">next &raquo;</a>';
		object.style.display = 'none';
	}
	if (this.isLyteframe) {
		var iframe = myLytebox.doc.getElementById('lbIframe');
		var styles = this.frameArray[this.activeFrame][2];
		var aStyles = styles.split(';');
		for (var i = 0; i < aStyles.length; i++) {
			if (aStyles[i].indexOf('width:') >= 0) {
				var w = aStyles[i].replace('width:', '');
				iframe.width = w.trim();
			} else if (aStyles[i].indexOf('height:') >= 0) {
				var h = aStyles[i].replace('height:', '');
				iframe.height = h.trim();
			} else if (aStyles[i].indexOf('scrolling:') >= 0) {
				var s = aStyles[i].replace('scrolling:', '');
				iframe.scrolling = s.trim();
			} else if (aStyles[i].indexOf('border:') >= 0) {
				// Not implemented yet, as there are cross-platform issues with setting the border (from a GUI standpoint)
				//var b = aStyles[i].replace('border:', '');
				//iframe.style.border = b.trim();
			}
		}
		this.resizeContainer(parseInt(iframe.width), parseInt(iframe.height));
	} else {
		imgPreloader = new Image();
		imgPreloader.onload = function() {
			var imageWidth = imgPreloader.width;
			var imageHeight = imgPreloader.height;
			if (myLytebox.autoResize) {
				var pagesize = myLytebox.getPageSize();
				var x = pagesize[2] - 150;
				var y = pagesize[3] - 150;
				if (imageWidth > x) {
					imageHeight = Math.round(imageHeight * (x / imageWidth));
					imageWidth = x; 
					if (imageHeight > y) { 
						imageWidth = Math.round(imageWidth * (y / imageHeight));
						imageHeight = y; 
					}
				} else if (imageHeight > y) { 
					imageWidth = Math.round(imageWidth * (y / imageHeight));
					imageHeight = y; 
					if (imageWidth > x) {
						imageHeight = Math.round(imageHeight * (x / imageWidth));
						imageWidth = x;
					}
				}
			}
			var lbImage = myLytebox.doc.getElementById('lbImage')
			lbImage.src = (myLytebox.isSlideshow ? myLytebox.slideArray[myLytebox.activeSlide][0] : myLytebox.imageArray[myLytebox.activeImage][0]);
			lbImage.width = imageWidth;
			lbImage.height = imageHeight;
			myLytebox.resizeContainer(imageWidth, imageHeight+10);
			imgPreloader.onload = function() {};
		}
		imgPreloader.src = (this.isSlideshow ? this.slideArray[this.activeSlide][0] : this.imageArray[this.activeImage][0]);
	}
};
LyteBox.prototype.resizeContainer = function(imgWidth, imgHeight) {
	this.wCur = this.doc.getElementById('lbOuterContainer').offsetWidth;
	this.hCur = this.doc.getElementById('lbOuterContainer').offsetHeight;
	this.xScale = ((imgWidth  + (this.borderSize * 2)) / this.wCur) * 100;
	this.yScale = ((imgHeight  + (this.borderSize * 2)) / this.hCur) * 100;
	var wDiff = (this.wCur - this.borderSize * 2) - imgWidth;
	var hDiff = (this.hCur - this.borderSize * 2) - imgHeight;
	if (!(hDiff == 0)) {
		this.hDone = false;
		this.resizeH('lbOuterContainer', this.hCur, imgHeight + this.borderSize*2, this.getPixelRate(this.hCur, imgHeight));
	} else {
		this.hDone = true;
	}
	if (!(wDiff == 0)) {
		this.wDone = false;
		this.resizeW('lbOuterContainer', this.wCur, imgWidth + this.borderSize*2, this.getPixelRate(this.wCur, imgWidth));
	} else {
		this.wDone = true;
	}
	if ((hDiff == 0) && (wDiff == 0)) {
		if (this.ie){ this.pause(250); } else { this.pause(100); } 
	}
	this.doc.getElementById('lbPrev').style.height = imgHeight + "px";
	this.doc.getElementById('lbNext').style.height = imgHeight + "px";
	 this.doc.getElementById('lbDetailsContainer').style.width = (imgWidth + (this.borderSize * 2) + (this.ie && this.doc.compatMode == "BackCompat" && this.outerBorder ? 2 : 0)) + "px"; 
	/*this.doc.getElementById('lbDetailsContainer').style.width = (imgWidth + (this.borderSize * 2)) + "px";*/
	this.showContent();
};
LyteBox.prototype.showContent = function() {
	if (this.wDone && this.hDone) {
		for (var i = 0; i < this.showContentTimerCount; i++) { window.clearTimeout(this.showContentTimerArray[i]); }
		if (this.outerBorder) {
			this.doc.getElementById('lbOuterContainer').style.borderBottom = 'none';
		}
		this.doc.getElementById('lbLoading').style.display = 'none';
		if (this.isLyteframe) {
			this.doc.getElementById('lbIframe').style.display = '';
			this.appear('lbIframe', (this.doAnimations ? 0 : 100));
		} else {
			this.doc.getElementById('lbImage').style.display = '';
			this.appear('lbImage', (this.doAnimations ? 0 : 100));
			this.preloadNeighborImages();
		}
		if (this.isSlideshow) {
			if(this.activeSlide == (this.slideArray.length - 1)) {
				if (this.autoEnd) {
					this.slideshowIDArray[this.slideshowIDCount++] = setTimeout("myLytebox.end('slideshow')", this.slideInterval);
				}
			} else {
				if (!this.isPaused) {
					this.slideshowIDArray[this.slideshowIDCount++] = setTimeout("myLytebox.changeContent("+(this.activeSlide+1)+")", this.slideInterval);
				}
			}
			this.doc.getElementById('lbHoverNav').style.display = (this.showNavigation && this.navType == 1 ? '' : 'none');
			this.doc.getElementById('lbClose').style.display = (this.showClose ? '' : 'none');
			this.doc.getElementById('lbDetails').style.display = (this.showDetails ? '' : 'none');
			this.doc.getElementById('lbPause').style.display = (this.showPlayPause && !this.isPaused ? '' : 'none');
			this.doc.getElementById('lbPlay').style.display = (this.showPlayPause && !this.isPaused ? 'none' : '');
			this.doc.getElementById('lbNavDisplay').style.display = (this.showNavigation && this.navType == 2 ? '' : 'none');
		} else {
			this.doc.getElementById('lbHoverNav').style.display = (this.navType == 1 && !this.isLyteframe ? '' : 'none');
			if ((this.navType == 2 && !this.isLyteframe && this.imageArray.length > 1) || (this.frameArray.length > 1 && this.isLyteframe)) {
				this.doc.getElementById('lbNavDisplay').style.display = '';
			} else {
				this.doc.getElementById('lbNavDisplay').style.display = 'none';
			}
			this.doc.getElementById('lbClose').style.display = '';
			this.doc.getElementById('lbDetails').style.display = '';
			this.doc.getElementById('lbPause').style.display = 'none';
			this.doc.getElementById('lbPlay').style.display = 'none';
		}
		this.doc.getElementById('lbImageContainer').style.display = (this.isLyteframe ? 'none' : '');
		this.doc.getElementById('lbIframeContainer').style.display = (this.isLyteframe ? '' : 'none');
		try {
			this.doc.getElementById('lbIframe').src = this.frameArray[this.activeFrame][0];
		} catch(e) { }
	} else {
		this.showContentTimerArray[this.showContentTimerCount++] = setTimeout("myLytebox.showContent()", 200);
	}
};
LyteBox.prototype.updateDetails = function() {
	var object = this.doc.getElementById('lbCaption');
	var sTitle = (this.isSlideshow ? this.slideArray[this.activeSlide][1] : (this.isLyteframe ? this.frameArray[this.activeFrame][1] : this.imageArray[this.activeImage][1]));
	object.style.display = '';
	object.innerHTML = (sTitle == null ? '' : sTitle);
	this.updateNav();
	this.doc.getElementById('lbDetailsContainer').style.display = '';
	object = this.doc.getElementById('lbNumberDisplay');
	if (this.isSlideshow && this.slideArray.length > 1) {
		object.style.display = '';
		object.innerHTML = "Bild " + eval(this.activeSlide + 1) + " von " + this.slideArray.length;
		this.doc.getElementById('lbNavDisplay').style.display = (this.navType == 2 && this.showNavigation ? '' : 'none');
	} else if (this.imageArray.length > 1 && !this.isLyteframe) {
		object.style.display = '';
		object.innerHTML = "Bild " + eval(this.activeImage + 1) + " von " + this.imageArray.length;
		this.doc.getElementById('lbNavDisplay').style.display = (this.navType == 2 ? '' : 'none');
	} else if (this.frameArray.length > 1 && this.isLyteframe) {
		object.style.display = '';
		object.innerHTML = "Seite " + eval(this.activeFrame + 1) + " von " + this.frameArray.length;
		this.doc.getElementById('lbNavDisplay').style.display = '';
	} else {
		this.doc.getElementById('lbNavDisplay').style.display = 'none';
	}
	this.appear('lbDetailsContainer', (this.doAnimations ? 0 : 100));
};
LyteBox.prototype.updateNav = function() {
	if (this.isSlideshow) {
		if (this.activeSlide != 0) {
			var object = (this.navType == 2 ? this.doc.getElementById('lbPrev2') : this.doc.getElementById('lbPrev'));
				object.style.display = '';
				object.onclick = function() {
					if (myLytebox.pauseOnPrevClick) { myLytebox.togglePlayPause("lbPause", "lbPlay"); }
					myLytebox.changeContent(myLytebox.activeSlide - 1); return false;
				}
		} else {
			if (this.navType == 2) { this.doc.getElementById('lbPrev2_Off').style.display = ''; }
		}
		if (this.activeSlide != (this.slideArray.length - 1)) {
			var object = (this.navType == 2 ? this.doc.getElementById('lbNext2') : this.doc.getElementById('lbNext'));
				object.style.display = '';
				object.onclick = function() {
					if (myLytebox.pauseOnNextClick) { myLytebox.togglePlayPause("lbPause", "lbPlay"); }
					myLytebox.changeContent(myLytebox.activeSlide + 1); return false;
				}
		} else {
			if (this.navType == 2) { this.doc.getElementById('lbNext2_Off').style.display = ''; }
		}
	} else if (this.isLyteframe) {
		if(this.activeFrame != 0) {
			var object = this.doc.getElementById('lbPrev2');
				object.style.display = '';
				object.onclick = function() {
					myLytebox.changeContent(myLytebox.activeFrame - 1); return false;
				}
		} else {
			this.doc.getElementById('lbPrev2_Off').style.display = '';
		}
		if(this.activeFrame != (this.frameArray.length - 1)) {
			var object = this.doc.getElementById('lbNext2');
				object.style.display = '';
				object.onclick = function() {
					myLytebox.changeContent(myLytebox.activeFrame + 1); return false;
				}
		} else {
			this.doc.getElementById('lbNext2_Off').style.display = '';
		}		
	} else {
		if(this.activeImage != 0) {
			var object = (this.navType == 2 ? this.doc.getElementById('lbPrev2') : this.doc.getElementById('lbPrev'));
				object.style.display = '';
				object.onclick = function() {
					myLytebox.changeContent(myLytebox.activeImage - 1); return false;
				}
		} else {
			if (this.navType == 2) { this.doc.getElementById('lbPrev2_Off').style.display = ''; }
		}
		if(this.activeImage != (this.imageArray.length - 1)) {
			var object = (this.navType == 2 ? this.doc.getElementById('lbNext2') : this.doc.getElementById('lbNext'));
				object.style.display = '';
				object.onclick = function() {
					myLytebox.changeContent(myLytebox.activeImage + 1); return false;
				}
		} else {
			if (this.navType == 2) { this.doc.getElementById('lbNext2_Off').style.display = ''; }
		}
	}
	this.enableKeyboardNav();
};
LyteBox.prototype.enableKeyboardNav = function() { document.onkeydown = this.keyboardAction; };
LyteBox.prototype.disableKeyboardNav = function() { document.onkeydown = ''; };
LyteBox.prototype.keyboardAction = function(e) {
	var keycode = key = escape = null;
	keycode	= (e == null) ? event.keyCode : e.which;
	key		= String.fromCharCode(keycode).toLowerCase();
	escape  = (e == null) ? 27 : e.DOM_VK_ESCAPE;
	if ((key == 'x') || (key == 'c') || (keycode == escape)) {
		myLytebox.end();
	} else if ((key == 'p') || (keycode == 37)) {
		if (myLytebox.isSlideshow) {
			if(myLytebox.activeSlide != 0) {
				myLytebox.disableKeyboardNav();
				myLytebox.changeContent(myLytebox.activeSlide - 1);
			}
		} else if (myLytebox.isLyteframe) {
			if(myLytebox.activeFrame != 0) {
				myLytebox.disableKeyboardNav();
				myLytebox.changeContent(myLytebox.activeFrame - 1);
			}
		} else {
			if(myLytebox.activeImage != 0) {
				myLytebox.disableKeyboardNav();
				myLytebox.changeContent(myLytebox.activeImage - 1);
			}
		}
	} else if ((key == 'n') || (keycode == 39)) {
		if (myLytebox.isSlideshow) {
			if(myLytebox.activeSlide != (myLytebox.slideArray.length - 1)) {
				myLytebox.disableKeyboardNav();
				myLytebox.changeContent(myLytebox.activeSlide + 1);
			}
		} else if (myLytebox.isLyteframe) {
			if(myLytebox.activeFrame != (myLytebox.frameArray.length - 1)) {
				myLytebox.disableKeyboardNav();
				myLytebox.changeContent(myLytebox.activeFrame + 1);
			}
		} else {
			if(myLytebox.activeImage != (myLytebox.imageArray.length - 1)) {
				myLytebox.disableKeyboardNav();
				myLytebox.changeContent(myLytebox.activeImage + 1);
			}
		}
	}
};
LyteBox.prototype.preloadNeighborImages = function() {
	if (this.isSlideshow) {
		if ((this.slideArray.length - 1) > this.activeSlide) {
			preloadNextImage = new Image();
			preloadNextImage.src = this.slideArray[this.activeSlide + 1][0];
		}
		if(this.activeSlide > 0) {
			preloadPrevImage = new Image();
			preloadPrevImage.src = this.slideArray[this.activeSlide - 1][0];
		}
	} else {
		if ((this.imageArray.length - 1) > this.activeImage) {
			preloadNextImage = new Image();
			preloadNextImage.src = this.imageArray[this.activeImage + 1][0];
		}
		if(this.activeImage > 0) {
			preloadPrevImage = new Image();
			preloadPrevImage.src = this.imageArray[this.activeImage - 1][0];
		}
	}
};
LyteBox.prototype.togglePlayPause = function(hideID, showID) {
	if (this.isSlideshow && hideID == "lbPause") {
		for (var i = 0; i < this.slideshowIDCount; i++) { window.clearTimeout(this.slideshowIDArray[i]); }
	}
	this.doc.getElementById(hideID).style.display = 'none';
	this.doc.getElementById(showID).style.display = '';
	if (hideID == "lbPlay") {
		this.isPaused = false;
		if (this.activeSlide == (this.slideArray.length - 1)) {
			this.end();
		} else {
			this.changeContent(this.activeSlide + 1);
		}
	} else {
		this.isPaused = true;
	}
};
LyteBox.prototype.end = function(caller) {
	var closeClick = (caller == 'slideshow' ? false : true);
	if (this.isSlideshow && this.isPaused && !closeClick) { return; }
	this.disableKeyboardNav();
	this.doc.getElementById('lbMain').style.display = 'none';
	this.fade('lbOverlay', (this.doAnimations ? this.maxOpacity : 0));
	this.toggleSelects('visible');
	if (this.hideFlash) { this.toggleFlash('visible'); }
	if (this.isSlideshow) {
		for (var i = 0; i < this.slideshowIDCount; i++) { window.clearTimeout(this.slideshowIDArray[i]); }
	}
	if (this.isLyteframe) {
		 this.initialize();
	}
};
LyteBox.prototype.checkFrame = function() {
	if (window.parent.frames[window.name] && (parent.document.getElementsByTagName('frameset').length <= 0)) {
		this.isFrame = true;
		this.lytebox = "window.parent." + window.name + ".myLytebox";
		this.doc = parent.document;
	} else {
		this.isFrame = false;
		this.lytebox = "myLytebox";
		this.doc = document;
	}
};
LyteBox.prototype.getPixelRate = function(cur, img) {
	var diff = (img > cur) ? img - cur : cur - img;
	if (diff >= 0 && diff <= 100) { return 10; }
	if (diff > 100 && diff <= 200) { return 15; }
	if (diff > 200 && diff <= 300) { return 20; }
	if (diff > 300 && diff <= 400) { return 25; }
	if (diff > 400 && diff <= 500) { return 30; }
	if (diff > 500 && diff <= 600) { return 35; }
	if (diff > 600 && diff <= 700) { return 40; }
	if (diff > 700) { return 45; }
};
LyteBox.prototype.appear = function(id, opacity) {
	var object = this.doc.getElementById(id).style;
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + (opacity + 10) + ")";
	if (opacity == 100 && (id == 'lbImage' || id == 'lbIframe')) {
		try { object.removeAttribute("filter"); } catch(e) {}	/* Fix added for IE Alpha Opacity Filter bug. */
		this.updateDetails();
	} else if (opacity >= this.maxOpacity && id == 'lbOverlay') {
		for (var i = 0; i < this.overlayTimerCount; i++) { window.clearTimeout(this.overlayTimerArray[i]); }
		return;
	} else if (opacity >= 100 && id == 'lbDetailsContainer') {
		try { object.removeAttribute("filter"); } catch(e) {}	/* Fix added for IE Alpha Opacity Filter bug. */
		for (var i = 0; i < this.imageTimerCount; i++) { window.clearTimeout(this.imageTimerArray[i]); }
		this.doc.getElementById('lbOverlay').style.height = this.getPageSize()[1] + "px";
	} else {
		if (id == 'lbOverlay') {
			this.overlayTimerArray[this.overlayTimerCount++] = setTimeout("myLytebox.appear('" + id + "', " + (opacity+20) + ")", 1);
		} else {
			this.imageTimerArray[this.imageTimerCount++] = setTimeout("myLytebox.appear('" + id + "', " + (opacity+10) + ")", 1);
		}
	}
};
LyteBox.prototype.fade = function(id, opacity) {
	var object = this.doc.getElementById(id).style;
	object.opacity = (opacity / 100);
	object.MozOpacity = (opacity / 100);
	object.KhtmlOpacity = (opacity / 100);
	object.filter = "alpha(opacity=" + opacity + ")";
	if (opacity <= 0) {
		try {
			object.display = 'none';
		} catch(err) { }
	} else if (id == 'lbOverlay') {
		this.overlayTimerArray[this.overlayTimerCount++] = setTimeout("myLytebox.fade('" + id + "', " + (opacity-20) + ")", 1);
	} else {
		this.timerIDArray[this.timerIDCount++] = setTimeout("myLytebox.fade('" + id + "', " + (opacity-10) + ")", 1);
	}
};
LyteBox.prototype.resizeW = function(id, curW, maxW, pixelrate, speed) {
	if (!this.hDone) {
		this.resizeWTimerArray[this.resizeWTimerCount++] = setTimeout("myLytebox.resizeW('" + id + "', " + curW + ", " + maxW + ", " + pixelrate + ")", 100);
		return;
	}
	var object = this.doc.getElementById(id);
	var timer = speed ? speed : (this.resizeDuration/2);
	var newW = (this.doAnimations ? curW : maxW);
	object.style.width = (newW) + "px";
	if (newW < maxW) {
		newW += (newW + pixelrate >= maxW) ? (maxW - newW) : pixelrate;
	} else if (newW > maxW) {
		newW -= (newW - pixelrate <= maxW) ? (newW - maxW) : pixelrate;
	}
	this.resizeWTimerArray[this.resizeWTimerCount++] = setTimeout("myLytebox.resizeW('" + id + "', " + newW + ", " + maxW + ", " + pixelrate + ", " + (timer+0.02) + ")", timer+0.02);
	if (parseInt(object.style.width) == maxW) {
		this.wDone = true;
		for (var i = 0; i < this.resizeWTimerCount; i++) { window.clearTimeout(this.resizeWTimerArray[i]); }
	}
};
LyteBox.prototype.resizeH = function(id, curH, maxH, pixelrate, speed) {
	var timer = speed ? speed : (this.resizeDuration/2);
	var object = this.doc.getElementById(id);
	var newH = (this.doAnimations ? curH : maxH);
	object.style.height = (newH) + "px";
	if (newH < maxH) {
		newH += (newH + pixelrate >= maxH) ? (maxH - newH) : pixelrate;
	} else if (newH > maxH) {
		newH -= (newH - pixelrate <= maxH) ? (newH - maxH) : pixelrate;
	}
	this.resizeHTimerArray[this.resizeHTimerCount++] = setTimeout("myLytebox.resizeH('" + id + "', " + newH + ", " + maxH + ", " + pixelrate + ", " + (timer+.02) + ")", timer+.02);
	if (parseInt(object.style.height) == maxH) {
		this.hDone = true;
		for (var i = 0; i < this.resizeHTimerCount; i++) { window.clearTimeout(this.resizeHTimerArray[i]); }
	}
};
LyteBox.prototype.getPageScroll = function() {
	if (self.pageYOffset) {
		return this.isFrame ? parent.pageYOffset : self.pageYOffset;
	} else if (this.doc.documentElement && this.doc.documentElement.scrollTop){
		return this.doc.documentElement.scrollTop;
	} else if (document.body) {
		return this.doc.body.scrollTop;
	}
};
LyteBox.prototype.getPageSize = function() {	
	var xScroll, yScroll, windowWidth, windowHeight;
	if (window.innerHeight && window.scrollMaxY) {
		xScroll = this.doc.scrollWidth;
		yScroll = (this.isFrame ? parent.innerHeight : self.innerHeight) + (this.isFrame ? parent.scrollMaxY : self.scrollMaxY);
	} else if (this.doc.body.scrollHeight > this.doc.body.offsetHeight){
		xScroll = this.doc.body.scrollWidth;
		yScroll = this.doc.body.scrollHeight;
	} else {
		xScroll = this.doc.getElementsByTagName("html").item(0).offsetWidth;
		yScroll = this.doc.getElementsByTagName("html").item(0).offsetHeight;
		xScroll = (xScroll < this.doc.body.offsetWidth) ? this.doc.body.offsetWidth : xScroll;
		yScroll = (yScroll < this.doc.body.offsetHeight) ? this.doc.body.offsetHeight : yScroll;
	}
	if (self.innerHeight) {
		windowWidth = (this.isFrame) ? parent.innerWidth : self.innerWidth;
		windowHeight = (this.isFrame) ? parent.innerHeight : self.innerHeight;
	} else if (document.documentElement && document.documentElement.clientHeight) {
		windowWidth = this.doc.documentElement.clientWidth;
		windowHeight = this.doc.documentElement.clientHeight;
	} else if (document.body) {
		windowWidth = this.doc.getElementsByTagName("html").item(0).clientWidth;
		windowHeight = this.doc.getElementsByTagName("html").item(0).clientHeight;
		windowWidth = (windowWidth == 0) ? this.doc.body.clientWidth : windowWidth;
		windowHeight = (windowHeight == 0) ? this.doc.body.clientHeight : windowHeight;
	}
	var pageHeight = (yScroll < windowHeight) ? windowHeight : yScroll;
	var pageWidth = (xScroll < windowWidth) ? windowWidth : xScroll;
	return new Array(pageWidth, pageHeight, windowWidth, windowHeight);
};
LyteBox.prototype.toggleFlash = function(state) {
	var objects = this.doc.getElementsByTagName("object");
	for (var i = 0; i < objects.length; i++) {
		objects[i].style.visibility = (state == "hide") ? 'hidden' : 'visible';
	}
	var embeds = this.doc.getElementsByTagName("embed");
	for (var i = 0; i < embeds.length; i++) {
		embeds[i].style.visibility = (state == "hide") ? 'hidden' : 'visible';
	}
	if (this.isFrame) {
		for (var i = 0; i < parent.frames.length; i++) {
			try {
				objects = parent.frames[i].window.document.getElementsByTagName("object");
				for (var j = 0; j < objects.length; j++) {
					objects[j].style.visibility = (state == "hide") ? 'hidden' : 'visible';
				}
			} catch(e) { }
			try {
				embeds = parent.frames[i].window.document.getElementsByTagName("embed");
				for (var j = 0; j < embeds.length; j++) {
					embeds[j].style.visibility = (state == "hide") ? 'hidden' : 'visible';
				}
			} catch(e) { }
		}
	}
};
LyteBox.prototype.toggleSelects = function(state) {
	var selects = this.doc.getElementsByTagName("select");
	for (var i = 0; i < selects.length; i++ ) {
		selects[i].style.visibility = (state == "hide") ? 'hidden' : 'visible';
	}
	if (this.isFrame) {
		for (var i = 0; i < parent.frames.length; i++) {
			try {
				selects = parent.frames[i].window.document.getElementsByTagName("select");
				for (var j = 0; j < selects.length; j++) {
					selects[j].style.visibility = (state == "hide") ? 'hidden' : 'visible';
				}
			} catch(e) { }
		}
	}
};
LyteBox.prototype.pause = function(numberMillis) {
	var now = new Date();
	var exitTime = now.getTime() + numberMillis;
	while (true) {
		now = new Date();
		if (now.getTime() > exitTime) { return; }
	}
};
if (window.addEventListener) {
	window.addEventListener("load",initLytebox,false);
} else if (window.attachEvent) {
	window.attachEvent("onload",initLytebox);
} else {
	window.onload = function() {initLytebox();}
}
function initLytebox() { myLytebox = new LyteBox(); }
/*
Author:
	luistar15, <leo020588 [at] gmail.com>
License:
	MIT-style license.
 
Class
	noobSlide (rev.17-04-08)

Arguments:
	options - see Options below

Options:
	box: dom element | required
	items: dom collection | required
	size: int | item size (px) | default: 240
	mode: string | 'horizontal', 'vertical' | default: 'horizontal'
	interval: int | for peridical | default: 5000
	buttons:{
		previous: single dom element OR dom collection| default: null
		next:  single dom element OR dom collection | default: null
		play:  single dom element OR dom collection | default: null
		playback:  single dom element OR dom collection | default: null
		stop:  single dom element OR dom collection | default: null
	}
	button_event: string | event type | default: 'click'
	handles: dom collection | default: null
	handle_event: string | event type| default: 'click'
	fxOptions: object | Fx.Style options | default: {duration:500,wait:false}
	autoPlay: boolean | default: false
	onWalk: event | pass arguments: currentItem, currentHandle | default: null
	startItem: int

Properties:
	box: dom element
	items: dom collection
	size: int
	mode: string
	interval: int
	buttons: object
	button_event: string
	handles: dom collection
	handle_event: string
	previousIndex: int
	nextIndex: int
	fx: Fx.style instance
	autoPlay: boolean
	onWalk: function
	
Methods:
	previous(manual): walk to previous item
		manual: bolean | default:false
	next(manual): walk to next item
		manual: bolean | default:false
	play (delay,direction,wait): auto walk items
		delay: int | required
		direction: string | "previous" or "next" | required
		wait: boolean | required
	stop(): sopt auto walk
	walk(item,manual): walk to item
		item: int | required
		manual: bolean | default:false
	addHandleButtons(handles):
		handles: dom collection | required
	addActionButtons(action,buttons):
		action: string | "previous", "next", "play", "playback", "stop" | required
		buttons: dom collection | required

*/
var noobSlide = new Class({

	initialize: function(params){
		this.items = params.items;
		this.mode = params.mode || 'horizontal';
		this.modes = {horizontal:['left','width'], vertical:['top','height']};
		this.size = params.size || 240;
		this.box = params.box.setStyle(this.modes[this.mode][1],(this.size*this.items.length)+'px');
		this.button_event = params.button_event || 'click';
		this.handle_event = params.handle_event || 'click';
		this.interval = params.interval || 5000;
		this.buttons = {previous: [], next: [], play: [], playback: [], stop: []};
		if(params.buttons){
			for(var action in params.buttons){
				this.addActionButtons(action, $type(params.buttons[action])=='array' ? params.buttons[action] : [params.buttons[action]]);
			}
		}
		this.handles = params.handles || null;
		if(this.handles){
			this.addHandleButtons(this.handles);
		}
		this.fx = new Fx.Style(this.box,this.modes[this.mode][0],params.fxOptions||{duration:500,wait:false});
		this.onWalk = params.onWalk || null;
		this.currentIndex = params.startItem || 0;
		this.previousIndex = null;
		this.nextIndex = null;
		this.autoPlay = params.autoPlay || false;
		this._auto = null;
		this.box.setStyle(this.modes[this.mode][0],(-this.currentIndex*this.size)+'px');
		if(params.autoPlay) this.play(this.interval,'next',true);
	},

	previous: function(manual){
		this.currentIndex += this.currentIndex>0 ? -1 : this.items.length-1;
		this.walk(null,manual);
	},

	next: function(manual){
		this.currentIndex += this.currentIndex<this.items.length-1 ? 1 : 1-this.items.length;
		this.walk(null,manual);
	},

	play: function(delay,direction,wait){
		this.stop();
		if(!wait){
			this[direction](false);
		}
		this._auto = this[direction].periodical(delay,this,false);
	},

	stop: function(){
		$clear(this._auto);
	},

	walk: function(item,manual){
		if($defined(item)){
			if(item==this.currentIndex) return;
			this.currentIndex=item;
		}
		this.previousIndex = this.currentIndex + (this.currentIndex>0 ? -1 : this.items.length-1);
		this.nextIndex = this.currentIndex + (this.currentIndex<this.items.length-1 ? 1 : 1-this.items.length);
		if(manual){ this.stop(); }
		this.fx.start(-this.currentIndex*this.size);
		if(this.onWalk){ this.onWalk(this.items[this.currentIndex],(this.handles?this.handles[this.currentIndex]:null)); }
		if(manual && this.autoPlay){ this.play(this.interval,'next',true); }
	},
	
	addHandleButtons: function(handles){
		for(var i=0;i<handles.length;i++){
			handles[i].addEvent(this.handle_event,this.walk.bind(this,[i,true]));
		}
	},

	addActionButtons: function(action,buttons){
		for(var i=0; i<buttons.length; i++){
			switch(action){
				case 'previous': buttons[i].addEvent(this.button_event,this.previous.bind(this,true)); break;
				case 'next': buttons[i].addEvent(this.button_event,this.next.bind(this,true)); break;
				case 'play': buttons[i].addEvent(this.button_event,this.play.bind(this,[this.interval,'next',false])); break;
				case 'playback': buttons[i].addEvent(this.button_event,this.play.bind(this,[this.interval,'previous',false])); break;
				case 'stop': buttons[i].addEvent(this.button_event,this.stop.bind(this)); break;
			}
			this.buttons[action].push(buttons[i]);
		}
	}
	
});window.addEvent('domready', function(){
	var Tips2 = new Tips($$('.Tips2'), {
		initialize:function(){
			this.fx = new Fx.Style(this.toolTip, 'opacity', {duration: 500, wait: false}).set(0);
		},
		onShow: function(toolTip) {
			this.fx.start(1);
		},
		onHide: function(toolTip) {
			this.fx.start(0);
		}
	});
});

