

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}('G Y={6Q:\'1.6.0.2\',1w:{2N:!!(1i.5J&&!1i.6R),3J:!!1i.6R,3j:3K.3L.2O(\'bp/\')>-1,5K:3K.3L.2O(\'5K\')>-1&&3K.3L.2O(\'8A\')==-1,8B:!!3K.3L.1k(/bq.*br.*8C/)},2P:{5L:!!V.2b,4R:!!1i.4S,5M:V.2Q(\'2k\').3M&&V.2Q(\'2k\').3M!==V.2Q(\'6S\').3M},5N:\'<4T[^>]*>([\\\\S\\\\s]*?)<\\/4T>\',8D:/^\\/\\*-bs-([\\s\\S]*)\\*\\/\\s*$/,2q:q(){},K:q(x){o x}};E(Y.1w.8B)Y.2P.5M=1d;G 1E={1L:q(){G a=17,4U=$A(1c);E(J.1M(4U[0]))a=4U.3N();q 2r(){C.22.2B(C,1c)}J.U(2r,1E.W);2r.6T=a;2r.8E=[];E(a){G b=q(){};b.18=a.18;2r.18=1e b;a.8E.14(2r)}N(G i=0;i<4U.M;i++)2r.4V(4U[i]);E(!2r.18.22)2r.18.22=Y.2q;2r.18.bt=2r;o 2r}};1E.W={4V:q(a){G b=C.6T&&C.6T.18;G c=J.4g(a);E(!J.4g({24:1f}).M)c.14("24","8F");N(G i=0,M=c.M;i<M;i++){G d=c[i],1g=a[d];E(b&&J.1M(1g)&&1g.8G().2C()=="$2Y"){G e=1g,1g=J.U((q(m){o q(){o b[m].2B(C,1c)}})(d).3O(e),{8F:q(){o e},24:q(){o e.24()}})}C.18[d]=1g}o C}};G 3P={};J.U=q(a,b){N(G c 1s b)a[c]=b[c];o a};J.U(J,{1W:q(a){1N{E(J.1X(a))o\'3k\';E(a===17)o\'17\';o a.1W?a.1W():1B(a)}1Y(e){E(e 8H bu)o\'...\';3l e;}},2s:q(a){G b=2R a;4h(b){1O\'3k\':1O\'q\':1O\'bv\':o;1O\'bw\':o a.24()}E(a===17)o\'17\';E(a.2s)o a.2s();E(J.2Z(a))o;G c=[];N(G d 1s a){G e=J.2s(a[d]);E(!J.1X(e))c.14(d.2s()+\': \'+e)}o\'{\'+c.1P(\', \')+\'}\'},3m:q(a){o $H(a).3m()},31:q(a){o a&&a.31?a.31():1B.4i(a)},4g:q(a){G b=[];N(G c 1s a)b.14(c);o b},25:q(a){G b=[];N(G c 1s a)b.14(a[c]);o b},1Z:q(a){o J.U({},a)},2Z:q(a){o a&&a.2t==1},3n:q(a){o a!=17&&2R a=="2D"&&\'bx\'1s a&&\'1P\'1s a},6U:q(a){o a 8H 2S},1M:q(a){o 2R a=="q"},2l:q(a){o 2R a=="5O"},3Q:q(a){o 2R a=="by"},1X:q(a){o 2R a=="3k"}});J.U(6V.18,{8G:q(){G a=C.24().1k(/^[\\s\\(]*q[^(]*\\((.*?)\\)/)[1].32(",").5P("2T");o a.M==1&&!a[0]?[]:a},1o:q(){E(1c.M<2&&J.1X(1c[0]))o C;G a=C,2c=$A(1c),2D=2c.3N();o q(){o a.2B(2D,2c.1z($A(1c)))}},bz:q(){G b=C,2c=$A(1c),2D=2c.3N();o q(a){o b.2B(2D,[a||1i.bA].1z(2c))}},5Q:q(){E(!1c.M)o C;G a=C,2c=$A(1c);o q(){o a.2B(C,2c.1z($A(1c)))}},6W:q(){G a=C,2c=$A(1c),8I=2c.3N()*8J;o 1i.bB(q(){o a.2B(a,2c)},8I)},3O:q(a){G b=C;o q(){o a.2B(C,[b.1o(C)].1z($A(1c)))}},3o:q(){E(C.6X)o C.6X;G a=C;o C.6X=q(){o a.2B(17,[C].1z($A(1c)))}}});6V.18.3p=6V.18.6W.5Q(0.bC);bD.18.2s=q(){o\'"\'+C.bE()+\'-\'+(C.bF()+1).3q(2)+\'-\'+C.bG().3q(2)+\'T\'+C.bH().3q(2)+\':\'+C.bI().3q(2)+\':\'+C.bJ().3q(2)+\'Z"\'};G 8K={8L:q(){G a;N(G i=0,M=1c.M;i<M;i++){G b=1c[i];1N{a=b();1F}1Y(e){}}o a}};3a.18.1k=3a.18.2d;3a.8M=q(a){o 1B(a).1x(/([.*+?^=!:${}()|[\\]\\/\\\\])/g,\'\\\\$1\')};G 8N=1E.1L({22:q(a,b){C.4W=a;C.4X=b;C.5R=1d;C.4Y()},4Y:q(){C.4j=8O(C.4Z.1o(C),C.4X*8J)},6Y:q(){C.4W(C)},6Z:q(){E(!C.4j)o;8P(C.4j);C.4j=17},4Z:q(){E(!C.5R){1N{C.5R=1f;C.6Y()}bK{C.5R=1d}}}});J.U(1B,{4i:q(a){o a==17?\'\':1B(a)},8Q:{\'\\b\':\'\\\\b\',\'\\t\':\'\\\\t\',\'\\n\':\'\\\\n\',\'\\f\':\'\\\\f\',\'\\r\':\'\\\\r\',\'\\\\\':\'\\\\\\\\\'}});J.U(1B.18,{2m:q(a,b){G c=\'\',3r=C,1k;b=1c.4k.70(b);1q(3r.M>0){E(1k=3r.1k(a)){c+=3r.3s(0,1k.50);c+=1B.4i(b(1k));3r=3r.3s(1k.50+1k[0].M)}19{c+=3r,3r=\'\'}}o c},8R:q(b,c,d){c=C.2m.70(c);d=J.1X(d)?1:d;o C.2m(b,q(a){E(--d<0)o a[0];o c(a)})},8S:q(a,b){C.2m(a,b);o 1B(C)},bL:q(a,b){a=a||30;b=J.1X(b)?\'...\':b;o C.M>a?C.3s(0,a-b.M)+b:1B(C)},2T:q(){o C.1x(/^\\s+/,\'\').1x(/\\s+$/,\'\')},8T:q(){o C.1x(/<\\/?[^>]+>/8U,\'\')},3b:q(){o C.1x(1e 3a(Y.5N,\'8V\'),\'\')},8W:q(){G b=1e 3a(Y.5N,\'8V\');G c=1e 3a(Y.5N,\'bM\');o(C.1k(b)||[]).2e(q(a){o(a.1k(c)||[\'\',\'\'])[1]})},3R:q(){o C.8W().2e(q(a){o 5S(a)})},5T:q(){G a=1c.4k;a.2U.bN=C;o a.2k.3t},8X:q(){G c=1e I(\'2k\');c.3t=C.8T();o c.2o[0]?(c.2o.M>1?$A(c.2o).2E(\'\',q(a,b){o a+b.71}):c.2o[0].71):\'\'},5U:q(e){G f=C.2T().1k(/([^?#]*)(#.*)?$/);E(!f)o{};o f[1].32(e||\'&\').2E({},q(a,b){E((b=b.32(\'=\'))[0]){G c=72(b.3N());G d=b.M>1?b.1P(\'=\'):b[0];E(d!=3k)d=72(d);E(c 1s a){E(!J.3n(a[c]))a[c]=[a[c]];a[c].14(d)}19 a[c]=d}o a})},2u:q(){o C.32(\'\')},73:q(){o C.3s(0,C.M-1)+1B.bO(C.8Y(C.M-1)+1)},5V:q(a){o a<1?\'\':1e 1I(a+1).1P(C)},74:q(){G a=C.32(\'-\'),75=a.M;E(75==1)o a[0];G b=C.5W(0)==\'-\'?a[0].5W(0).2f()+a[0].4l(1):a[0];N(G i=1;i<75;i++)b+=a[i].5W(0).2f()+a[i].4l(1);o b},51:q(){o C.5W(0).2f()+C.4l(1).1G()},bP:q(){o C.2m(/::/,\'/\').2m(/([A-Z]+)([A-Z][a-z])/,\'#{1}52#{2}\').2m(/([a-z\\d])([A-Z])/,\'#{1}52#{2}\').2m(/-/,\'52\').1G()},bQ:q(){o C.2m(/52/,\'-\')},1W:q(c){G d=C.2m(/[\\bR-\\bS\\\\]/,q(a){G b=1B.8Q[a[0]];o b?b:\'\\\\bT\'+a[0].8Y().3q(2,16)});E(c)o\'"\'+d.1x(/"/g,\'\\\\"\')+\'"\';o"\'"+d.1x(/\'/g,\'\\\\\\\'\')+"\'"},2s:q(){o C.1W(1f)},76:q(a){o C.8R(a||Y.8D,\'#{1}\')},8Z:q(){G a=C;E(a.3S())o 1d;a=C.1x(/\\\\./g,\'@\').1x(/"[^"\\\\\\n\\r]*"/g,\'\');o(/^[,:{}\\[\\]0-9.\\-+bU-u \\n\\r\\t]*$/).2d(a)},4m:q(a){G b=C.76();1N{E(!a||b.8Z())o 5S(\'(\'+b+\')\')}1Y(e){}3l 1e bV(\'bW bX 90 5O: \'+C.1W());},1p:q(a){o C.2O(a)>-1},77:q(a){o C.2O(a)===0},91:q(a){G d=C.M-a.M;o d>=0&&C.78(a)===d},4n:q(){o C==\'\'},3S:q(){o/^\\s*$/.2d(C)},92:q(a,b){o 1e 2g(C,b).2b(a)}});E(Y.1w.3j||Y.1w.2N)J.U(1B.18,{5T:q(){o C.1x(/&/g,\'&93;\').1x(/</g,\'&94;\').1x(/>/g,\'&95;\')},8X:q(){o C.1x(/&93;/g,\'&\').1x(/&94;/g,\'<\').1x(/&95;/g,\'>\')}});1B.18.2m.70=q(b){E(J.1M(b))o b;G c=1e 2g(b);o q(a){o c.2b(a)}};1B.18.bY=1B.18.5U;J.U(1B.18.5T,{2k:V.2Q(\'2k\'),2U:V.96(\'\')});97(1B.18.5T)2k.4o(2U);G 2g=1E.1L({22:q(a,b){C.98=a.24();C.99=b||2g.9a},2b:q(f){E(J.1M(f.79))f=f.79();o C.98.2m(C.99,q(a){E(f==17)o\'\';G b=a[1]||\'\';E(b==\'\\\\\')o a[2];G c=f,53=a[3];G d=/^([^.[]+|\\[((?:.*?[^\\\\])?)\\])(\\.|\\[|$)/;a=d.9b(53);E(a==17)o b;1q(a!=17){G e=a[1].77(\'[\')?a[2].2m(\'\\\\\\\\]\',\']\'):a[1];c=c[e];E(17==c||\'\'==a[3])1F;53=53.4l(\'[\'==a[3]?a[1].M:a[0].M);a=d.9b(53)}o b+1B.4i(c)})}});2g.9a=/(^|.|\\r|\\n)(#\\{(.*?)\\})/;G $1F={};G 26={1l:q(b,c){G d=0;b=b.1o(c);1N{C.3c(q(a){b(a,d++)})}1Y(e){E(e!=$1F)3l e;}o C},9c:q(a,b,c){b=b?b.1o(c):Y.K;G d=-a,7a=[],7b=C.2u();1q((d+=a)<7b.M)7a.14(7b.3s(d,d+a));o 7a.7c(b,c)},7d:q(c,d){c=c?c.1o(d):Y.K;G e=1f;C.1l(q(a,b){e=e&&!!c(a,b);E(!e)3l $1F;});o e},9d:q(c,d){c=c?c.1o(d):Y.K;G e=1d;C.1l(q(a,b){E(e=!!c(a,b))3l $1F;});o e},7c:q(c,d){c=c?c.1o(d):Y.K;G e=[];C.1l(q(a,b){e.14(c(a,b))});o e},5X:q(c,d){c=c.1o(d);G e;C.1l(q(a,b){E(c(a,b)){e=a;3l $1F;}});o e},4p:q(c,d){c=c.1o(d);G e=[];C.1l(q(a,b){E(c(a,b))e.14(a)});o e},bZ:q(c,d,e){d=d?d.1o(e):Y.K;G f=[];E(J.2l(c))c=1e 3a(c);C.1l(q(a,b){E(c.1k(a))f.14(d(a,b))});o f},1p:q(b){E(J.1M(C.2O))E(C.2O(b)!=-1)o 1f;G c=1d;C.1l(q(a){E(a==b){c=1f;3l $1F;}});o c},c0:q(b,c){c=J.1X(c)?17:c;o C.9c(b,q(a){1q(a.M<b)a.14(c);o a})},2E:q(c,d,e){d=d.1o(e);C.1l(q(a,b){c=d(c,a,b)});o c},5P:q(b){G c=$A(1c).3s(1);o C.2e(q(a){o a[b].2B(a,c)})},c1:q(c,d){c=c?c.1o(d):Y.K;G e;C.1l(q(a,b){a=c(a,b);E(e==17||a>=e)e=a});o e},c2:q(c,d){c=c?c.1o(d):Y.K;G e;C.1l(q(a,b){a=c(a,b);E(e==17||a<e)e=a});o e},c3:q(c,d){c=c?c.1o(d):Y.K;G e=[],7e=[];C.1l(q(a,b){(c(a,b)?e:7e).14(a)});o[e,7e]},4q:q(b){G c=[];C.1l(q(a){c.14(a[b])});o c},c4:q(c,d){c=c.1o(d);G e=[];C.1l(q(a,b){E(!c(a,b))e.14(a)});o e},9e:q(e,f){e=e.1o(f);o C.2e(q(a,b){o{1g:a,54:e(a,b)}}).c5(q(c,d){G a=c.54,b=d.54;o a<b?-1:a>b?1:0}).4q(\'1g\')},2u:q(){o C.2e()},c6:q(){G c=Y.K,2c=$A(1c);E(J.1M(2c.1Q()))c=2c.c7();G d=[C].1z(2c).2e($A);o C.2e(q(a,b){o c(d.4q(b))})},9f:q(){o C.2u().M},1W:q(){o\'#<26:\'+C.2u().1W()+\'>\'}};J.U(26,{2e:26.7c,7f:26.5X,20:26.4p,4r:26.4p,c8:26.1p,c9:26.2u,ca:26.7d,cb:26.9d});q $A(a){E(!a)o[];E(a.2u)o a.2u();G b=a.M||0,15=1e 1I(b);1q(b--)15[b]=a[b];o 15}E(Y.1w.3j){$A=q(a){E(!a)o[];E(!(J.1M(a)&&a==\'[2D cc]\')&&a.2u)o a.2u();G b=a.M||0,15=1e 1I(b);1q(b--)15[b]=a[b];o 15}}1I.9g=$A;J.U(1I.18,26);E(!1I.18.7g)1I.18.7g=1I.18.55;J.U(1I.18,{3c:q(a){N(G i=0,M=C.M;i<M;i++)a(C[i])},9h:q(){C.M=0;o C},2C:q(){o C[0]},1Q:q(){o C[C.M-1]},cd:q(){o C.20(q(a){o a!=17})},9i:q(){o C.2E([],q(a,b){o a.1z(J.3n(b)?b.9i():[b])})},56:q(){G b=$A(1c);o C.20(q(a){o!b.1p(a)})},55:q(a){o(a!==1d?C:C.2u()).7g()},ce:q(){o C.M>1?C:C[0]},9j:q(d){o C.2E([],q(a,b,c){E(0==c||(d?a.1Q()!=b:!a.1p(b)))a.14(b);o a})},cf:q(c){o C.9j().4p(q(b){o c.5X(q(a){o b===a})})},1Z:q(){o[].1z(C)},9f:q(){o C.M},1W:q(){o\'[\'+C.2e(J.1W).1P(\', \')+\']\'},2s:q(){G c=[];C.1l(q(a){G b=J.2s(a);E(!J.1X(b))c.14(b)});o\'[\'+c.1P(\', \')+\']\'}});E(J.1M(1I.18.9k))1I.18.3c=1I.18.9k;E(!1I.18.2O)1I.18.2O=q(a,i){i||(i=0);G b=C.M;E(i<0)i=b+i;N(;i<b;i++)E(C[i]===a)o i;o-1};E(!1I.18.78)1I.18.78=q(a,i){i=cg(i)?C.M:(i<0?C.M+i:i)+1;G n=C.3s(0,i).55().2O(a);o(n<0)?n:i-n-1};1I.18.2u=1I.18.1Z;q $w(a){E(!J.2l(a))o[];a=a.2T();o a?a.32(/\\s+/):[]}E(Y.1w.3J){1I.18.1z=q(){G a=[];N(G i=0,M=C.M;i<M;i++)a.14(C[i]);N(G i=0,M=1c.M;i<M;i++){E(J.3n(1c[i])){N(G j=0,9l=1c[i].M;j<9l;j++)a.14(1c[i][j])}19{a.14(1c[i])}}o a}}J.U(3T.18,{ch:q(){o C.3q(2,16)},73:q(){o C+1},5V:q(a){$R(0,C,1f).1l(a);o C},3q:q(a,b){G c=C.24(b||10);o\'0\'.5V(a-c.M)+c},2s:q(){o ci(C)?C.24():\'17\'}});$w(\'cj ck cl cm\').1l(q(a){3T.18[a]=co[a].3o()});q $H(a){o 1e 2S(a)};G 2S=1E.1L(26,(q(){q 7h(a,b){E(J.1X(b))o a;o a+\'=\'+9m(1B.4i(b))}o{22:q(a){C.3u=J.6U(a)?a.57():J.1Z(a)},3c:q(a){N(G b 1s C.3u){G c=C.3u[b],5Y=[b,c];5Y.4s=b;5Y.1g=c;a(5Y)}},58:q(a,b){o C.3u[a]=b},7i:q(a){o C.3u[a]},cp:q(a){G b=C.3u[a];7j C.3u[a];o b},57:q(){o J.1Z(C.3u)},4g:q(){o C.4q(\'4s\')},25:q(){o C.4q(\'1g\')},50:q(b){G c=C.5X(q(a){o a.1g===b});o c&&c.4s},cq:q(a){o C.1Z().3U(a)},3U:q(c){o 1e 2S(c).2E(C,q(a,b){a.58(b.4s,b.1g);o a})},3m:q(){o C.2e(q(a){G b=9m(a.4s),25=a.1g;E(25&&2R 25==\'2D\'){E(J.3n(25))o 25.2e(7h.5Q(b)).1P(\'&\')}o 7h(b,25)}).1P(\'&\')},1W:q(){o\'#<2S:{\'+C.2e(q(a){o a.2e(J.1W).1P(\': \')}).1P(\', \')+\'}>\'},2s:q(){o J.2s(C.57())},1Z:q(){o 1e 2S(C)}}})());2S.18.79=2S.18.57;2S.9g=$H;G 9n=1E.1L(26,{22:q(a,b,c){C.59=a;C.7k=b;C.9o=c},3c:q(a){G b=C.59;1q(C.1p(b)){a(b);b=b.73()}},1p:q(a){E(a<C.59)o 1d;E(C.9o)o a<C.7k;o a<=C.7k}});G $R=q(a,b,c){o 1e 9n(a,b,c)};G 1t={9p:q(){o 8K.8L(q(){o 1e 9q()},q(){o 1e 9r(\'cr.9s\')},q(){o 1e 9r(\'cs.9s\')})||1d},7l:0};1t.4t={5a:[],3c:q(a){C.5a.3c(a)},9t:q(a){E(!C.1p(a))C.5a.14(a)},ct:q(a){C.5a=C.5a.56(a)},5Z:q(b,c,d,f){C.1l(q(a){E(J.1M(a[b])){1N{a[b].2B(a,[c,d,f])}1Y(e){}}})}};J.U(1t.4t,26);1t.4t.9t({60:q(){1t.7l++},3v:q(){1t.7l--}});1t.7m=1E.1L({22:q(a){C.1b={28:\'5b\',61:1f,9u:\'62/x-cu-6S-cv\',7n:\'cw-8\',2v:\'\',4m:1f,7o:1f};J.U(C.1b,a||{});C.1b.28=C.1b.28.1G();E(J.2l(C.1b.2v))C.1b.2v=C.1b.2v.5U();19 E(J.6U(C.1b.2v))C.1b.2v=C.1b.2v.57()}});1t.3V=1E.1L(1t.7m,{7p:1d,22:q($2Y,b,c){$2Y(c);C.1R=1t.9p();C.2V(b)},2V:q(a){C.3W=a;C.28=C.1b.28;G b=J.1Z(C.1b.2v);E(![\'7i\',\'5b\'].1p(C.28)){b[\'cx\']=C.28;C.28=\'5b\'}C.2v=b;E(b=J.3m(b)){E(C.28==\'7i\')C.3W+=(C.3W.1p(\'?\')?\'&\':\'?\')+b;19 E(/cy|8C|8A/.2d(3K.3L))b+=\'&52=\'}1N{G c=1e 1t.7q(C);E(C.1b.60)C.1b.60(c);1t.4t.5Z(\'60\',C,c);C.1R.cz(C.28.2f(),C.3W,C.1b.61);E(C.1b.61)C.7r.1o(C).3p(1);C.1R.63=C.7s.1o(C);C.9v();C.1S=C.28==\'5b\'?(C.1b.cA||b):17;C.1R.cB(C.1S);E(!C.1b.61&&C.1R.9w)C.7s()}1Y(e){C.3X(e)}},7s:q(){G a=C.1R.2W;E(a>1&&!((a==4)&&C.7p))C.7r(C.1R.2W)},9v:q(){G b={\'X-cC-cD\':\'9q\',\'X-Y-6Q\':Y.6Q,\'cE\':\'2U/cF, 2U/cG, 62/9x, 2U/9x, */*\'};E(C.28==\'5b\'){b[\'7t-1n\']=C.1b.9u+(C.1b.7n?\'; cH=\'+C.1b.7n:\'\');E(C.1R.9w&&(3K.3L.1k(/5K\\/(\\d{4})/)||[0,9y])[1]<9y)b[\'cI\']=\'cJ\'}E(2R C.1b.9z==\'2D\'){G c=C.1b.9z;E(J.1M(c.14))N(G i=0,M=c.M;i<M;i+=2)b[c[i]]=c[i+1];19 $H(c).1l(q(a){b[a.4s]=a.1g})}N(G d 1s b)C.1R.cK(d,b[d])},3Y:q(){G a=C.5c();o!a||(a>=cL&&a<cM)},5c:q(){1N{o C.1R.64||0}1Y(e){o 0}},7r:q(a){G b=1t.3V.9A[a],3d=1e 1t.7q(C);E(b==\'7u\'){1N{C.7p=1f;(C.1b[\'4u\'+3d.64]||C.1b[\'4u\'+(C.3Y()?\'cN\':\'cO\')]||Y.2q)(3d,3d.65)}1Y(e){C.3X(e)}G c=3d.4v(\'7t-1n\');E(C.1b.7o==\'9B\'||(C.1b.7o&&C.66()&&c&&c.1k(/^\\s*(2U|62)\\/(x-)?(cP|cQ)4T(;.*)?\\s*$/i)))C.9C()}1N{(C.1b[\'4u\'+b]||Y.2q)(3d,3d.65);1t.4t.5Z(\'4u\'+b,C,3d,3d.65)}1Y(e){C.3X(e)}E(b==\'7u\'){C.1R.63=Y.2q}},66:q(){G m=C.3W.1k(/^\\s*cR?:\\/\\/[^\\/]*/);o!m||(m[0]==\'#{7v}//#{7w}#{67}\'.92({7v:68.7v,7w:V.7w,67:68.67?\':\'+68.67:\'\'}))},4v:q(a){1N{o C.1R.7x(a)||17}1Y(e){o 17}},9C:q(){1N{o 5S((C.1R.3w||\'\').76())}1Y(e){C.3X(e)}},3X:q(a){(C.1b.9D||Y.2q)(C,a);1t.4t.5Z(\'9D\',C,a)}});1t.3V.9A=[\'cS\',\'cT\',\'cU\',\'cV\',\'7u\'];1t.7q=1E.1L({22:q(a){C.2V=a;G b=C.1R=a.1R,2W=C.2W=b.2W;E((2W>2&&!Y.1w.2N)||2W==4){C.64=C.5c();C.7y=C.9E();C.3w=1B.4i(b.3w);C.65=C.9F()}E(2W==4){G c=b.9G;C.9G=J.1X(c)?17:c;C.cW=C.9H()}},64:0,7y:\'\',5c:1t.3V.18.5c,9E:q(){1N{o C.1R.7y||\'\'}1Y(e){o\'\'}},4v:1t.3V.18.4v,cX:q(){1N{o C.7z()}1Y(e){o 17}},7x:q(a){o C.1R.7x(a)},7z:q(){o C.1R.7z()},9F:q(){G a=C.4v(\'X-90\');E(!a)o 17;a=72(8M(a));1N{o a.4m(C.2V.1b.9I||!C.2V.66())}1Y(e){C.2V.3X(e)}},9H:q(){G a=C.2V.1b;E(!a.4m||(a.4m!=\'9B\'&&!(C.4v(\'7t-1n\')||\'\').1p(\'62/cY\'))||C.3w.3S())o 17;1N{o C.3w.4m(a.9I||!C.2V.66())}1Y(e){C.2V.3X(e)}}});1t.9J=1E.1L(1t.3V,{22:q($2Y,d,e,f){C.69={3Y:(d.3Y||d),7A:(d.7A||(d.3Y?17:d))};f=J.1Z(f);G g=f.3v;f.3v=(q(a,b){C.9K(a.3w);E(J.1M(g))g(a,b)}).1o(C);$2Y(e,f)},9K:q(a){G b=C.69[C.3Y()?\'3Y\':\'7A\'],1b=C.1b;E(!1b.3R)a=a.3b();E(b=$(b)){E(1b.6a){E(J.2l(1b.6a)){G c={};c[1b.6a]=a;b.2w(c)}19 1b.6a(b,a)}19 b.3U(a)}}});1t.cZ=1E.1L(1t.7m,{22:q($2Y,b,c,d){$2Y(d);C.3v=C.1b.3v;C.4X=(C.1b.4X||2);C.3Z=(C.1b.3Z||1);C.7B={};C.69=b;C.3W=c;C.59()},59:q(){C.1b.3v=C.9L.1o(C);C.4Z()},6Z:q(){C.7B.1b.3v=3k;d0(C.4j);(C.3v||Y.2q).2B(C,1c)},9L:q(a){E(C.1b.3Z){C.3Z=(a.3w==C.9M?C.3Z*C.1b.3Z:1);C.9M=a.3w}C.4j=C.4Z.1o(C).6W(C.3Z*C.4X)},4Z:q(){C.7B=1e 1t.9J(C.69,C.3W,C.1b)}});q $(a){E(1c.M>1){N(G i=0,7C=[],M=1c.M;i<M;i++)7C.14($(1c[i]));o 7C}E(J.2l(a))a=V.d1(a);o I.U(a)}E(Y.2P.5L){V.7D=q(a,b){G c=[];G d=V.2b(a,$(b)||V,17,d2.d3,17);N(G i=0,M=d.d4;i<M;i++)c.14(I.U(d.d5(i)));o c}}E(!1i.5d)G 5d={};E(!5d.9N){J.U(5d,{9N:1,d6:2,9O:3,d7:4,d8:5,d9:6,da:7,db:8,dc:9,dd:10,de:11,df:12})}(q(){G d=C.I;C.I=q(a,b){b=b||{};a=a.1G();G c=I.5e;E(Y.1w.2N&&b.21){a=\'<\'+a+\' 21="\'+b.21+\'">\';7j b.21;o I.5f(V.2Q(a),b)}E(!c[a])c[a]=I.U(V.2Q(a));o I.5f(c[a].dg(1d),b)};J.U(C.I,d||{})}).7E(1i);I.5e={};I.W={7F:q(a){o $(a).1a.3e!=\'6b\'},9P:q(a){a=$(a);I[I.7F(a)?\'9Q\':\'9R\'](a);o a},9Q:q(a){$(a).1a.3e=\'6b\';o a},9R:q(a){$(a).1a.3e=\'\';o a},9S:q(a){a=$(a);a.1A.5g(a);o a},3U:q(a,b){a=$(a);E(b&&b.2x)b=b.2x();E(J.2Z(b))o a.3U().2w(b);b=J.31(b);a.3t=b.3b();b.3R.1o(b).3p();o a},1x:q(a,b){a=$(a);E(b&&b.2x)b=b.2x();19 E(!J.2Z(b)){b=J.31(b);G c=a.dh.di();c.dj(a);b.3R.1o(b).3p();b=c.dk(b.3b())}a.1A.7G(b,a);o a},2w:q(a,b){a=$(a);E(J.2l(b)||J.3Q(b)||J.2Z(b)||(b&&(b.2x||b.31)))b={41:b};G c,2w,1h,2o;N(G d 1s b){c=b[d];d=d.1G();2w=I.4w[d];E(c&&c.2x)c=c.2x();E(J.2Z(c)){2w(a,c);2F}c=J.31(c);1h=((d==\'7H\'||d==\'6c\')?a.1A:a).1h.2f();2o=I.6d(1h,c.3b());E(d==\'2h\'||d==\'6c\')2o.55();2o.1l(2w.5Q(a));c.3R.1o(c).3p()}o a},3O:q(a,b,c){a=$(a);E(J.2Z(b))$(b).5f(c||{});19 E(J.2l(b))b=1e I(b,c);19 b=1e I(\'2k\',b);E(a.1A)a.1A.7G(b,a);b.4o(a);o b},1W:q(d){d=$(d);G e=\'<\'+d.1h.1G();$H({\'29\':\'29\',\'1J\':\'5h\'}).1l(q(a){G b=a.2C(),9T=a.1Q();G c=(d[b]||\'\').24();E(c)e+=\' \'+9T+\'=\'+c.1W(1f)});o e+\'>\'},6e:q(a,b){a=$(a);G c=[];1q(a=a[b])E(a.2t==1)c.14(I.U(a));o c},7I:q(a){o $(a).6e(\'1A\')},9U:q(a){o $(a).20("*")},9V:q(a){a=$(a).4x;1q(a&&a.2t!=1)a=a.3x;o $(a)},9W:q(a){E(!(a=$(a).4x))o[];1q(a&&a.2t!=1)a=a.3x;E(a)o[a].1z($(a).5i());o[]},7J:q(a){o $(a).6e(\'9X\')},5i:q(a){o $(a).6e(\'3x\')},dl:q(a){a=$(a);o a.7J().55().1z(a.5i())},1k:q(a,b){E(J.2l(b))b=1e O(b);o b.1k($(a))},dm:q(a,b,c){a=$(a);E(1c.M==1)o $(a.1A);G d=a.7I();o J.3Q(b)?d[b]:O.4y(d,b,c)},dn:q(a,b,c){a=$(a);E(1c.M==1)o a.9V();o J.3Q(b)?a.9U()[b]:a.20(b)[c||0]},dp:q(a,b,c){a=$(a);E(1c.M==1)o $(O.1C.5j(a));G d=a.7J();o J.3Q(b)?d[b]:O.4y(d,b,c)},9Y:q(a,b,c){a=$(a);E(1c.M==1)o $(O.1C.5k(a));G d=a.5i();o J.3Q(b)?d[b]:O.4y(d,b,c)},20:q(){G a=$A(1c),1u=$(a.3N());o O.6f(1u,a)},42:q(){G a=$A(1c),1u=$(a.3N());o O.6f(1u.1A,a).56(1u)},9Z:q(a){a=$(a);G b=a.43(\'29\'),7K=1c.4k;E(b)o b;do{b=\'dq\'+7K.a0++}1q($(b));a.5f(\'29\',b);o b},43:q(a,b){a=$(a);E(Y.1w.2N){G t=I.2G.6g;E(t.25[b])o t.25[b](a,b);E(t.3y[b])b=t.3y[b];E(b.1p(\':\')){o(!a.7L||!a.7L[b])?17:a.7L[b].1g}}o a.7M(b)},5f:q(a,b,c){a=$(a);G d={},t=I.2G.5l;E(2R b==\'2D\')d=b;19 d[b]=J.1X(c)?1f:c;N(G e 1s d){b=t.3y[e]||e;c=d[e];E(t.25[e])b=t.25[e](a,c);E(c===1d||c===17)a.7N(b);19 E(c===1f)a.a1(b,b);19 a.a1(b,c)}o a},a2:q(a){o $(a).4z().2y},a3:q(a){o $(a).4z().1T},5m:q(a){o 1e I.6h(a)},6i:q(a,b){E(!(a=$(a)))o;G c=a.1J;o(c.M>0&&(c==b||1e 3a("(^|\\\\s)"+b+"(\\\\s|$)").2d(c)))},a4:q(a,b){E(!(a=$(a)))o;E(!a.6i(b))a.1J+=(a.1J?\' \':\'\')+b;o a},a5:q(a,b){E(!(a=$(a)))o;a.1J=a.1J.1x(1e 3a("(^|\\\\s+)"+b+"(\\\\s+|$)"),\' \').2T();o a},dr:q(a,b){E(!(a=$(a)))o;o a[a.6i(b)?\'a5\':\'a4\'](b)},ds:q(a){a=$(a);G b=a.4x;1q(b){G c=b.3x;E(b.2t==3&&!/\\S/.2d(b.71))a.5g(b);b=c}o a},4n:q(a){o $(a).3t.3S()},6j:q(b,c){b=$(b),c=$(c);G d=c;E(b.a6)o(b.a6(c)&8)===8;E(b.5n&&!Y.1w.3J){G e=b.5n,a=c.5n,4A=c.3x;E(!4A){do{c=c.1A}1q(!(4A=c.3x)&&c.1A)}E(4A&&4A.5n)o(e>a&&e<4A.5n)}1q(b=b.1A)E(b==d)o 1f;o 1d},a7:q(a){a=$(a);G b=a.44();1i.a7(b[0],b[1]);o a},1D:q(a,b){a=$(a);b=b==\'7O\'?\'6k\':b.74();G c=a.1a[b];E(!c){G d=V.dt.du(a,17);c=d?d[b]:17}E(b==\'2H\')o c?4B(c):1.0;o c==\'6l\'?17:c},dv:q(a){o $(a).1D(\'2H\')},4C:q(a,b){a=$(a);G c=a.1a,1k;E(J.2l(b)){a.1a.7P+=\';\'+b;o b.1p(\'2H\')?a.4D(b.1k(/2H:\\s*(\\d?\\.?\\d*)/)[1]):a}N(G d 1s b)E(d==\'2H\')a.4D(b[d]);19 c[(d==\'7O\'||d==\'6k\')?(J.1X(c.7Q)?\'6k\':\'7Q\'):d]=b[d];o a},4D:q(a,b){a=$(a);a.1a.2H=(b==1||b===\'\')?\'\':(b<0.6m)?0:b;o a},4z:q(a){a=$(a);G b=$(a).1D(\'3e\');E(b!=\'6b\'&&b!=17)o{1T:a.4E,2y:a.4F};G c=a.1a;G d=c.7R;G e=c.1v;G f=c.3e;c.7R=\'6n\';c.1v=\'4G\';c.3e=\'dw\';G g=a.a8;G h=a.a9;c.3e=f;c.1v=e;c.7R=d;o{1T:g,2y:h}},dx:q(a){a=$(a);G b=I.1D(a,\'1v\');E(b==\'4H\'||!b){a.7S=1f;a.1a.1v=\'5o\';E(1i.6R){a.1a.2h=0;a.1a.2I=0}}o a},dy:q(a){a=$(a);E(a.7S){a.7S=3k;a.1a.1v=a.1a.2h=a.1a.2I=a.1a.41=a.1a.6o=\'\'}o a},dz:q(a){a=$(a);E(a.47)o a;a.47=I.1D(a,\'7T\')||\'6l\';E(a.47!==\'6n\')a.1a.7T=\'6n\';o a},dA:q(a){a=$(a);E(!a.47)o a;a.1a.7T=a.47==\'6l\'?\'\':a.47;a.47=17;o a},44:q(a){G b=0,2a=0;do{b+=a.48||0;2a+=a.49||0;a=a.3f}1q(a);o I.4a(2a,b)},5p:q(a){G b=0,2a=0;do{b+=a.48||0;2a+=a.49||0;a=a.3f;E(a){E(a.1h==\'aa\')1F;G p=I.1D(a,\'1v\');E(p!==\'4H\')1F}}1q(a);o I.4a(2a,b)},7U:q(a){a=$(a);E(a.1D(\'1v\')==\'4G\')o;G b=a.5p();G c=b[1];G d=b[0];G e=a.a8;G f=a.a9;a.ab=d-4B(a.1a.2I||0);a.ac=c-4B(a.1a.2h||0);a.ad=a.1a.1T;a.ae=a.1a.2y;a.1a.1v=\'4G\';a.1a.2h=c+\'2p\';a.1a.2I=d+\'2p\';a.1a.1T=e+\'2p\';a.1a.2y=f+\'2p\';o a},7V:q(a){a=$(a);E(a.1D(\'1v\')==\'5o\')o;a.1a.1v=\'5o\';G b=4B(a.1a.2h||0)-(a.ac||0);G c=4B(a.1a.2I||0)-(a.ab||0);a.1a.2h=b+\'2p\';a.1a.2I=c+\'2p\';a.1a.2y=a.ae;a.1a.1T=a.ad;o a},7W:q(a){G b=0,2a=0;do{b+=a.3z||0;2a+=a.3A||0;a=a.1A}1q(a);o I.4a(2a,b)},4I:q(a){E(a.3f)o $(a.3f);E(a==V.1S)o $(a);1q((a=a.1A)&&a!=V.1S)E(I.1D(a,\'1v\')!=\'4H\')o $(a);o $(V.1S)},5q:q(a){G b=0,2a=0;G c=a;do{b+=c.48||0;2a+=c.49||0;E(c.3f==V.1S&&I.1D(c,\'1v\')==\'4G\')1F}1q(c=c.3f);c=a;do{E(!Y.1w.3J||c.1h==\'aa\'){b-=c.3z||0;2a-=c.3A||0}}1q(c=c.1A);o I.4a(2a,b)},af:q(a,b){G c=J.U({ag:1f,ah:1f,ai:1f,aj:1f,48:0,49:0},1c[2]||{});b=$(b);G p=b.5q();a=$(a);G d=[0,0];G e=17;E(I.1D(a,\'1v\')==\'4G\'){e=a.4I();d=e.5q()}E(e==V.1S){d[0]-=V.1S.49;d[1]-=V.1S.48}E(c.ag)a.1a.2I=(p[0]-d[0]+c.49)+\'2p\';E(c.ah)a.1a.2h=(p[1]-d[1]+c.48)+\'2p\';E(c.ai)a.1a.1T=b.4E+\'2p\';E(c.aj)a.1a.2y=b.4F+\'2p\';o a}};I.W.9Z.a0=1;J.U(I.W,{dB:I.W.20,dC:I.W.9W});I.2G={5l:{3y:{1J:\'5h\',ak:\'N\'},25:{}}};E(Y.1w.3J){I.W.1D=I.W.1D.3O(q(d,e,f){4h(f){1O\'2I\':1O\'2h\':1O\'6o\':1O\'41\':E(d(e,\'1v\')===\'4H\')o 17;1O\'2y\':1O\'1T\':E(!I.7F(e))o 17;G g=al(d(e,f),10);E(g!==e[\'2i\'+f.51()])o g+\'2p\';G h;E(f===\'2y\'){h=[\'6p-2h-1T\',\'6q-2h\',\'6q-41\',\'6p-41-1T\']}19{h=[\'6p-2I-1T\',\'6q-2I\',\'6q-6o\',\'6p-6o-1T\']}o h.2E(g,q(a,b){G c=d(e,b);o c===17?a:a-al(c,10)})+\'2p\';5r:o d(e,f)}});I.W.43=I.W.43.3O(q(a,b,c){E(c===\'6r\')o b.6r;o a(b,c)})}19 E(Y.1w.2N){I.W.4I=I.W.4I.3O(q(a,b){b=$(b);G c=b.1D(\'1v\');E(c!==\'4H\')o a(b);b.4C({1v:\'5o\'});G d=a(b);b.4C({1v:c});o d});$w(\'5p 5q\').1l(q(f){I.W[f]=I.W[f].3O(q(a,b){b=$(b);G c=b.1D(\'1v\');E(c!==\'4H\')o a(b);G d=b.4I();E(d&&d.1D(\'1v\')===\'dD\')d.4C({7X:1});b.4C({1v:\'5o\'});G e=a(b);b.4C({1v:c});o e})});I.W.1D=q(a,b){a=$(a);b=(b==\'7O\'||b==\'6k\')?\'7Q\':b.74();G c=a.1a[b];E(!c&&a.7Y)c=a.7Y[b];E(b==\'2H\'){E(c=(a.1D(\'4r\')||\'\').1k(/7Z\\(2H=(.*)\\)/))E(c[1])o 4B(c[1])/am;o 1.0}E(c==\'6l\'){E((b==\'1T\'||b==\'2y\')&&(a.1D(\'3e\')!=\'6b\'))o a[\'2i\'+b.51()]+\'2p\';o 17}o c};I.W.4D=q(b,c){q 80(a){o a.1x(/7Z\\([^\\)]*\\)/8U,\'\')}b=$(b);G d=b.7Y;E((d&&!d.dE)||(!d&&b.1a.7X==\'dF\'))b.1a.7X=1;G e=b.1D(\'4r\'),1a=b.1a;E(c==1||c===\'\'){(e=80(e))?1a.4r=e:1a.7N(\'4r\');o b}19 E(c<0.6m)c=0;1a.4r=80(e)+\'7Z(2H=\'+(c*am)+\')\';o b};I.2G={6g:{3y:{\'5h\':\'1J\',\'N\':\'ak\'},25:{6s:q(a,b){o a.7M(b,2)},an:q(a,b){G c=a.ao(b);o c?c.1g:""},1K:q(a,b){b=a.7M(b);o b?b.24().3s(23,-2):17},5s:q(a,b){o $(a).2J(b)?b:17},1a:q(a){o a.1a.7P.1G()},6r:q(a){o a.6r}}}};I.2G.5l={3y:J.U({dG:\'dH\',dI:\'dJ\'},I.2G.6g.3y),25:{2K:q(a,b){a.2K=!!b},1a:q(a,b){a.1a.7P=b?b:\'\'}}};I.2G.81={};$w(\'dK dL dM dN dO 6t \'+\'dP dQ dR dS\').1l(q(a){I.2G.5l.3y[a.1G()]=a;I.2G.81[a.1G()]=a});(q(v){J.U(v,{ap:v.6s,aq:v.6s,1n:v.6s,4J:v.an,2z:v.5s,2K:v.5s,dT:v.5s,dU:v.5s,dV:v.1K,ar:v.1K,dW:v.1K,dX:v.1K,dY:v.1K,dZ:v.1K,e0:v.1K,e1:v.1K,e2:v.1K,e3:v.1K,e4:v.1K,e5:v.1K,e6:v.1K,e7:v.1K,e8:v.1K,e9:v.1K,ea:v.1K,eb:v.1K})})(I.2G.6g.25)}19 E(Y.1w.5K&&/ec:1\\.8\\.0/.2d(3K.3L)){I.W.4D=q(a,b){a=$(a);a.1a.2H=(b==1)?0.ed:(b===\'\')?\'\':(b<0.6m)?0:b;o a}}19 E(Y.1w.3j){I.W.4D=q(a,b){a=$(a);a.1a.2H=(b==1||b===\'\')?\'\':(b<0.6m)?0:b;E(b==1)E(a.1h==\'at\'&&a.1T){a.1T++;a.1T--}19 1N{G n=V.96(\' \');a.4o(n);a.5g(n)}1Y(e){}o a};I.W.44=q(a){G b=0,2a=0;do{b+=a.48||0;2a+=a.49||0;E(a.3f==V.1S)E(I.1D(a,\'1v\')==\'4G\')1F;a=a.3f}1q(a);o I.4a(2a,b)}}E(Y.1w.2N||Y.1w.3J){I.W.3U=q(b,c){b=$(b);E(c&&c.2x)c=c.2x();E(J.2Z(c))o b.3U().2w(c);c=J.31(c);G d=b.1h.2f();E(d 1s I.4w.3B){$A(b.2o).1l(q(a){b.5g(a)});I.6d(d,c.3b()).1l(q(a){b.4o(a)})}19 b.3t=c.3b();c.3R.1o(c).3p();o b}}E(\'au\'1s V.2Q(\'2k\')){I.W.1x=q(b,c){b=$(b);E(c&&c.2x)c=c.2x();E(J.2Z(c)){b.1A.7G(c,b);o b}c=J.31(c);G d=b.1A,1h=d.1h.2f();E(I.4w.3B[1h]){G e=b.9Y();G f=I.6d(1h,c.3b());d.5g(b);E(e)f.1l(q(a){d.6u(a,e)});19 f.1l(q(a){d.4o(a)})}19 b.au=c.3b();c.3R.1o(c).3p();o b}}I.4a=q(l,t){G a=[l,t];a.2I=l;a.2h=t;o a};I.6d=q(a,b){G c=1e I(\'2k\'),t=I.4w.3B[a];E(t){c.3t=t[0]+b+t[1];t[2].5V(q(){c=c.4x})}19 c.3t=b;o $A(c.2o)};I.4w={7H:q(a,b){a.1A.6u(b,a)},2h:q(a,b){a.6u(b,a.4x)},41:q(a,b){a.4o(b)},6c:q(a,b){a.1A.6u(b,a.3x)},3B:{ee:[\'<3C>\',\'</3C>\',1],6v:[\'<3C><4K>\',\'</4K></3C>\',2],av:[\'<3C><4K><6w>\',\'</6w></4K></3C>\',3],82:[\'<3C><4K><6w><aw>\',\'</aw></6w></4K></3C>\',4],ax:[\'<20>\',\'</20>\',1]}};(q(){J.U(C.3B,{ay:C.3B.6v,az:C.3B.6v,aA:C.3B.82})}).7E(I.4w);I.W.6x={2J:q(a,b){b=I.2G.81[b]||b;G c=$(a).ao(b);o c&&c.ef}};I.W.2A={};J.U(I,I.W);E(!Y.2P.4R&&V.2Q(\'2k\').3M){1i.4S={};1i.4S.18=V.2Q(\'2k\').3M;Y.2P.4R=1f}I.U=(q(){E(Y.2P.5M)o Y.K;G c={},2A=I.W.2A;G d=J.U(q(a){E(!a||a.6y||a.2t!=1||a==1i)o a;G b=J.1Z(c),1h=a.1h,5t,1g;E(2A[1h])J.U(b,2A[1h]);N(5t 1s b){1g=b[5t];E(J.1M(1g)&&!(5t 1s a))a[5t]=1g.3o()}a.6y=Y.2q;o a},{6z:q(){E(!Y.2P.4R){J.U(c,I.W);J.U(c,I.W.6x)}}});d.6z();o d})();I.2J=q(a,b){E(a.2J)o a.2J(b);o I.W.6x.2J(a,b)};I.4V=q(f){G F=Y.2P,T=I.W.2A;E(!f){J.U(1j,1j.W);J.U(1j.I,1j.I.W);J.U(I.W.2A,{"eg":J.1Z(1j.W),"eh":J.1Z(1j.I.W),"ax":J.1Z(1j.I.W),"aB":J.1Z(1j.I.W)})}E(1c.M==2){G g=f;f=1c[1]}E(!g)J.U(I.W,f||{});19{E(J.3n(g))g.1l(U);19 U(g)}q U(a){a=a.2f();E(!I.W.2A[a])I.W.2A[a]={};J.U(I.W.2A[a],f)}q 6A(a,b,c){c=c||1d;N(G d 1s a){G e=a[d];E(!J.1M(e))2F;E(!c||!(d 1s b))b[d]=e.3o()}}q aC(a){G b;G c={"ei":"ej","aB":"ek","P":"el","em":"eo","ep":"eq","er":"es","et":"eu","ev":"ew","ex":"4L","ey":"4L","ez":"4L","eA":"4L","eB":"4L","eC":"4L","Q":"eD","eE":"aD","eF":"aD","A":"eG","at":"eH","eI":"eJ","eK":"aE","eL":"aE","ay":"83","az":"83","6v":"83","av":"eM","aA":"aF","82":"aF","eN":"eO","eP":"eQ"};E(c[a])b=\'84\'+c[a]+\'I\';E(1i[b])o 1i[b];b=\'84\'+a+\'I\';E(1i[b])o 1i[b];b=\'84\'+a.51()+\'I\';E(1i[b])o 1i[b];1i[b]={};1i[b].18=V.2Q(a).3M;o 1i[b]}E(F.4R){6A(I.W,4S.18);6A(I.W.6x,4S.18,1f)}E(F.5M){N(G h 1s I.W.2A){G i=aC(h);E(J.1X(i))2F;6A(T[h],i.18)}}J.U(I,I.W);7j I.2A;E(I.U.6z)I.U.6z();I.5e={}};V.eR={4z:q(){G a={};G B=Y.1w;$w(\'1T 2y\').1l(q(d){G D=d.51();a[d]=(B.3j&&!V.2b)?7K[\'eS\'+D]:(B.3J)?V.1S[\'aG\'+D]:V.3D[\'aG\'+D]});o a},a3:q(){o C.4z().1T},a2:q(){o C.4z().2y},eT:q(){o I.4a(1i.aH||V.3D.3A||V.1S.3A,1i.aI||V.3D.3z||V.1S.3z)}};G O=1E.1L({22:q(a){C.2X=a.2T();C.aJ()},aK:q(){E(!Y.2P.5L)o 1d;G e=C.2X;E(Y.1w.3j&&(e.1p("-1U-1n")||e.1p(":4n")))o 1d;E((/(\\[[\\w-]*?:|:2K)/).2d(C.2X))o 1d;o 1f},aJ:q(){E(C.aK())o C.aL();G e=C.2X,3g=O.5u,h=O.1C,c=O.54,3h,p,m;E(O.4b[e]){C.2L=O.4b[e];o}C.2L=["C.2L = q(aM) {","G r = aM, h = O.1C, c = 1d, n;"];1q(e&&3h!=e&&(/\\S/).2d(e)){3h=e;N(G i 1s 3g){p=3g[i];E(m=e.1k(p)){C.2L.14(J.1M(c[i])?c[i](m):1e 2g(c[i]).2b(m));e=e.1x(m[0],\'\');1F}}}C.2L.14("o h.85(n);\\n}");5S(C.2L.1P(\'\\n\'));O.4b[C.2X]=C.2L},aL:q(){G e=C.2X,3g=O.5u,x=O.1V,3h,m;E(O.4b[e]){C.1V=O.4b[e];o}C.2L=[\'.//*\'];1q(e&&3h!=e&&(/\\S/).2d(e)){3h=e;N(G i 1s 3g){E(m=e.1k(3g[i])){C.2L.14(J.1M(x[i])?x[i](m):1e 2g(x[i]).2b(m));e=e.1x(m[0],\'\');1F}}}C.1V=C.2L.1P(\'\');O.4b[C.2X]=C.1V},6B:q(a){a=a||V;E(C.1V)o V.7D(C.1V,a);o C.2L(a)},1k:q(a){C.86=[];G e=C.2X,3g=O.5u,as=O.87;G b,p,m;1q(e&&b!==e&&(/\\S/).2d(e)){b=e;N(G i 1s 3g){p=3g[i];E(m=e.1k(p)){E(as[i]){C.86.14([i,J.1Z(m)]);e=e.1x(m[0],\'\')}19{o C.6B(V).1p(a)}}}}G c=1f,21,88;N(G i=0,6C;6C=C.86[i];i++){21=6C[0],88=6C[1];E(!O.87[21](a,88)){c=1d;1F}}o c},24:q(){o C.2X},1W:q(){o"#<O:"+C.2X.1W()+">"}});J.U(O,{4b:{},1V:{3E:"//*",1r:"/*",42:"/5v-3F::*[1]",5w:\'/5v-3F::*\',1h:q(m){E(m[1]==\'*\')o\'\';o"[aN-21()=\'"+m[1].1G()+"\' 89 aN-21()=\'"+m[1].2f()+"\']"},1J:"[5x(1z(\' \', @5h, \' \'), \' #{1} \')]",29:"[@29=\'#{1}\']",4M:q(m){m[1]=m[1].1G();o 1e 2g("[@#{1}]").2b(m)},4N:q(m){m[1]=m[1].1G();m[3]=m[5]||m[6];o 1e 2g(O.1V.5y[m[2]]).2b(m)},5z:q(m){G h=O.1V.1H[m[1]];E(!h)o\'\';E(J.1M(h))o h(m);o 1e 2g(O.1V.1H[m[1]]).2b(m)},5y:{\'=\':"[@#{1}=\'#{3}\']",\'!=\':"[@#{1}!=\'#{3}\']",\'^=\':"[eU-97(@#{1}, \'#{3}\')]",\'$=\':"[4l(@#{1}, (5O-M(@#{1}) - 5O-M(\'#{3}\') + 1))=\'#{3}\']",\'*=\':"[5x(@#{1}, \'#{3}\')]",\'~=\':"[5x(1z(\' \', @#{1}, \' \'), \' #{3} \')]",\'|=\':"[5x(1z(\'-\', @#{1}, \'-\'), \'-#{3}-\')]"},1H:{\'2C-1r\':\'[3G(8a-3F::*)]\',\'1Q-1r\':\'[3G(5v-3F::*)]\',\'5A-1r\':\'[3G(8a-3F::* 89 5v-3F::*)]\',\'4n\':"[6D(*) = 0 8b (6D(2U()) = 0 89 eV(2U(), \' \\t\\r\\n\', \'\') = \'\')]",\'2K\':"[@2K]",\'2z\':"[@2z]",\'aO\':"[3G(@2z)]",\'3G\':q(m){G e=m[6],p=O.5u,x=O.1V,3h,v;G a=[];1q(e&&3h!=e&&(/\\S/).2d(e)){3h=e;N(G i 1s p){E(m=e.1k(p[i])){v=J.1M(x[i])?x[i](m):1e 2g(x[i]).2b(m);a.14("("+v.4l(1,v.M-1)+")");e=e.1x(m[0],\'\');1F}}}o"[3G("+a.1P(" 8b ")+")]"},\'1y-1r\':q(m){o O.1V.1H.1y("(6D(./8a-3F::*) + 1) ",m)},\'1y-1Q-1r\':q(m){o O.1V.1H.1y("(6D(./5v-3F::*) + 1) ",m)},\'1y-1U-1n\':q(m){o O.1V.1H.1y("1v() ",m)},\'1y-1Q-1U-1n\':q(m){o O.1V.1H.1y("(1Q() + 1 - 1v()) ",m)},\'2C-1U-1n\':q(m){m[6]="1";o O.1V.1H[\'1y-1U-1n\'](m)},\'1Q-1U-1n\':q(m){m[6]="1";o O.1V.1H[\'1y-1Q-1U-1n\'](m)},\'5A-1U-1n\':q(m){G p=O.1V.1H;o p[\'2C-1U-1n\'](m)+p[\'1Q-1U-1n\'](m)},1y:q(c,m){G d,4c=m[6],8c;E(4c==\'aP\')4c=\'2n+0\';E(4c==\'aQ\')4c=\'2n+1\';E(d=4c.1k(/^(\\d+)$/))o\'[\'+c+"= "+d[1]+\']\';E(d=4c.1k(/^(-?\\d*)?n(([+-])(\\d+))?/)){E(d[1]=="-")d[1]=-1;G a=d[1]?3T(d[1]):1;G b=d[2]?3T(d[2]):0;8c="[((#{8d} - #{b}) eW #{a} = 0) 8b "+"((#{8d} - #{b}) 2k #{a} >= 0)]";o 1e 2g(8c).2b({8d:c,a:a,b:b})}}}},54:{1h:\'n = h.1h(n, r, "#{1}", c);      c = 1d;\',1J:\'n = h.1J(n, r, "#{1}", c);    c = 1d;\',29:\'n = h.29(n, r, "#{1}", c);           c = 1d;\',4M:\'n = h.4M(n, r, "#{1}", c); c = 1d;\',4N:q(m){m[3]=(m[5]||m[6]);o 1e 2g(\'n = h.4N(n, r, "#{1}", "#{3}", "#{2}", c); c = 1d;\').2b(m)},5z:q(m){E(m[6])m[6]=m[6].1x(/"/g,\'\\\\"\');o 1e 2g(\'n = h.5z(n, "#{1}", "#{6}", r, c); c = 1d;\').2b(m)},3E:\'c = "3E";\',1r:\'c = "1r";\',42:\'c = "42";\',5w:\'c = "5w";\'},5u:{5w:/^\\s*~\\s*/,1r:/^\\s*>\\s*/,42:/^\\s*\\+\\s*/,3E:/^\\s/,1h:/^\\s*(\\*|[\\w\\-]+)(\\b|$)?/,29:/^#([\\w\\-\\*]+)(\\b|$)/,1J:/^\\.([\\w\\-\\*]+)(\\b|$)/,5z:/^:((2C|1Q|1y|1y-1Q|5A)(-1r|-1U-1n)|4n|2K|(en|eX)eY|3G)(\\((.*?)\\))?(\\b|$|(?=\\s|[:+~>]))/,4M:/^\\[([\\w]+)\\]/,4N:/\\[((?:[\\w-]*:)?[\\w-]+)\\s*(?:([!^$*~|]?=)\\s*(([\'"])([^\\4]*?)\\4|([^\'"][^\\]]*?)))?\\]/},87:{1h:q(a,b){o b[1].2f()==a.1h.2f()},1J:q(a,b){o I.6i(a,b[1])},29:q(a,b){o a.29===b[1]},4M:q(a,b){o I.2J(a,b[1])},4N:q(a,b){G c=I.43(a,b[1]);o c&&O.5y[b[2]](c,b[5]||b[6])}},1C:{1z:q(a,b){N(G i=0,L;L=b[i];i++)a.14(L);o a},6E:q(a){G b=Y.2q;N(G i=0,L;L=a[i];i++)L.2M=b;o a},4d:q(a){N(G i=0,L;L=a[i];i++)L.2M=3k;o a},50:q(a,b,c){a.2M=Y.2q;E(b){N(G d=a.2o,i=d.M-1,j=1;i>=0;i--){G e=d[i];E(e.2t==1&&(!c||e.2M))e.6F=j++}}19{N(G i=0,j=1,d=a.2o;e=d[i];i++)E(e.2t==1&&(!c||e.2M))e.6F=j++}},85:q(a){E(a.M==0)o a;G b=[],n;N(G i=0,l=a.M;i<l;i++)E(!(n=a[i]).2M){n.2M=Y.2q;b.14(I.U(n))}o O.1C.4d(b)},3E:q(a){G h=O.1C;N(G i=0,15=[],L;L=a[i];i++)h.1z(15,L.3i(\'*\'));o 15},1r:q(a){G h=O.1C;N(G i=0,15=[],L;L=a[i];i++){N(G j=0,1r;1r=L.2o[j];j++)E(1r.2t==1&&1r.1h!=\'!\')15.14(1r)}o 15},42:q(a){N(G i=0,15=[],L;L=a[i];i++){G b=C.5k(L);E(b)15.14(b)}o 15},5w:q(a){G h=O.1C;N(G i=0,15=[],L;L=a[i];i++)h.1z(15,I.5i(L));o 15},5k:q(a){1q(a=a.3x)E(a.2t==1)o a;o 17},5j:q(a){1q(a=a.9X)E(a.2t==1)o a;o 17},1h:q(a,b,c,d){G e=c.2f();G f=[],h=O.1C;E(a){E(d){E(d=="3E"){N(G i=0,L;L=a[i];i++)h.1z(f,L.3i(c));o f}19 a=C[d](a);E(c=="*")o a}N(G i=0,L;L=a[i];i++)E(L.1h.2f()===e)f.14(L);o f}19 o b.3i(c)},29:q(a,b,c,d){G e=$(c),h=O.1C;E(!e)o[];E(!a&&b==V)o[e];E(a){E(d){E(d==\'1r\'){N(G i=0,L;L=a[i];i++)E(e.1A==L)o[e]}19 E(d==\'3E\'){N(G i=0,L;L=a[i];i++)E(I.6j(e,L))o[e]}19 E(d==\'42\'){N(G i=0,L;L=a[i];i++)E(O.1C.5j(e)==L)o[e]}19 a=h[d](a)}N(G i=0,L;L=a[i];i++)E(L==e)o[e];o[]}o(e&&I.6j(e,b))?[e]:[]},1J:q(a,b,c,d){E(a&&d)a=C[d](a);o O.1C.aR(a,b,c)},aR:q(a,b,c){E(!a)a=O.1C.3E([b]);G d=\' \'+c+\' \';N(G i=0,15=[],L,5B;L=a[i];i++){5B=L.1J;E(5B.M==0)2F;E(5B==c||(\' \'+5B+\' \').1p(d))15.14(L)}o 15},4M:q(a,b,c,d){E(!a)a=b.3i("*");E(a&&d)a=C[d](a);G e=[];N(G i=0,L;L=a[i];i++)E(I.2J(L,c))e.14(L);o e},4N:q(a,b,c,d,e,f){E(!a)a=b.3i("*");E(a&&f)a=C[f](a);G g=O.5y[e],15=[];N(G i=0,L;L=a[i];i++){G h=I.43(L,c);E(h===17)2F;E(g(h,d))15.14(L)}o 15},5z:q(a,b,c,d,e){E(a&&e)a=C[e](a);E(!a)a=d.3i("*");o O.1H[b](a,c,d)}},1H:{\'2C-1r\':q(a,b,c){N(G i=0,15=[],L;L=a[i];i++){E(O.1C.5j(L))2F;15.14(L)}o 15},\'1Q-1r\':q(a,b,c){N(G i=0,15=[],L;L=a[i];i++){E(O.1C.5k(L))2F;15.14(L)}o 15},\'5A-1r\':q(a,b,c){G h=O.1C;N(G i=0,15=[],L;L=a[i];i++)E(!h.5j(L)&&!h.5k(L))15.14(L);o 15},\'1y-1r\':q(a,b,c){o O.1H.1y(a,b,c)},\'1y-1Q-1r\':q(a,b,c){o O.1H.1y(a,b,c,1f)},\'1y-1U-1n\':q(a,b,c){o O.1H.1y(a,b,c,1d,1f)},\'1y-1Q-1U-1n\':q(a,b,c){o O.1H.1y(a,b,c,1f,1f)},\'2C-1U-1n\':q(a,b,c){o O.1H.1y(a,"1",c,1d,1f)},\'1Q-1U-1n\':q(a,b,c){o O.1H.1y(a,"1",c,1f,1f)},\'5A-1U-1n\':q(a,b,c){G p=O.1H;o p[\'1Q-1U-1n\'](p[\'2C-1U-1n\'](a,b,c),b,c)},aS:q(a,b,d){E(a==0)o b>0?[b]:[];o $R(1,d).2E([],q(c,i){E(0==(i-b)%a&&(i-b)/a>=0)c.14(i);o c})},1y:q(c,d,e,f,g){E(c.M==0)o[];E(d==\'aP\')d=\'2n+0\';E(d==\'aQ\')d=\'2n+1\';G h=O.1C,15=[],8e=[],m;h.6E(c);N(G i=0,L;L=c[i];i++){E(!L.1A.2M){h.50(L.1A,f,g);8e.14(L.1A)}}E(d.1k(/^\\d+$/)){d=3T(d);N(G i=0,L;L=c[i];i++)E(L.6F==d)15.14(L)}19 E(m=d.1k(/^(-?\\d*)?n(([+-])(\\d+))?/)){E(m[1]=="-")m[1]=-1;G a=m[1]?3T(m[1]):1;G b=m[2]?3T(m[2]):0;G k=O.1H.aS(a,b,c.M);N(G i=0,L,l=k.M;L=c[i];i++){N(G j=0;j<l;j++)E(L.6F==k[j])15.14(L)}}h.4d(c);h.4d(8e);o 15},\'4n\':q(a,b,c){N(G i=0,15=[],L;L=a[i];i++){E(L.1h==\'!\'||(L.4x&&!L.3t.1k(/^\\s*$/)))2F;15.14(L)}o 15},\'3G\':q(a,b,c){G h=O.1C,eZ,m;G d=1e O(b).6B(c);h.6E(d);N(G i=0,15=[],L;L=a[i];i++)E(!L.2M)15.14(L);h.4d(d);o 15},\'aO\':q(a,b,c){N(G i=0,15=[],L;L=a[i];i++)E(!L.2z)15.14(L);o 15},\'2z\':q(a,b,c){N(G i=0,15=[],L;L=a[i];i++)E(L.2z)15.14(L);o 15},\'2K\':q(a,b,c){N(G i=0,15=[],L;L=a[i];i++)E(L.2K)15.14(L);o 15}},5y:{\'=\':q(a,v){o a==v},\'!=\':q(a,v){o a!=v},\'^=\':q(a,v){o a.77(v)},\'$=\':q(a,v){o a.91(v)},\'*=\':q(a,v){o a.1p(v)},\'~=\':q(a,v){o(\' \'+a+\' \').1p(\' \'+v+\' \')},\'|=\':q(a,v){o(\'-\'+a.2f()+\'-\').1p(\'-\'+v.2f()+\'-\')}},32:q(a){G b=[];a.8S(/(([\\w#:.~>+()\\s-]+|\\*|\\[.*?\\])+)\\s*(,|$)/,q(m){b.14(m[1].2T())});o b},aT:q(a,b){G c=$$(b),h=O.1C;h.6E(c);N(G i=0,15=[],1u;1u=a[i];i++)E(1u.2M)15.14(1u);h.4d(c);o 15},4y:q(a,b,c){E(J.3Q(b)){c=b;b=1d}o O.aT(a,b||\'*\')[c||0]},6f:q(a,b){b=O.32(b.1P(\',\'));G c=[],h=O.1C;N(G i=0,l=b.M,8f;i<l;i++){8f=1e O(b[i].2T());h.1z(c,8f.6B(a))}o(l>1)?h.85(c):c}});E(Y.1w.2N){J.U(O.1C,{1z:q(a,b){N(G i=0,L;L=b[i];i++)E(L.1h!=="!")a.14(L);o a},4d:q(a){N(G i=0,L;L=a[i];i++)L.7N(\'2M\');o a}})}q $$(){o O.6f(V,$A(1c))}G 1j={8g:q(a){$(a).8g();o a},aU:q(c,d){E(2R d!=\'2D\')d={6G:!!d};19 E(J.1X(d.6G))d.6G=1f;G e,1g,8h=1d,4e=d.4e;G f=c.2E({},q(a,b){E(!b.2z&&b.21){e=b.21;1g=$(b).2j();E(1g!=17&&(b.1n!=\'4e\'||(!8h&&4e!==1d&&(!4e||e==4e)&&(8h=1f)))){E(e 1s a){E(!J.3n(a[e]))a[e]=[a[e]];a[e].14(1g)}19 a[e]=1g}}o a});o d.6G?f:J.3m(f)}};1j.W={5C:q(a,b){o 1j.aU(1j.4O(a),b)},4O:q(c){o $A($(c).3i(\'*\')).2E([],q(a,b){E(1j.I.4P[b.1h.1G()])a.14(I.U(b));o a})},f0:q(a,b,c){a=$(a);G d=a.3i(\'6H\');E(!b&&!c)o $A(d).2e(I.U);N(G i=0,8i=[],M=d.M;i<M;i++){G e=d[i];E((b&&e.1n!=b)||(c&&e.21!=c))2F;8i.14(I.U(e))}o 8i},8j:q(a){a=$(a);1j.4O(a).5P(\'8j\');o a},8k:q(a){a=$(a);1j.4O(a).5P(\'8k\');o a},aV:q(b){G c=$(b).4O().4p(q(a){o\'6n\'!=a.1n&&!a.2z});G d=c.4p(q(a){o a.2J(\'6t\')&&a.6t>=0}).9e(q(a){o a.6t}).2C();o d?d:c.7f(q(a){o[\'6H\',\'20\',\'8l\'].1p(a.1h.1G())})},f1:q(a){a=$(a);a.aV().aW();o a},2V:q(a,b){a=$(a),b=J.1Z(b||{});G c=b.2v,4J=a.43(\'4J\')||\'\';E(4J.3S())4J=1i.68.ap;b.2v=a.5C(1f);E(c){E(J.2l(c))c=c.5U();J.U(b.2v,c)}E(a.2J(\'28\')&&!b.28)b.28=a.28;o 1e 1t.3V(4J,b)}};1j.I={8m:q(a){$(a).8m();o a},20:q(a){$(a).20();o a}};1j.I.W={5C:q(a){a=$(a);E(!a.2z&&a.21){G b=a.2j();E(b!=3k){G c={};c[a.21]=b;o J.3m(c)}}o\'\'},2j:q(a){a=$(a);G b=a.1h.1G();o 1j.I.4P[b](a)},f2:q(a,b){a=$(a);G c=a.1h.1G();1j.I.4P[c](a,b);o a},9h:q(a){$(a).1g=\'\';o a},f3:q(a){o $(a).1g!=\'\'},aW:q(a){a=$(a);1N{a.8m();E(a.20&&(a.1h.1G()!=\'6H\'||![\'8n\',\'8g\',\'4e\'].1p(a.1n)))a.20()}1Y(e){}o a},8j:q(a){a=$(a);a.f4();a.2z=1f;o a},8k:q(a){a=$(a);a.2z=1d;o a}};G f5=1j.I;G $F=1j.I.W.2j;1j.I.4P={6H:q(a,b){4h(a.1n.1G()){1O\'aX\':1O\'aY\':o 1j.I.4P.aZ(a,b);5r:o 1j.I.4P.8l(a,b)}},aZ:q(a,b){E(J.1X(b))o a.2K?a.1g:17;19 a.2K=!!b},8l:q(a,b){E(J.1X(b))o a.1g;19 a.1g=b},20:q(a,b){E(J.1X(b))o C[a.1n==\'20-f6\'?\'b0\':\'b1\'](a);19{G c,1g,b2=!J.3n(b);N(G i=0,M=a.M;i<M;i++){c=a.1b[i];1g=C.6I(c);E(b2){E(1g==b){c.8o=1f;o}}19 c.8o=b.1p(1g)}}},b0:q(a){G b=a.f7;o b>=0?C.6I(a.1b[b]):17},b1:q(a){G b,M=a.M;E(!M)o 17;N(G i=0,b=[];i<M;i++){G c=a.1b[i];E(c.8o)b.14(C.6I(c))}o b},6I:q(a){o I.U(a).2J(\'1g\')?a.1g:a.2U}};3P.8p=1E.1L(8N,{22:q($2Y,b,c,d){$2Y(d,c);C.1u=$(b);C.3H=C.2j()},6Y:q(){G a=C.2j();E(J.2l(C.3H)&&J.2l(a)?C.3H!=a:1B(C.3H)!=1B(a)){C.4W(C.1u,a);C.3H=a}}});1j.I.b3=1E.1L(3P.8p,{2j:q(){o 1j.I.2j(C.1u)}});1j.b3=1E.1L(3P.8p,{2j:q(){o 1j.5C(C.1u)}});3P.5D=1E.1L({22:q(a,b){C.1u=$(a);C.4W=b;C.3H=C.2j();E(C.1u.1h.1G()==\'6S\')C.b4();19 C.4Y(C.1u)},8q:q(){G a=C.2j();E(C.3H!=a){C.4W(C.1u,a);C.3H=a}},b4:q(){1j.4O(C.1u).1l(C.4Y,C)},4Y:q(a){E(a.1n){4h(a.1n.1G()){1O\'aX\':1O\'aY\':1m.3I(a,\'f8\',C.8q.1o(C));1F;5r:1m.3I(a,\'f9\',C.8q.1o(C));1F}}}});1j.I.5D=1E.1L(3P.5D,{2j:q(){o 1j.I.2j(C.1u)}});1j.5D=1E.1L(3P.5D,{2j:q(){o 1j.5C(C.1u)}});E(!1i.1m)G 1m={};J.U(1m,{fa:8,fb:9,fc:13,fd:27,fe:37,ff:38,fg:39,fh:40,fi:46,fj:36,fk:35,fl:33,fm:34,fn:45,5e:{},8r:q(a){G b;4h(a.1n){1O\'fo\':b=a.fp;1F;1O\'fq\':b=a.2x;1F;5r:o 17}o I.U(b)}});1m.W=(q(){G e;E(Y.1w.2N){G f={0:1,1:4,2:2};e=q(a,b){o a.8n==f[b]}}19 E(Y.1w.3j){e=q(a,b){4h(b){1O 0:o a.6J==1&&!a.b5;1O 1:o a.6J==1&&a.b5;5r:o 1d}}}19{e=q(a,b){o a.6J?(a.6J===b+1):(a.8n===b)}}o{fr:q(a){o e(a,0)},fs:q(a){o e(a,1)},ft:q(a){o e(a,2)},1u:q(a){G b=1m.U(a).b6;o I.U(b.2t==5d.9O?b.1A:b)},4y:q(a,b){G c=1m.1u(a);E(!b)o c;G d=[c].1z(c.7I());o O.4y(d,b,0)},6K:q(a){o{x:a.b7||(a.fu+(V.3D.3A||V.1S.3A)),y:a.b8||(a.fv+(V.3D.3z||V.1S.3z))}},fw:q(a){o 1m.6K(a).x},fx:q(a){o 1m.6K(a).y},6Z:q(a){1m.U(a);a.b9();a.ba();a.fy=1f}}})();1m.U=(q(){G c=J.4g(1m.W).2E({},q(m,a){m[a]=1m.W[a].3o();o m});E(Y.1w.2N){J.U(c,{ba:q(){C.fz=1f},b9:q(){C.fA=1d},1W:q(){o"[2D 1m]"}});o q(a){E(!a)o 1d;E(a.6y)o a;a.6y=Y.2q;G b=1m.6K(a);J.U(a,{b6:a.fB,8r:1m.8r(a),b7:b.x,b8:b.y});o J.U(a,c)}}19{1m.18=1m.18||V.5E("bb").3M;J.U(1m.18,c);o Y.K}})();J.U(1m,(q(){G h=1m.5e;q 8s(a){E(a.8t)o a.8t[0];1c.4k.29=1c.4k.29||1;o a.8t=[++1c.4k.29]}q 8u(a){E(a&&a.1p(\':\'))o"bc";o a}q 6L(a){o h[a]=h[a]||{}}q 6M(a,b){G c=6L(a);o c[b]=c[b]||[]}q bd(b,d,e){G f=8s(b);G c=6M(f,d);E(c.4q("6N").1p(e))o 1d;G g=q(a){E(!1m||!1m.U||(a.8v&&a.8v!=d))o 1d;1m.U(a);e.7E(b,a)};g.6N=e;c.14(g);o g}q 8w(b,d,e){G c=6M(b,d);o c.7f(q(a){o a.6N==e})}q be(a,b,d){G c=6L(a);E(!c[b])o 1d;c[b]=c[b].56(8w(a,b,d))}q bf(){N(G a 1s h)N(G b 1s h[a])h[a][b]=17}E(1i.5J){1i.5J("ar",bf)}o{3I:q(a,b,c){a=$(a);G d=8u(b);G e=bd(a,b,c);E(!e)o a;E(a.6O){a.6O(d,e,1d)}19{a.5J("4u"+d,e)}o a},4f:q(b,c,d){b=$(b);G e=8s(b),21=8u(c);E(!d&&c){6M(e,c).1l(q(a){b.4f(c,a.6N)});o b}19 E(!c){J.4g(6L(e)).1l(q(a){b.4f(a)});o b}G f=8w(e,c,d);E(!f)o b;E(b.bg){b.bg(21,f,1d)}19{b.fC("4u"+21,f)}be(e,c,d);o b},4Q:q(a,b,c){a=$(a);E(a==V&&V.5E&&!a.bh)a=V.3D;G d;E(V.5E){d=V.5E("bb");d.fD("bc",1f,1f)}19{d=V.fE();d.bi="fF"}d.8v=b;d.fG=c||{};E(V.5E){a.bh(d)}19{a.fH(d.bi,d)}o 1m.U(d)}}})());J.U(1m,1m.W);I.4V({4Q:1m.4Q,3I:1m.3I,4f:1m.4f});J.U(V,{4Q:I.W.4Q.3o(),3I:I.W.3I.3o(),4f:I.W.4f.3o(),5F:1d});(q(){G a;q 5G(){E(V.5F)o;E(a)1i.8P(a);V.4Q("fI:5F");V.5F=1f}E(V.6O){E(Y.1w.3j){a=1i.8O(q(){E(/5F|bj/.2d(V.2W))5G()},0);1m.3I(1i,"fJ",5G)}19{V.6O("fK",5G,1d)}}19{V.5l("<4T 29=bk 3p aq=//:><\\/4T>");$("bk").63=q(){E(C.2W=="bj"){C.63=17;5G()}}}})();2S.3m=J.3m;G fL={3e:I.9P};I.W.fM=I.W.6j;G fN={fO:q(a,b){o I.2w(a,{7H:b})},fP:q(a,b){o I.2w(a,{2h:b})},fQ:q(a,b){o I.2w(a,{41:b})},fR:q(a,b){o I.2w(a,{6c:b})}};G $2F=1e fS(\'"3l $2F" fT fU, fV "o" fW\');G 8x={bl:1d,8y:q(){C.bm=1i.aH||V.3D.3A||V.1S.3A||0;C.bn=1i.aI||V.3D.3z||V.1S.3z||0},fX:q(a,x,y){E(C.bl)o C.bo(a,x,y);C.5H=x;C.5I=y;C.2i=I.44(a);o(y>=C.2i[1]&&y<C.2i[1]+a.4F&&x>=C.2i[0]&&x<C.2i[0]+a.4E)},bo:q(a,x,y){G b=I.7W(a);C.5H=x+b[0]-C.bm;C.5I=y+b[1]-C.bn;C.2i=I.44(a);o(C.5I>=C.2i[1]&&C.5I<C.2i[1]+a.4F&&C.5H>=C.2i[0]&&C.5H<C.2i[0]+a.4E)},fY:q(a,b){E(!a)o 0;E(a==\'fZ\')o((C.2i[1]+b.4F)-C.5I)/b.4F;E(a==\'g0\')o((C.2i[0]+b.4E)-C.5H)/b.4E},44:I.W.44,5p:I.W.5p,7U:q(a){8x.8y();o I.7U(a)},7V:q(a){8x.8y();o I.7V(a)},g1:I.W.7W,3f:I.W.4I,g2:I.W.5q,1Z:q(a,b,c){c=c||{};o I.af(b,a,c)}};E(!V.6P)V.6P=q(f){q 8z(a){o a.3S()?17:"[5x(1z(\' \', @5h, \' \'), \' "+a+" \')]"}f.6P=Y.2P.5L?q(a,b){b=b.24().2T();G c=/\\s/.2d(b)?$w(b).2e(8z).1P(\'\'):8z(b);o c?V.7D(\'.//*\'+c,a):[]}:q(b,c){c=c.24().2T();G d=[],5m=(/\\s/.2d(c)?$w(c):17);E(!5m&&!c)o d;G e=$(b).3i(\'*\');c=\' \'+c+\' \';N(G i=0,1r,cn;1r=e[i];i++){E(1r.1J&&(cn=\' \'+1r.1J+\' \')&&(cn.1p(c)||(5m&&5m.7d(q(a){o!a.24().3S()&&cn.1p(\' \'+a+\' \')}))))d.14(I.U(1r))}o d};o q(a,b){o $(b||V.1S).6P(a)}}(I.W);I.6h=1E.1L();I.6h.18={22:q(a){C.1u=$(a)},3c:q(b){C.1u.1J.32(/\\s+/).20(q(a){o a.M>0}).3c(b)},58:q(a){C.1u.1J=a},g3:q(a){E(C.1p(a))o;C.58($A(C).1z(a).1P(\' \'))},9S:q(a){E(!C.1p(a))o;C.58($A(C).56(a).1P(\' \'))},24:q(){o $A(C).1P(\' \')}};J.U(I.6h.18,26);I.4V();',62,996,'||||||||||||||||||||||||return||function||||||||||||this||if||var||Element|Object||node|length|for|Selector||||||extend|document|Methods||Prototype||||||push|results||null|prototype|else|style|options|arguments|false|new|true|value|tagName|window|Form|match|each|Event|type|bind|include|while|child|in|Ajax|element|position|Browser|replace|nth|concat|parentNode|String|handlers|getStyle|Class|break|toLowerCase|pseudos|Array|className|_getEv|create|isFunction|try|case|join|last|transport|body|width|of|xpath|inspect|isUndefined|catch|clone|select|name|initialize||toString|values|Enumerable||method|id|valueL|evaluate|args|test|map|toUpperCase|Template|top|offset|getValue|div|isString|gsub||childNodes|px|emptyFunction|klass|toJSON|nodeType|toArray|parameters|insert|toElement|height|disabled|ByTag|apply|first|object|inject|continue|_attributeTranslations|opacity|left|hasAttribute|checked|matcher|_countedByPrototype|IE|indexOf|BrowserFeatures|createElement|typeof|Hash|strip|text|request|readyState|expression|super|isElement||toHTML|split||||||||RegExp|stripScripts|_each|response|display|offsetParent|ps|le|getElementsByTagName|WebKit|undefined|throw|toQueryString|isArray|methodize|defer|toPaddedString|source|slice|innerHTML|_object|onComplete|responseText|nextSibling|names|scrollTop|scrollLeft|tags|table|documentElement|descendant|sibling|not|lastValue|observe|Opera|navigator|userAgent|__proto__|shift|wrap|Abstract|isNumber|evalScripts|blank|Number|update|Request|url|dispatchException|success|decay||bottom|adjacent|readAttribute|cumulativeOffset|||_overflow|offsetTop|offsetLeft|_returnOffset|_cache|formula|unmark|submit|stopObserving|keys|switch|interpret|timer|callee|substring|evalJSON|empty|appendChild|findAll|pluck|filter|key|Responders|on|getHeader|_insertionTranslations|firstChild|findElement|getDimensions|nextAncestor|parseFloat|setStyle|setOpacity|offsetWidth|offsetHeight|absolute|static|getOffsetParent|action|tbody|Heading|attrPresence|attr|getElements|Serializers|fire|ElementExtensions|HTMLElement|script|properties|addMethods|callback|frequency|registerCallback|onTimerEvent|index|capitalize|_|expr|criteria|reverse|without|toObject|set|start|responders|post|getStatus|Node|cache|writeAttribute|removeChild|class|nextSiblings|previousElementSibling|nextElementSibling|write|classNames|sourceIndex|relative|positionedOffset|viewportOffset|default|_flag|property|patterns|following|laterSibling|contains|operators|pseudo|only|nodeClassName|serialize|EventObserver|createEvent|loaded|fireContentLoadedEvent|xcomp|ycomp|attachEvent|Gecko|XPath|SpecificElementExtensions|ScriptFragment|string|invoke|curry|currentlyExecuting|eval|escapeHTML|toQueryParams|times|charAt|detect|pair|dispatch|onCreate|asynchronous|application|onreadystatechange|status|headerJSON|isSameOrigin|port|location|container|insertion|none|after|_getContentFromAnonymousElement|recursivelyCollect|findChildElements|read|ClassNames|hasClassName|descendantOf|cssFloat|auto|00001|hidden|right|border|padding|title|_getAttr|tabIndex|insertBefore|TBODY|tr|Simulated|_extendedByPrototype|refresh|copy|findElements|token|count|mark|nodeIndex|hash|input|optionValue|which|pointer|getCacheForID|getWrappersForEventName|handler|addEventListener|getElementsByClassName|Version|opera|form|superclass|isHash|Function|delay|_methodized|execute|stop|prepareReplacement|nodeValue|decodeURIComponent|succ|camelize|len|unfilterJSON|startsWith|lastIndexOf|toTemplateReplacements|slices|array|collect|all|falses|find|_reverse|toQueryPair|get|delete|end|activeRequestCount|Base|encoding|evalJS|_complete|Response|respondToReadyState|onStateChange|Content|Complete|protocol|domain|getResponseHeader|statusText|getAllResponseHeaders|failure|updater|elements|_getElementsByXPath|call|visible|replaceChild|before|ancestors|previousSiblings|self|attributes|getAttribute|removeAttribute|float|cssText|styleFloat|visibility|_madePositioned|overflow|absolutize|relativize|cumulativeScrollOffset|zoom|currentStyle|alpha|stripAlpha|has|TD|TableSection|HTML|unique|tokens|assertions|matches|or|preceding|and|predicate|fragment|indexed|selector|reset|submitted|matchingInputs|disable|enable|textarea|focus|button|selected|TimedObserver|onElementEvent|relatedTarget|getEventID|_prototypeEventID|getDOMEventName|eventName|findWrapper|Position|prepare|iter|KHTML|MobileSafari|Safari|JSONFilter|subclasses|valueOf|argumentNames|instanceof|timeout|1000|Try|these|escape|PeriodicalExecuter|setInterval|clearInterval|specialChar|sub|scan|stripTags|gi|img|extractScripts|unescapeHTML|charCodeAt|isJSON|JSON|endsWith|interpolate|amp|lt|gt|createTextNode|with|template|pattern|Pattern|exec|eachSlice|any|sortBy|size|from|clear|flatten|uniq|forEach|arrayLength|encodeURIComponent|ObjectRange|exclusive|getTransport|XMLHttpRequest|ActiveXObject|XMLHTTP|register|contentType|setRequestHeaders|overrideMimeType|xml|2005|requestHeaders|Events|force|evalResponse|onException|getStatusText|_getHeaderJSON|responseXML|_getResponseJSON|sanitizeJSON|Updater|updateContent|updateComplete|lastText|ELEMENT_NODE|TEXT_NODE|toggle|hide|show|remove|attribute|descendants|firstDescendant|immediateDescendants|previousSibling|next|identify|counter|setAttribute|getHeight|getWidth|addClassName|removeClassName|compareDocumentPosition|scrollTo|clientWidth|clientHeight|BODY|_originalLeft|_originalTop|_originalWidth|_originalHeight|clonePosition|setLeft|setTop|setWidth|setHeight|htmlFor|parseInt|100|_getAttrNode|getAttributeNode|href|src|onunload||IMG|outerHTML|TR|td|SELECT|THEAD|TFOOT|TH|TEXTAREA|findDOMClass|Mod|TableCol|TableCell|client|pageXOffset|pageYOffset|compileMatcher|shouldUseXPath|compileXPathMatcher|root|local|enabled|even|odd|byClassName|getIndices|matchElements|serializeElements|findFirstElement|activate|checkbox|radio|inputSelector|selectOne|selectMany|single|Observer|registerFormCallbacks|metaKey|target|pageX|pageY|preventDefault|stopPropagation|HTMLEvents|dataavailable|createWrapper|destroyWrapper|destroyCache|removeEventListener|dispatchEvent|eventType|complete|__onDOMContentLoaded|includeScrollOffsets|deltaX|deltaY|withinIncludingScrolloffsets|AppleWebKit|Apple|Mobile|secure|constructor|RangeError|unknown|boolean|splice|number|bindAsEventListener|event|setTimeout|01|Date|getUTCFullYear|getUTCMonth|getUTCDate|getUTCHours|getUTCMinutes|getUTCSeconds|finally|truncate|im|data|fromCharCode|underscore|dasherize|x00|x1f|u00|Eaeflnr|SyntaxError|Badly|formed|parseQuery|grep|inGroupsOf|max|min|partition|reject|sort|zip|pop|member|entries|every|some|NodeList|compact|reduce|intersect|isNaN|toColorPart|isFinite|abs|round|ceil|floor||Math|unset|merge|Msxml2|Microsoft|unregister|www|urlencoded|UTF|_method|Konqueror|open|postBody|send|Requested|With|Accept|javascript|html|charset|Connection|close|setRequestHeader|200|300|Success|Failure|java|ecma|https|Uninitialized|Loading|Loaded|Interactive|responseJSON|getAllHeaders|json|PeriodicalUpdater|clearTimeout|getElementById|XPathResult|ORDERED_NODE_SNAPSHOT_TYPE|snapshotLength|snapshotItem|ATTRIBUTE_NODE|CDATA_SECTION_NODE|ENTITY_REFERENCE_NODE|ENTITY_NODE|PROCESSING_INSTRUCTION_NODE|COMMENT_NODE|DOCUMENT_NODE|DOCUMENT_TYPE_NODE|DOCUMENT_FRAGMENT_NODE|NOTATION_NODE|cloneNode|ownerDocument|createRange|selectNode|createContextualFragment|siblings|up|down||previous|anonymous_element_|toggleClassName|cleanWhitespace|defaultView|getComputedStyle|getOpacity|block|makePositioned|undoPositioned|makeClipping|undoClipping|getElementsBySelector|childElements|fixed|hasLayout|normal|cellpadding|cellPadding|cellspacing|cellSpacing|colSpan|rowSpan|vAlign|dateTime|accessKey|encType|maxLength|readOnly|longDesc|readonly|multiple|onload|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onfocus|onblur|onkeypress|onkeydown|onkeyup|onsubmit|onreset|onselect|onchange|rv|999999|TABLE|specified|FORM|INPUT|OPTGROUP|OptGroup|TextArea|Paragraph|FIELDSET||FieldSet|UL|UList|OL|OList|DL|DList|DIR|Directory|H1|H2|H3|H4|H5|H6|Quote|INS|DEL|Anchor|Image|CAPTION|TableCaption|COL|COLGROUP|TableRow|FRAMESET|FrameSet|IFRAME|IFrame|viewport|inner|getScrollOffsets|starts|translate|mod|dis|abled|selectorType|getInputs|focusFirstElement|setValue|present|blur|Field|one|selectedIndex|click|change|KEY_BACKSPACE|KEY_TAB|KEY_RETURN|KEY_ESC|KEY_LEFT|KEY_UP|KEY_RIGHT|KEY_DOWN|KEY_DELETE|KEY_HOME|KEY_END|KEY_PAGEUP|KEY_PAGEDOWN|KEY_INSERT|mouseover|fromElement|mouseout|isLeftClick|isMiddleClick|isRightClick|clientX|clientY|pointerX|pointerY|stopped|cancelBubble|returnValue|srcElement|detachEvent|initEvent|createEventObject|ondataavailable|memo|fireEvent|dom|load|DOMContentLoaded|Toggle|childOf|Insertion|Before|Top|Bottom|After|Error|is|deprecated|use|instead|within|overlap|vertical|horizontal|realOffset|page|add'.split('|'),0,{}))

function comparision_add(value)
{
	//alert(value);
	if($('comparison_id_value'))
	{
		$('comparison_id_value').value=value;
		//	document.comparison_send.comparison_id_value.value='$row[id]'; 
		if($('comparison_id_value').form)	$('comparison_id_value').form.submit();
	}
}

function insertPicture(field,picture_min,picture_max,x,y)
{
	var field=document.getElementById(field);
	var frame;
	if (picture_max && x && y)
		frame=" style='cursor:pointer' onClick=\"window_open('frame.php?image=" + picture_max + "',''," + x + "," + y + ")\"";
	field.innerHTML="<img alt=\"Foto\" src=\"" + picture_min + "\" " + frame + " border=\"0\" >";
}

function modyficatedInsertPicture(id,field,picture_min,picture_max,num,x,y)
{
	var field=document.getElementById(field);
	var frame;
	if (picture_max && x && y){
		//frame=" style='cursor:pointer' onClick=\"window_open('frame.php?image=" + picture_max + "',''," + x + "," + y + ")\"";
		frame=" style='cursor:pointer' onClick=\"displayAjaxGallery("+id+",'"+picture_max+"','"+num+"')\"";
	}
	field.innerHTML="<img alt=\"Foto\" src=\"" + picture_min + "\" " + frame + " border=\"0\" >";
}

function window_open(URL, name, width, height)
{
	var left=(screen.width-width)/2;
	left=Math.round(left);
	var top=(screen.height-height-100)/2;
	top=Math.round(top);
	name=window.open(URL, name, 'resizable=0, height=' + height + ', width=' + width + ', top=' + top + ', left=' + left);
	name.moveTo(left, top);
	name.focus();
}

function window_open_resizable(URL, name, width, height)
{
	var left=(screen.width-width)/2;
	left=Math.round(left);
	var top=(screen.height-height-100)/2;
	top=Math.round(top);
	name=window.open(URL, name, 'resizable=1,scrollbars=1, height=' + height + ', width=' + width + ', top=' + top + ', left=' + left);
	name.moveTo(left, top);
	name.focus();
}


function activeTab(active)
{
	
	var content=document.getElementById("tabDescription").getElementsByTagName("div");
	var header=document.getElementById("tabs").getElementsByTagName("div");
	
	var j = 0;
	
	for (var i=1; i<=content.length; i++)
	{

		if( content[i-1].className == 'tab_div')
		{

			j++;	
	
		
		if (j==active)
		{
			content[i-1].style.display='block';
			header[j-1].className = 'tabActive';
		}
		else
		{
			content[i-1].style.display='none';
			header[j-1].className = 'tabUnactive';
		}
		header[j-1].className += ' offerTab';
		//header[i-1].style.border='1px solid black';
		
			}
	}
	
}

function ShowDiv(element)
{
	var elem=document.getElementById(element);
	if (elem.style.display=='inline') elem.style.display='none'; else elem.style.display='inline';
}

function ActiveDeactiveDiv(element,show)
{
	var elem=document.getElementById(element);
	if (show=='0') elem.style.display='none'; else elem.style.display='inline';
}
function ShowHideElement(element,style_display_on)
{
	var elem=document.getElementById(element);
	if (elem.style.display=='none') 
		elem.style.display=style_display_on; 
	else 
		elem.style.display='none';
}


function insertVaulue(value,field)
{
		var field=document.getElementById(field);
		
		field.value=value;
}

// uzywana w skroceniu tekstu
// przy komentarzu klienta do zamowienia
function limitText(limitField, limitCount, limitNum) {
	if (limitField.value.length > limitNum) {
		limitField.value = limitField.value.substring(0, limitNum);
	} else {
		limitCount.innerHTML = limitNum - limitField.value.length;
	}
}
/**----------------------------------------------------------
	obsluga menu
*/
	var cookieTime=0;
/**----------------------------------------------------------
*/
	function createCookie(name,value,days) 
	{
		if (days) 
		{
			var date = new Date();
			date.setTime(date.getTime()+(days*24*60*60*1000));
			var expires = "; expires="+date.toGMTString();
		}
		else var expires = "";
		document.cookie = name+"="+value+expires+"; path=/";
	}
/**----------------------------------------------------------
*/
	function readCookie(name) {
		var nameEQ = name + "=";
		var ca = document.cookie.split(';');
		for(var i=0;i < ca.length;i++) {
			var c = ca[i];
			while (c.charAt(0)==' ') c = c.substring(1,c.length);
			if (c.indexOf(nameEQ) == 0) return c.substring(nameEQ.length,c.length);
		}
		return null;
	}
/**----------------------------------------------------------
*/
	function eraseCookie(name) 
	{
		createCookie(name,"",-1);
	}
/**----------------------------------------------------------
*/
	function createMenuCookie(submenuId)
	{
		cookieName='menu['+submenuId+']';
		createCookie(cookieName,1,cookieTime);	
	}
/**----------------------------------------------------------
*/
	function eraseMenuCookie(submenuId)
	{
		cookieName='menu['+submenuId+']';
		eraseCookie(cookieName);	
	}
/**----------------------------------------------------------
*/
	function menuClick(submenuId,mode,elem)
	{		
		//alert(submenuId+' '+mode+' '+elem);
		if($(submenuId))
		{	
			if(Element.visible($(submenuId))) 
			{
				Element.hide($(submenuId));
				eraseMenuCookie(submenuId);
				/*$(submenuId+'_nav').src="./image/template/menu_show_down.gif";*/
				Element.show($(submenuId+'_nav_down'));
				Element.hide($(submenuId+'_nav_up'));
				//$(elem).innerHTML='+';
			}
			else 
			{
				if(mode==1) hide_all('menuRoot','submenu');
				Element.show($(submenuId));
				createMenuCookie(submenuId);
				/*$(submenuId+'_nav').src="./image/template/menu_show_up.gif";*/
				Element.show($(submenuId+'_nav_up'));
				Element.hide($(submenuId+'_nav_down'));
				//$(elem).innerHTML='-';
			}			
			return false;
		}
		else 
		{
			alert('click');
			return true;
		}
	}
/**----------------------------------------------------------
*/
	function show_all(parentElement,className)
	{
		nodes=document.getElementsByClassName(className , $(parentElement));
		for(i=0; i<nodes.length; i++)
		{
			Element.show(nodes[i]);
			submenuId=nodes[i].getAttribute('id');
			createMenuCookie(submenuId);	
			/*$(submenuId+'_nav').src="./image/template/menu_show_up.gif";*/
			Element.show($(submenuId+'_nav_up'));
			Element.hide($(submenuId+'_nav_down'));
		}
		return false;
	}
/**----------------------------------------------------------
*/
	function hide_all(parentElement,className)
	{
		nodes=document.getElementsByClassName(className , $(parentElement));
		for(i=0; i<nodes.length; i++)
		{
			Element.hide(nodes[i]);
			submenuId=nodes[i].getAttribute('id');
			eraseMenuCookie(submenuId);	
			Element.show($(submenuId+'_nav_down'));
			Element.hide($(submenuId+'_nav_up'));
		}
		return false;
	}
	
/* przyciski widoku zdjec na karcie towaru */
function change_offer_image_button(element)
{
	var new_b = element;
	var contener = $('offer_view_image_active_button');
	if (new_b.id!=contener.value)
	{
		var old_b = $(contener.value);
		new_b.className = 'button_item active';
		old_b.className = 'button_item';		
		contener.value = new_b.id;
	}
}
function debug(debugData)
{
	if ($('debug_output'))
	{				 
		var outputMessage = new Element('div').update("debug: " + debugData);				
		$('debug_output').insert({bottom: outputMessage});						
	}
	else			
	{								
		alert("Aby uzywac funkcji debug umiesc kod <div id='debug_output'></div> w miejscu gdzie maja byc wypisywane informacje");			
	}			
}



function changeListLimit(value)
{
	var s = document.location.search;
	if (value.length==0)
		s = vacumParam(s,"_limit",value);
	else
		s = insertParam(s,"_limit",value);
	if (s != document.location.search) document.location.search=s;
}

/* Simple AJAX Code-Kit (SACK) v1.6.1 */
/* A 2005 Gregory Wild-Smith */
/* www.twilightuniverse.com */
/* Software licenced under a modified X11 licence,
   see documentation or authors website for more details */

function sack(file) {
	this.xmlhttp = null;

	this.resetData = function() {
		this.method = "POST";
  		this.queryStringSeparator = "?";
		this.argumentSeparator = "&";
		this.URLString = "";
		this.encodeURIString = true;
  		this.execute = false;
  		this.element = null;
		this.elementObj = null;
		this.requestFile = file;
		this.vars = new Object();
		this.responseStatus = new Array(2);
  	};

	this.resetFunctions = function() {
  		this.onLoading = function() { };
  		this.onLoaded = function() { };
  		this.onInteractive = function() { };
  		this.onCompletion = function() { };
  		this.onError = function() { };
		this.onFail = function() { };
	};

	this.reset = function() {
		this.resetFunctions();
		this.resetData();
	};

	this.createAJAX = function() {
		try {
			this.xmlhttp = new ActiveXObject("Msxml2.XMLHTTP");
		} catch (e1) {
			try {
				this.xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");
			} catch (e2) {
				this.xmlhttp = null;
			}
		}

		if (! this.xmlhttp) {
			if (typeof XMLHttpRequest != "undefined") {
				this.xmlhttp = new XMLHttpRequest();
			} else {
				this.failed = true;
			}
		}
	};

	this.setVar = function(name, value){
		this.vars[name] = Array(value, false);
	};

	this.encVar = function(name, value, returnvars) {
		if (true == returnvars) {
			return Array(encodeURIComponent(name), encodeURIComponent(value));
		} else {
			this.vars[encodeURIComponent(name)] = Array(encodeURIComponent(value), true);
		}
	}

	this.processURLString = function(string, encode) {
		encoded = encodeURIComponent(this.argumentSeparator);
		regexp = new RegExp(this.argumentSeparator + "|" + encoded);
		varArray = string.split(regexp);
		for (i = 0; i < varArray.length; i++){
			urlVars = varArray[i].split("=");
			if (true == encode){
				this.encVar(urlVars[0], urlVars[1]);
			} else {
				this.setVar(urlVars[0], urlVars[1]);
			}
		}
	}

	this.createURLString = function(urlstring) {
		if (this.encodeURIString && this.URLString.length) {
			this.processURLString(this.URLString, true);
		}

		if (urlstring) {
			if (this.URLString.length) {
				this.URLString += this.argumentSeparator + urlstring;
			} else {
				this.URLString = urlstring;
			}
		}

		// prevents caching of URLString
		this.setVar("rndval", new Date().getTime());

		urlstringtemp = new Array();
		for (key in this.vars) {
			if (false == this.vars[key][1] && true == this.encodeURIString) {
				encoded = this.encVar(key, this.vars[key][0], true);
				delete this.vars[key];
				this.vars[encoded[0]] = Array(encoded[1], true);
				key = encoded[0];
			}

			urlstringtemp[urlstringtemp.length] = key + "=" + this.vars[key][0];
		}
		if (urlstring){
			this.URLString += this.argumentSeparator + urlstringtemp.join(this.argumentSeparator);
		} else {
			this.URLString += urlstringtemp.join(this.argumentSeparator);
		}
	}

	this.runResponse = function() {
		eval(this.response);
	}

	this.runAJAX = function(urlstring) {
		if (this.failed) {
			this.onFail();
		} else {
			this.createURLString(urlstring);
			if (this.element) {
				this.elementObj = document.getElementById(this.element);
			}
			if (this.xmlhttp) {
				var self = this;
				if (this.method == "GET") {
					totalurlstring = this.requestFile + this.queryStringSeparator + this.URLString;
					this.xmlhttp.open(this.method, totalurlstring, true);
				} else {
					this.xmlhttp.open(this.method, this.requestFile, true);
					try {
						this.xmlhttp.setRequestHeader("Content-Type", "application/x-www-form-urlencoded")
					} catch (e) { }
				}

				this.xmlhttp.onreadystatechange = function() {
					switch (self.xmlhttp.readyState) {
						case 1:
							self.onLoading();
							break;
						case 2:
							self.onLoaded();
							break;
						case 3:
							self.onInteractive();
							break;
						case 4:
							self.response = self.xmlhttp.responseText;
							self.responseXML = self.xmlhttp.responseXML;
							self.responseStatus[0] = self.xmlhttp.status;
							self.responseStatus[1] = self.xmlhttp.statusText;

							if (self.execute) {
								self.runResponse();
							}

							if (self.elementObj) {
								elemNodeName = self.elementObj.nodeName;
								elemNodeName.toLowerCase();
								if (elemNodeName == "input"
								|| elemNodeName == "select"
								|| elemNodeName == "option"
								|| elemNodeName == "textarea") {
									self.elementObj.value = self.response;
								} else {
									self.elementObj.innerHTML = self.response;
								}
							}
							if (self.responseStatus[0] == "200") {
								self.onCompletion();
							} else {
								self.onError();
							}

							self.URLString = "";
							break;
					}
				};

				this.xmlhttp.send(this.URLString);
			}
		}
	};

	this.reset();
	this.createAJAX();
}



/*
Simple Image Trail script- By JavaScriptKit.com
Visit http://www.javascriptkit.com for this script and more
This notice must stay intact
*/

var ua = navigator.userAgent.toLowerCase();
var divw=0;
var divh=0;
var xto;

if (document.getElementById || document.all)
	document.write('<div id="imgtrailer" style="position:absolute;visibility:hidden;"></div>')

function gettrailobject()
	{
	if (document.getElementById)
		return document.getElementById("imgtrailer")
	else if (document.all)
		return document.all.trailimagid
	}

function gettrailobj()
	{
	if (document.getElementById)
		return document.getElementById("imgtrailer").style
	else if (document.all)
		return document.all.trailimagid.style
	}

function truebody()
	{
	return (!window.opera && document.compatMode && document.compatMode!="BackCompat")? document.documentElement : document.body
	}

function trailOff()
	{
		if (xto && xto > 0)
		{
			clearTimeout(xto);
		}

		document.onmousemove='';
		gettrailobj().visibility="hidden";
	}

//('plik','nazwa','4212009','Size: 2,312x3,224 pixels (7.5MP)<br>','1 credit','1','".$row['x_max']."','".$row['y_max']."')
//('".$file_a."','".$row_product[name]."','".$row_product[id_file]."','".$row['x_max']."','".$row['y_max']."')


///function trailOn(thumbimg,imgtitle,imgid,thw,thh){
function trailOn(thumbimg,imgtitle,thw,thh){
	
		var smallmedium = (smallmedium == null) ? 0 : smallmedium;
		switch(smallmedium)
		{
			case 1:
				var thumbimgprev = thumbimg.replace(/thumb_/, "thumbimg_");
				break;
			case 0:
				var thumbimgprev = thumbimg.replace(/thumb_/, "thumbsmall_");
				break;
			case 2:
				var thumbimgprev = thumbimg.replace(/big/, "small");
				break;
		}
		
		gettrailobj().left="-500px";
		bgcolor ='#000000';
		//alert(divthh);
		divthh	= parseInt(thh) + 24;
		divthw = parseInt(thw) + 2;
		smthw = parseInt(thw) + 2;
		halfthh = 50;
		halfthh = Math.ceil(parseInt(thh)/2);
		topx = halfthh - 9;
		smthh = parseInt(thh) + 2;
		if (navigator.userAgent.indexOf("Opera")!=-1)
			gettrailobject().innerHTML = '<div style="background-color: '+bgcolor+'; layer-background-color: #FFFFFF; border: 1px none #808080; padding:10px; width:'+divthw+'px;height:100%;z-index:51"><div style="background-color: #FFFFFF; layer-background-color: #FFFFFF;width:'+thw+'px;z-index:51">'+'<div style="border-width:0px;margin:0px;padding:0px;background-color: #ffffff; layer-background-color: #ffffff;z-index:51;position:absolute;width:'+thw+'px;height:'+smthh+'px;text-align:center"><img alt="Foto na ryby" src="'+thumbimgprev+'"  width="'+smthw+'" height="'+smthh+'" border="0"></div><div style="border-width:0px;margin:0px;padding:0px;z-index:52;position:absolute;width:'+thw+'px;top:'+topx+'px;text-align: center;"><img alt="Wczytywanie" src="image/template/loader.gif"></div><div style="border-width:0px;margin:0px;padding:0px;z-index:53;position:absolute;width:'+thw+'px;"><div style="border: 1px solid #808080;width:'+thw+'px;"><img alt="Spacja" name="btcontainer" id="btcontainer" src="image/template/spacer.gif" border="0" width="'+thw+'" height="'+thh+'" ><div id="div_2" style="border-width:0px;margin:0px;z-index:53;layer-background-color: #FFFFFF;background-color:#ffffff;padding:3px;"><b>'+imgtitle+'</b>'+(thw>=233?'<nobr>':'')+''+(thw>=233?'</nobr>':'')+'<br></div></div></div></div><div style="visibility:hidden"><div id="div_2" style="padding:3px;">'+imgtitle+'<br>'+(thw>=233?'<nobr>':'')+(thw>=233?'</nobr>':'')+'<br></div><div class="h2" style="background-color: #b2a99d; layer-background-color: #b2a99d;width:'+thw+'px; border: 1px none #808080; padding:10px;padding:1px;z-index:51;" id="div_3" ></div></div><div style="clear: both"></div></div>';
		if (navigator.userAgent.indexOf("Firefox")!=-1 || navigator.userAgent.indexOf("Safari")!=-1)
			gettrailobject().innerHTML = '<div style="background-color: '+bgcolor+'; layer-background-color: #FFFFFF; border: 1px none #808080; padding:10px; width:'+divthw+'px;height:'+divthh+'px;z-index:51"><div style="background-color: #FFFFFF; layer-background-color: #FFFFFF;width:'+thw+'px;z-index:51">'+'<div style="border-width:0px;margin:0px;padding:0px;background-color: #ffffff; layer-background-color: #ffffff;z-index:51;position:absolute;width:'+thw+'px;height:'+smthh+'px;text-align:center"><img alt="Foto na ryby" src="'+thumbimgprev+'"  width="'+smthw+'" height="'+smthh+'" border="0"></div><div style="border-width:0px;margin:0px;padding:0px;z-index:52;position:absolute;width:'+thw+'px;top:'+topx+'px;text-align: center;"><img alt="Wczytywanie" src="image/template/loader.gif"></div><div style="border-width:0px;margin:0px;padding:0px;z-index:53;position:absolute;width:'+thw+'px;"><div style="border: 1px solid #808080;width:'+thw+'px;"><img alt="Spacja" name="btcontainer" id="btcontainer" src="image/template/spacer.gif" border="0" width="'+thw+'" height="'+thh+'" ><div id="div_2" style="border-width:0px;margin:0px;z-index:53;layer-background-color: #FFFFFF;background-color:#ffffff;padding:3px;"><b>'+imgtitle+'</b>'+(thw>=233?'<nobr>':'')+(thw>=233?'</nobr>':'')+'<br></div></div></div></div><div style="visibility:hidden"><div id="div_2" style="padding:3px;">'+imgtitle+'<br>'+(thw>=233?'<nobr>':'')+(thw>=233?'</nobr>':'')+'<br></div><div class="h2" style="background-color: #b2a99d; layer-background-color: #b2a99d;width:'+thw+'px; border: 1px none #808080; padding:10px;padding:1px;z-index:51;" id="div_3" ></div></div><div style="clear: both"></div></div>';
		if (navigator.userAgent.indexOf("MSIE")!=-1)
			gettrailobject().innerHTML = '<div style="background-color: '+bgcolor+'; layer-background-color: #FFFFFF; border: 1px none #808080; padding:10px; width:'+divthw+'px;height:100%;z-index:51"><div style="background-color: #FFFFFF; layer-background-color: #FFFFFF;width:'+thw+'px;z-index:51">'+'<div style="border-width:0px;margin:0px;padding:0px;background-color: #FFFFFF; layer-background-color: #FFFFFF;z-index:51;position:absolute;width:'+thw+'px;height:'+smthh+'px;text-align:center"><img alt="Foto na ryby" src="'+thumbimgprev+'"  width="'+smthw+'" height="'+smthh+'" border="0"></div><div style="border-width:0px;margin:0px;padding:0px;z-index:52;position:absolute;width:'+thw+'px;top:'+topx+'px;text-align: center;"><img alt="Wczytywanie" src="image/template/loader.gif"></div><div style="margin:0px;padding:0px;z-index:53;position:absolute;width:'+thw+'px;"><div style="border: 1px solid #808080;width:'+thw+'px;"><img alt="Spacja" name="btcontainer" id="btcontainer" src="image/template/spacer.gif" border="0" width="'+thw+'" height="'+thh+'"  ><div id="div_2" style="margin:0px;width:'+thw+'px;z-index:53;layer-background-color: #FFFFFF;background-color:#ffffff;padding:3px;"><b>'+imgtitle+'</b>'+(thw>=233?'<nobr>':'')+(thw>=233?'</nobr>':'')+'<br></div></div></div></div><div style="visibility:hidden"><div id="div_2" style="padding:3px;">'+imgtitle+'<br>'+(thw>=233?'<nobr>':'')+(thw>=233?'</nobr>':'')+'<br></div><div class="h2" style="background-color: #b2a99d; layer-background-color: #b2a99d;width:'+thw+'px; border: 1px none #808080; padding:10px;padding:1px;z-index:51;" id="div_3" ></div></div><div style="clear: both"></div></div>';

		//setTimeOut
		xto = setTimeout("xtimeOut('"+thumbimg+"')",100);
		gettrailobj().visibility="visible";
		divw = parseInt(thw)+25;
		divh = parseInt(thh)+130;
		document.onmousemove=followmouse;

}

function xtimeOut(thumbimgg){
	if (document.getElementById)
		document.getElementById('btcontainer').src = thumbimgg;
	else if (document.all)
		document.all.btcontainer.src = thumbimgg;

}
function followmouse(e)
	{
	var docwidth=document.all? truebody().scrollLeft+truebody().clientWidth : pageXOffset+window.innerWidth-15
	var docheight=document.all? Math.min(truebody().scrollHeight, truebody().clientHeight) : Math.min(document.body.offsetHeight, window.innerHeight)
if(typeof e != "undefined")
	{
	if(docwidth < 15+e.pageX+divw)
		xcoord = e.pageX-divw-5;
	else
		xcoord = 15+e.pageX;
	if(docheight < 15+e.pageY+divh)
		ycoord = 15+e.pageY-Math.max(0,(divh + e.pageY - docheight - truebody().scrollTop - 30));
	else
		ycoord = 15+e.pageY;
	}
else if (typeof window.event != "undefined")
	{
	if(docwidth < 15+truebody().scrollLeft+event.clientX+divw)
		xcoord = truebody().scrollLeft-5+event.clientX-divw;
	else
		xcoord = truebody().scrollLeft+15+event.clientX;

	if(docheight < 15+truebody().scrollTop+event.clientY+divh)
		ycoord = 15+truebody().scrollTop+event.clientY-Math.max(0,(divh + event.clientY - docheight - 30));
	else
		ycoord = truebody().scrollTop+15+event.clientY;
	}
	gettrailobj().left=xcoord+"px"
	gettrailobj().top=ycoord+"px"
	}


Element.addMethods('IMG', {      
	actionZoomImage: function(objSender, localConfig)
	{	
		objSender.onmouseover = null;
		var divObj = new Element("div");
		divObj.setStyle({
			border: 'solid 4px #FF8734',
			width: '150px',
			height: '150px',
			overflow: 'hidden',
			background: "url('image/template/loader.gif') no-repeat center center #ffffff"	
		});				
		document.body.appendChild(divObj);
		var tooltip = new Tooltip(objSender.identify(), divObj);
		objSender.simulate("mouseover");		
		
		var imgObj = new Element("img");
		imgObj.writeAttribute("alt", "trwa pobieranie pliku");
		imgObj.writeAttribute("src", localConfig.image);
		divObj.appendChild(imgObj);
		
		if (localConfig.description)
		{
			var divDescription = new Element("div");
			divDescription.update(localConfig.description);				
		}
		
		
		new PeriodicalExecuter(function(pe){
			if (imgObj.complete)
			{
				var imgW = parseInt(imgObj.width) + "px";
				var imgH = parseInt(imgObj.height) + "px";
				
				if (parseInt(imgW) <= 0)
				{
				  imgW = 'auto';
					imgH = 'auto';
				}
				
				
				divObj.setStyle({
					width: imgW,
					height: imgH
				});
				
				divDescription.setStyle({
					position: "relative",
					marginTop: "-40px",
					//width: imgObj.width + "px",
					height: "40px",					
					padding: "5px",
					background: 'black',
					opacity: 0.3,
					color: "white"
				});
				
				divObj.appendChild(divDescription);
				pe.stop();
			}
						
			
		},0.1);
	}
});




var Tooltip = Class.create();

Tooltip.prototype = {
	initialize: function(element, tool_tip) 
	{
		var options = Object.extend({
										default_css: false,
										margin: "0px",
										padding: "5px",
										backgroundColor: "#d6d6fc",
										min_distance_x: 15,
										min_distance_y: 15,
										delta_x: 0,
										delta_y: 0,
										zindex: 1000
										}, arguments[2] || {});
		
		this.element = $(element);
		
		this.options = options;
		
		// use the supplied tooltip element or create our own div
		if($(tool_tip)) {
			this.tool_tip = $(tool_tip);
		} 
		else 
		{
			this.tool_tip = $(document.createElement("div")); 
			document.body.appendChild(this.tool_tip);
			this.tool_tip.addClassName("tooltip");
			this.tool_tip.appendChild(document.createTextNode(tool_tip));
		}
		
		// hide the tool-tip by default
		this.tool_tip.hide();
		
		this.eventMouseOver  = this.showTooltip.bindAsEventListener(this);
		this.eventMouseOut   = this.hideTooltip.bindAsEventListener(this);
		this.eventMouseMove  = this.moveTooltip.bindAsEventListener(this);		
		
		this.registerEvents();
	},
	
	destroy: function() 
	{
		Event.stopObserving(this.element, "mouseover", this.eventMouseOver);
		Event.stopObserving(this.element, "mouseout", this.eventMouseOut);
		Event.stopObserving(this.element, "mousemove", this.eventMouseMove);
	},
	
	registerEvents: function() 
	{
		Event.observe(this.element, "mouseover", this.eventMouseOver);
		Event.observe(this.element, "mouseout", this.eventMouseOut);
		Event.observe(this.element, "mousemove", this.eventMouseMove);
	},
	
	moveTooltip: function(event)
	{
		Event.stop(event);		
		// absolutne pooenie myszki
		var mouse_x = Event.pointerX(event);
		var mouse_y = Event.pointerY(event);
				
		var dimensions = Element.getDimensions( this.tool_tip ); // rozmiar ramki z powiekszonym obrazkiem		
		var element_width = dimensions.width;
		var element_height = dimensions.height;
		
		// polozenie elementu wyzwalajacego na ekranie
		var senderPlace = event.target.cumulativeOffset();
		
		// przesuniecia offsetowe wzgledem poczatku ekranu
		var offsets = document.viewport.getScrollOffsets();  
				
						
		if ( (element_width + mouse_x) >= ( this.getWindowWidth() - this.options.min_distance_x ) )
		{ 
			// too big for X
			mouse_x = mouse_x - element_width;
			// apply min_distance to make sure that the mouse is not on the tool-tip
			mouse_x = mouse_x - this.options.min_distance_x;
		} 
		else
		{
			mouse_x = mouse_x + this.options.min_distance_x;
		}
				

		
		// przypadek - tooltip wychodzi poza dolna granice ekranu	
		if ((mouse_y - offsets[1]) + element_height >= this.getWindowHeight() - this.options.min_distance_y  )
		{
			var offset = ((mouse_y - offsets[1]) + element_height) - (this.getWindowHeight() );
			
			mouse_y = mouse_y - offset;			
		}		
		else
		{
			mouse_y = mouse_y + this.options.min_distance_y;
		}
		
		
		// now set the right styles
		this.setStyles(mouse_x, mouse_y);
	},
	
	
	showTooltip: function(event) 
	{
		Event.stop(event);
		this.moveTooltip(event);
		Element.show(this.tool_tip);
	},
	
	setStyles: function(x, y)
	{
		// set the right styles to position the tool tip
		Element.setStyle(this.tool_tip, { 
											position:'absolute',
											top:y + this.options.delta_y + "px",
											left:x + this.options.delta_x + "px",
											zindex:this.options.zindex
										});
	
	// apply default theme if wanted
		if (this.options.default_css)
		{
			Element.setStyle(this.tool_tip, {
												margin:this.options.margin,
												padding:this.options.padding,
												backgroundColor:this.options.backgroundColor,
												zindex:this.options.zindex
											});	
		}	
	},
	
	hideTooltip: function(event)
	{
		new Element.hide(this.tool_tip);
	},
	
	getWindowHeight: function()
	{
		var innerHeight;
		if (navigator.appVersion.indexOf('MSIE')>0) 
		{
			innerHeight = document.body.clientHeight;
		} 
		else 
		{
			innerHeight = window.innerHeight;
		}
		return innerHeight;	
	},
	
	getWindowWidth: function()
	{
		var innerWidth;
		if (navigator.appVersion.indexOf('MSIE')>0) 
		{
			innerWidth = document.body.clientWidth;
		} 
		else 
		{
			innerWidth = window.innerWidth;
		}
		return innerWidth;	
	}

}


/*
<style>
	#overlay {
		position:absolute; 
		top:0; 
		left:0; 
		z-index:300; 
		width: 100%;
		background-color:#000;			
	}
</style>
*/
// -----------------------------------------------------------------------------------

//
//  Configuration
//
OverlayOptions = Object.extend({
     'opacity'	: 0.6   // controls transparency of shadow overlay    
	,'color'	: '#000'
	,'zIndex'	: 300	
}, window.OverlayOptions || {});

// -----------------------------------------------------------------------------------

var Overlay = Class.create();

Overlay.prototype = {

    showCallback		: '', //funkcja wywoywana po wywietleniu warstwy
    closeCallback		: '', //funkcja wywoywana po ukryciu warstwy
    visibleContainer	: '', //id elementu ktory ma znajdowac sie nad warstwa
	
	containers			: [],	
    
    //
    // initialize()
    // Constructor
    //
    initialize: function() {
		var self=this;            
		this.updateTagList();
		            
        // Code inserts html at the bottom of the page :
        //
        //  <div id="overlay"></div>        
		if(!$('overlay'))
		{
			var pageContainer= $('pageContainer') ?  $('pageContainer') : $$('body')[0];
				
			pageContainer.appendChild(Builder.node('div',{id:'overlay'}));
	        //var objBody = $$('body')[0];		
			//objBody.appendChild(Builder.node('div',{id:'overlay'}));
	    }    
		$('overlay').hide().observe('click', (function() { this.hide(); }).bind(this));
		
		/*$$('.overlayClose').each(function(elem, index) {
		  	elem.observe('click', function() { self.hide(); });
		});*/
		Event.observe(document, 'keydown',function(e){
			var key = (typeof e.which != "undefined") ? e.which : e.keyCode;			
			if(key==27 && $('overlay').visible())
			{
				self.hide();	
			}		
		});
		
		$('overlay').hide();
		$('overlay').setStyle({
			 'position'			: 'absolute' 
			,'top'				: '0'
			,'left'				: '0' 
			,'width'			: '100%'
			,'height'			: '100%'
			,'border'			: 'none'
			,'margin'			: '0'
			,'padding'			: '0'
			,'zIndex'			: OverlayOptions.zIndex 			
			,'backgroundColor'	: OverlayOptions.color	
			,'opacity'			: OverlayOptions.opacity	
		});
		//$('overlay').setStyle({ opacity: OverlayOptions.opacity });		
		//$('overlay').setOpacity(OverlayOptions.opacity);
    },
      
	addContainer: function(name,params)
	{
		var self=this;
		if($(name))
		{
			$(name).down('dt').observe('click',function(){
				self.hide();
			});
			
			/*$(name).select('overlayClose').each(function(elem){
				self.hide();
			});*/
			
			this.containers[name]= params;
			
			/*if(typeof this.containers[name].onShow == 'function')
			{
				this.containers[name].onShow();
			}*/
			
			
			if($(params.trigger))
			{
				$(params.trigger).observe('click',function(event){
					self.show(name);					
					this.blur();
					event.stop();
					return false;
				});
				
				$(params.trigger).show();
			}
		}
		//this.containers[name]=[];
		
		//this.containers[name]['name']=name;			
	},      
    //
    //  show()
    //  Display overlay
    //
    show: function(visibleContainer) { 
		   
    	var self=this;
    	var obj={};
		
    	
    	
    	if($(visibleContainer))
    	{
			this.visibleContainer=visibleContainer;
			$(visibleContainer).show();
		}
    	
		if(this.visibleContainer)
		{    	
			$$('select', 'object', 'embed').each(function(node){
				
				if(!node.descendantOf(self.visibleContainer))
				{ 
					node.style.visibility = 'hidden';
				}
			});
		}
		else
		{
			$$('select', 'object', 'embed').each(function(node){
				
				node.style.visibility = 'hidden';
			});	
		}

        // stretch overlay to fill page and fade in
        var arrayPageSize = this.getPageSize();
        //$('overlay').setStyle({ width: arrayPageSize[0] + 'px', height: arrayPageSize[1] + 'px' });
        $('overlay').setStyle({ height: arrayPageSize[1] + 'px' });
		$('overlay').show();
		
		if(eval('typeof ' + visibleContainer) != 'undefined')
		{
			eval('obj = '+visibleContainer);
			//alert(typeof obj.onShow);		
			if(typeof obj.onShow == 'function')
			{
				obj.onShow();
			}
		}
		this.onShow(visibleContainer);

    },
    
    onShow : function(name) {
    	    			
		if(typeof this.showCallback == 'function')
		{
			this.showCallback();
		}
		
		if(typeof this.containers[name] != 'undefined')
		{
			if(typeof this.containers[name].onShow == 'function')
			{
				this.containers[name].onShow();
			}
		}
		
	},


    //
    //  hide()
    //
    hide: function() {
		if($(this.visibleContainer))
		{
			$(this.visibleContainer).hide();	
		}
		$('overlay').hide();
        //new Effect.Fade(this.overlay, { duration: this.overlayDuration });
        $$('select', 'object', 'embed').each(function(node){ 
			node.style.visibility = 'visible';
		});
        
        this.onHide(this.visibleContainer);
    },
    
    onHide : function(name) {
		if(typeof this.hideCallback == 'function')
		{
			this.hideCallback();
		}
		if(typeof this.containers[name] != 'undefined')
		{
			if(typeof this.containers[name].onHide == 'function')
			{
				this.containers[name].onHide();
			}
		}
	},
	
	//
    // updateTagList()
    //
    /*updateTagList: function() {   
        this.updateTagList = Prototype.emptyFunction;

        document.observe('click', (function(event){
            //var target = event.findElement('[class^=showOverlay]') || event.findElement('[class^=showOverlay]');
            var target = event.findElement();
            //if (target) {
            if(target.hasClassName('showOverlay')) {
            	target.overlayObj=this;
                event.stop();
                this.show(target);
            }
        }).bind(this));
    },*/
    updateTagList: function() {   
        this.updateTagList = Prototype.emptyFunction;
		var self=this;
		/*$$('.addOverlay').each(function(elem) {
			elem.overlayObj=self;	
		  //alert(s);
		});*/

		
        document.observe('click', (function(event){
            //var target = event.findElement('[class^=showOverlay]') || event.findElement('[class^=showOverlay]');
            var target = event.findElement();
            //if (target) {
           /*if(target.hasClassName('showOverlay')) {
            	target.overlayObj=this;
                event.stop();
                this.show(target);
            }*/
            
            if(target.hasClassName('overlayClose')) {
            	event.stop();
                this.hide();
            }
            
        }).bind(this));
    },
	
    //
    //  getPageSize()
    //
    getPageSize: function() {
	        
	     var xScroll, yScroll;
		
		if (window.innerHeight && window.scrollMaxY) {	
			xScroll = window.innerWidth + window.scrollMaxX;
			yScroll = window.innerHeight + window.scrollMaxY;
		} else if (document.body.scrollHeight > document.body.offsetHeight){ // all but Explorer Mac
			xScroll = document.body.scrollWidth;
			yScroll = document.body.scrollHeight;
		} else { // Explorer Mac...would also work in Explorer 6 Strict, Mozilla and Safari
			xScroll = document.body.offsetWidth;
			yScroll = document.body.offsetHeight;
		}
		
		var windowWidth, windowHeight;
		
		if (self.innerHeight) {	// all except Explorer
			if(document.documentElement.clientWidth){
				windowWidth = document.documentElement.clientWidth; 
			} else {
				windowWidth = self.innerWidth;
			}
			windowHeight = self.innerHeight;
		} else if (document.documentElement && document.documentElement.clientHeight) { // Explorer 6 Strict Mode
			windowWidth = document.documentElement.clientWidth;
			windowHeight = document.documentElement.clientHeight;
		} else if (document.body) { // other Explorers
			windowWidth = document.body.clientWidth;
			windowHeight = document.body.clientHeight;
		}	
		
		// for small pages with total height less then height of the viewport
		if(yScroll < windowHeight){
			pageHeight = windowHeight;
		} else { 
			pageHeight = yScroll;
		}
	
		// for small pages with total width less then width of the viewport
		if(xScroll < windowWidth){	
			pageWidth = xScroll;		
		} else {
			pageWidth = windowWidth;
		}
		return [pageWidth,pageHeight];
	}
}
//var overlayObj=new Overlay();;
/*Event.observe(window, 'load',
	function() { new Overlay(); }
);*/

Event.observe(window, 'load', function () { 
	
	var overlay=new Overlay();
	/*
	overlay.addContainer('advancedSearch',{
						
		 'trigger'	: 'advancedSearchTrigger'
		,'onShow'	: function() {
			this.onShow=null;
			new Ajax.Updater($('advancedSearch').select('dd')[0], 'load.php?module=offer&file=search_advanced', {
				method : 'get',
				parameters: {}
			})
		}
		,'onHide'	: function() { }
	});	
	
	overlay.addContainer('logInForm',{			
		 'trigger'	: 'logInFormTrigger'
		,'onShow'	: function() {}
		,'onHide'	: function() {}
	});
	
	overlay.addContainer('wishList',{			
		 'trigger'	: 'wishListTrigger'
		,'onShow'	: function() {}
		,'onHide'	: function() {}
	});
	
	overlay.addContainer('cart',{			
		 'trigger'	: 'cartTrigger'
		,'onShow'	: function() {}
		,'onHide'	: function() {}
	});
		 */
			 
});
 

/**
 * Event.simulate(@element, eventName[, options]) -> Element
 * 
 * - @element: element to fire event on
 * - eventName: name of event to fire (only MouseEvents and HTMLEvents interfaces are supported)
 * - options: optional object to fine-tune event properties - pointerX, pointerY, ctrlKey, etc.
 *
 *    $('foo').simulate('click'); // => fires "click" event on an element with id=foo
 *
 **/
(function(){
  
  var eventMatchers = {
    'HTMLEvents': /^(?:load|unload|abort|error|select|change|submit|reset|focus|blur|resize|scroll)$/,
    'MouseEvents': /^(?:click|mouse(?:down|up|over|move|out))$/
  }
  var defaultOptions = {
    pointerX: 0,
    pointerY: 0,
    button: 0,
    ctrlKey: false,
    altKey: false,
    shiftKey: false,
    metaKey: false,
    bubbles: true,
    cancelable: true
  }
  
  Event.simulate = function(element, eventName) {
    var options = Object.extend(defaultOptions, arguments[2] || { });
    var oEvent, eventType = null;
    
    element = $(element);
    
    for (var name in eventMatchers) {
      if (eventMatchers[name].test(eventName)) { eventType = name; break; }
    }

    if (!eventType)
      throw new SyntaxError('Only HTMLEvents and MouseEvents interfaces are supported');

    if (document.createEvent) {
      oEvent = document.createEvent(eventType);
      if (eventType == 'HTMLEvents') {
        oEvent.initEvent(eventName, options.bubbles, options.cancelable);
      }
      else {
        oEvent.initMouseEvent(eventName, options.bubbles, options.cancelable, document.defaultView, 
          options.button, options.pointerX, options.pointerY, options.pointerX, options.pointerY,
          options.ctrlKey, options.altKey, options.shiftKey, options.metaKey, options.button, element);
      }
      element.dispatchEvent(oEvent);
    }
    else {
      options.clientX = options.pointerX;
      options.clientY = options.pointerY;
      oEvent = Object.extend(document.createEventObject(), options);
      element.fireEvent('on' + eventName, oEvent);
    }    
        
    return element;
  }
  
  Element.addMethods({ simulate: Event.simulate });  
})()

ajaxGalleryOpened = false;
function displayAjaxGallery(idGallery, imagePathToLoad, nrMinImage)
{

	if (ajaxGalleryOpened == true ) return;

	ajaxGalleryOpened = true;

	var bg = null;

	if ($('bgExist')) return;

	bg = new Element("div");
	bg.writeAttribute('id', 'bgExist');

	/* ukrywanie selektw pod ie6 */
	if (Prototype.Browser.IE)
	{
		if (!/MSIE [789]/.test((navigator.appVersion +"")))
		{
			$$('select').each(function(node){
				node.hide();
			});
		}
	}

	new Ajax.Request('frame_nh.php?ajax_gallery_id='+idGallery, {
	  onCreate: function(transport){
      var innerHeight = (document.height !== undefined) ? document.height : document.body.offsetHeight;
    	var windowWidth = document.viewport.getWidth();
    	var windowHeight = document.viewport.getHeight();
    	var pageOffset = document.viewport.getScrollOffsets();

    		bg.setStyle({
		    			zIndex: 800,
		    			position: 'absolute',
		    			background: '#000000',	/* tlo dookola */
		    			width: windowWidth + 'px',
		    			height: innerHeight + 'px',
       				top: 0,
		    			left: 0,
		    			opacity: 0.6,
		    			cursor: 'pointer'
					});


    		document.body.appendChild(bg);
		},

	  onComplete: function(transport) {

	    if (200 == transport.status)
	    {
	    	var galleryAjax = new Element("div");

	    	var innerHeight = (document.height !== undefined) ? document.height : document.body.offsetHeight;
	    	var windowWidth = document.viewport.getWidth();
	    	var windowHeight = document.viewport.getHeight();
	    	var pageOffset = document.viewport.getScrollOffsets();
	    	
	    	if (innerHeight < windowHeight)
	    	{
	    		innerHeight = windowHeight;
	    	}



		    document.body.appendChild(galleryAjax);
		    galleryAjax.update("");
		    galleryAjax.update(transport.responseText);
				bg.setStyle({
		    			zIndex: 800,
		    			position: 'absolute',
		    			width: windowWidth + 'px',
		    			height: innerHeight + 'px',
		    			top: 0,
		    			left: 0,
		    			cursor: 'pointer'
					});

				galleryAjax.setStyle({
					zIndex: 801,
					position: 'absolute',
					width: 'auto'
				});


				var galleryWidth = $('ajax_gallery_container').getWidth();
				var leftOffset = Math.round((windowWidth - galleryWidth ) / 2 );
				var topOffset = (windowHeight - galleryAjax.getHeight() ) / 2;
				
				if (topOffset < 0)
				{
					topOffset = pageOffset.top;
				}
				else
				{
				  topOffset += pageOffset.top;
				}



				galleryAjax.setStyle({
						left: leftOffset + "px",
						top: topOffset + "px",
						width: galleryWidth + "px"
					});



				onScollHandle = function()
				{
				  return;
				  /*
				    var pageOffset = document.viewport.getScrollOffsets();
						var topOffset = pageOffset.top + 80;

						//if (scrollTimer) scrollTimer.stop();

						scrollTimer = new PeriodicalExecuter(function(pe)
						{
							galleryAjax.setStyle({
								top: topOffset + "px"
							});
							pe.stop();
						},0.15);
					*/
				};

				hideScroll = function() {
						if (Prototype.Browser.IE)
						{
							if (!/MSIE [789]/.test((navigator.appVersion +"")))
							{
								$$('select').each(function(node){
									node.show();
								});
							}
						}
					  Event.stopObserving(window, 'resize', onResizeHandle);
					  Event.stopObserving(window, 'scroll', onScollHandle);
		  			galleryAjax.remove();
						bg.remove();
				}

				onResizeHandle = function()
				{
					Event.stopObserving(window, 'resize', onResizeHandle);
					Event.stopObserving(window, 'scroll', onScollHandle);
					hideScroll();
				}

				Event.observe(window, 'scroll', onScollHandle);
				Event.observe(window, 'resize', onResizeHandle);

				bg.observe('click', function(event) { hideScroll(); });

				$('ajax_gallery_close').observe('click', function(event) { hideScroll(); });

				if (imagePathToLoad)
				{
					ajaxGalleryLoadImage(null, imagePathToLoad, nrMinImage);
				}


		  } // end if;
		  else


		  {
		  	/* ukrywanie selektw pod ie6 */
				if (Prototype.Browser.IE)
				{
					if (!/MSIE [789]/.test((navigator.appVersion +"")))
					{
						$$('select').each(function(node){
							node.show();
						});
					}
				}
			}

		  ajaxGalleryOpened = false;

	  }
	});
}


function ajaxGalleryLoadImage(objSender, imgPath, nrImage)
{

  $('ajax_gallery_min').select('.min_image_ajax_gallery').each(function(item, index)
  {
  	  if (nrImage == index)
	  {
	  	objSender = item;
	  }
	  
	  if (objSender == null && index == 0 && !nrImage)
	  {
	    objSender = item; 
	  }
	  
	  
	  
	  

	  if (item == objSender)
	  {
		  item.setStyle({
		    opacity: 1,
		    border: "solid 1px #dAdAdA"
			});
		}
		else
		{
			item.setStyle({
		    opacity: 0.4,
		    border: "solid 1px #dAdAdA"
			});
		}
	});

	$('ajax_gallery_big').update("");

	var img = new Element("img");
	img.writeAttribute("alt", "Internetowy Sklep WÄ™dkarski");
	img.writeAttribute("src", imgPath);

	var containerHeight = $('ajax_gallery_big').getHeight();
	var containerWidth = $('ajax_gallery_big').getWidth();

	new PeriodicalExecuter(function(pe)
	{
		if (img.complete)
		{

			$('ajax_gallery_big').setStyle({
					overflow: 'auto',
					margin: 'auto'
				});

			if ((img.height > containerHeight) || (img.width > containerWidth) )
			{
				$('ajax_gallery_big').setStyle({
					overflow: 'auto',
					margin: 'auto'
				});
			}

			$('ajax_gallery_big').innerHTML = '';
			$('ajax_gallery_big').appendChild(img);
			pe.stop();
		}
	}, 0.1);
}
