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 1g={82:\'1.6.0.1\',1U:{3P:!!(1z.6W&&!1z.83),4M:!!1z.83,4l:4N.4O.3Q(\'d2/\')>-1,6X:4N.4O.3Q(\'6X\')>-1&&4N.4O.3Q(\'9U\')==-1,9V:!!4N.4O.1f(/d3.*d4.*9W/)},3R:{6Y:!!1c.2L,66:!!1z.67,6Z:1c.3S(\'1R\').4P&&1c.3S(\'1R\').4P!==1c.3S(\'1w\').4P},70:\'<4Q[^>]*>([\\\\S\\\\s]*?)<\\/4Q>\',9X:/^\\/\\*-d5-([\\s\\S]*)\\*\\/\\s*$/,43:q(){},K:q(x){o x}};E(1g.1U.9V)1g.3R.6Z=1t;G 29={2l:q(){G 2M=1k,3d=$A(1p);E(M.2m(3d[0]))2M=3d.4R();q 1N(){C.2F.3D(C,1p)}M.19(1N,29.1d);1N.84=2M;1N.9Y=[];E(2M){G 85=q(){};85.1l=2M.1l;1N.1l=1s 85;2M.9Y.1h(1N)}15(G i=0;i<3d.N;i++)1N.68(3d[i]);E(!1N.1l.2F)1N.1l.2F=1g.43;1N.1l.9Z=1N;o 1N}};29.1d={68:q(22){G 2T=C.84&&C.84.1l;G 3d=M.44(22);E(!M.44({2y:1q}).N)3d.1h("2y","a0");15(G i=0,N=3d.N;i<N;i++){G 1x=3d[i],I=22[1x];E(2T&&M.2m(I)&&I.a1().3E()=="$47"){G 1D=I,I=M.19((q(m){o q(){o 2T[m].3D(C,1p)}})(1x).5n(1D),{a0:q(){o 1D},2y:q(){o 1D.2y()}})}C.1l[1x]=I}o C}};G 4S={};M.19=q(5o,22){15(G 1x 1Z 22)5o[1x]=22[1x];o 5o};M.19(M,{2z:q(Y){2o{E(M.2A(Y))o\'4m\';E(Y===1k)o\'1k\';o Y.2z?Y.2z():Y.2y()}2B(e){E(e a2 d6)o\'...\';4n e;}},3m:q(Y){G 1A=48 Y;5p(1A){2p\'4m\':2p\'q\':2p\'d7\':o;2p\'d8\':o Y.2y()}E(Y===1k)o\'1k\';E(Y.3m)o Y.3m();E(M.49(Y))o;G V=[];15(G 1x 1Z Y){G I=M.3m(Y[1x]);E(!M.2A(I))V.1h(1x.3m()+\': \'+I)}o\'{\'+V.2C(\', \')+\'}\'},4o:q(Y){o $H(Y).4o()},4a:q(Y){o Y&&Y.4a?Y.4a():26.5q(Y)},44:q(Y){G 44=[];15(G 1x 1Z Y)44.1h(1x);o 44},1S:q(Y){G 1S=[];15(G 1x 1Z Y)1S.1h(Y[1x]);o 1S},2q:q(Y){o M.19({},Y)},49:q(Y){o Y&&Y.3n==1},4p:q(Y){o Y&&Y.9Z===2a},86:q(Y){o Y a2 3T},2m:q(Y){o 48 Y=="q"},3e:q(Y){o 48 Y=="3f"},4T:q(Y){o 48 Y=="4q"},2A:q(Y){o 48 Y=="4m"}});M.19(87.1l,{a1:q(){G 3o=C.2y().1f(/^[\\s\\(]*q[^(]*\\((.*?)\\)/)[1].4U(",").71("3U");o 3o.N==1&&!3o[0]?[]:3o},1G:q(){E(1p.N<2&&M.2A(1p[0]))o C;G 3g=C,20=$A(1p),Y=20.4R();o q(){o 3g.3D(Y,20.21($A(1p)))}},d9:q(){G 3g=C,20=$A(1p),Y=20.4R();o q(1b){o 3g.3D(Y,[1b||1z.1b].21(20))}},72:q(){E(!1p.N)o C;G 3g=C,20=$A(1p);o q(){o 3g.3D(C,20.21($A(1p)))}},88:q(){G 3g=C,20=$A(1p),a3=20.4R()*a4;o 1z.da(q(){o 3g.3D(3g,20)},a3)},5n:q(1K){G 3g=C;o q(){o 1K.3D(C,[3g.1G(C)].21($A(1p)))}},4r:q(){E(C.89)o C.89;G 3g=C;o C.89=q(){o 3g.3D(1k,[C].21($A(1p)))}}});87.1l.4s=87.1l.88.72(0.db);dc.1l.3m=q(){o\'"\'+C.dd()+\'-\'+(C.de()+1).4t(2)+\'-\'+C.df().4t(2)+\'T\'+C.dg().4t(2)+\':\'+C.dh().4t(2)+\':\'+C.di().4t(2)+\'Z"\'};G a5={a6:q(){G 73;15(G i=0,N=1p.N;i<N;i++){G a7=1p[i];2o{73=a7();2b}2B(e){}}o 73}};4b.1l.1f=4b.1l.2N;4b.a8=q(5r){o 26(5r).1V(/([.*+?^=!:${}()|[\\]\\/\\\\])/g,\'\\\\$1\')};G a9=29.2l({2F:q(2U,4c){C.2U=2U;C.4c=4c;C.74=1t;C.69()},69:q(){C.3V=aa(C.6a.1G(C),C.4c*a4)},8a:q(){C.2U(C)},8b:q(){E(!C.3V)o;ab(C.3V);C.3V=1k},6a:q(){E(!C.74){2o{C.74=1q;C.8a()}dj{C.74=1t}}}});M.19(26,{5q:q(I){o I==1k?\'\':26(I)},ac:{\'\\b\':\'\\\\b\',\'\\t\':\'\\\\t\',\'\\n\':\'\\\\n\',\'\\f\':\'\\\\f\',\'\\r\':\'\\\\r\',\'\\\\\':\'\\\\\\\\\'}});M.19(26.1l,{3h:q(24,3p){G 1r=\'\',22=C,1f;3p=1p.5s.8c(3p);1O(22.N>0){E(1f=22.1f(24)){1r+=22.3q(0,1f.1i);1r+=26.5q(3p(1f));22=22.3q(1f.1i+1f[0].N)}1m{1r+=22,22=\'\'}}o 1r},ad:q(24,3p,3r){3p=C.3h.8c(3p);3r=M.2A(3r)?1:3r;o C.3h(24,q(1f){E(--3r<0)o 1f[0];o 3p(1f)})},ae:q(24,W){C.3h(24,W);o 26(C)},dk:q(N,5t){N=N||30;5t=M.2A(5t)?\'...\':5t;o C.N>N?C.3q(0,N-5t.N)+5t:26(C)},3U:q(){o C.1V(/^\\s+/,\'\').1V(/\\s+$/,\'\')},af:q(){o C.1V(/<\\/?[^>]+>/gi,\'\')},4d:q(){o C.1V(1s 4b(1g.70,\'ag\'),\'\')},ah:q(){G ai=1s 4b(1g.70,\'ag\');G aj=1s 4b(1g.70,\'dl\');o(C.1f(ai)||[]).2O(q(ak){o(ak.1f(aj)||[\'\',\'\'])[1]})},4V:q(){o C.ah().2O(q(4Q){o 75(4Q)})},76:q(){G 5u=1p.5s;5u.3W.77=C;o 5u.1R.4u},al:q(){G 1R=1s J(\'1R\');1R.4u=C.af();o 1R.3i[0]?(1R.3i.N>1?$A(1R.3i).3F(\'\',q(2P,L){o 2P+L.4v}):1R.3i[0].4v):\'\'},78:q(am){G 1f=C.3U().1f(/([^?#]*)(#.*)?$/);E(!1f)o{};o 1f[1].4U(am||\'&\').3F({},q(3s,1H){E((1H=1H.4U(\'=\'))[0]){G 1v=8d(1H.4R());G I=1H.N>1?1H.2C(\'=\'):1H[0];E(I!=4m)I=8d(I);E(1v 1Z 3s){E(!M.4p(3s[1v]))3s[1v]=[3s[1v]];3s[1v].1h(I)}1m 3s[1v]=I}o 3s})},3t:q(){o C.4U(\'\')},8e:q(){o C.3q(0,C.N-1)+26.dm(C.an(C.N-1)+1)},79:q(3r){o 3r<1?\'\':1s 2a(3r+1).2C(C)},8f:q(){G 4w=C.4U(\'-\'),8g=4w.N;E(8g==1)o 4w[0];G 8h=C.7a(0)==\'-\'?4w[0].7a(0).2Q()+4w[0].5v(1):4w[0];15(G i=1;i<8g;i++)8h+=4w[i].7a(0).2Q()+4w[i].5v(1);o 8h},6b:q(){o C.7a(0).2Q()+C.5v(1).2c()},dn:q(){o C.3h(/::/,\'/\').3h(/([A-Z]+)([A-Z][a-z])/,\'#{1}6c#{2}\').3h(/([a-z\\d])([A-Z])/,\'#{1}6c#{2}\').3h(/-/,\'6c\').2c()},dp:q(){o C.3h(/6c/,\'-\')},2z:q(ao){G 8i=C.3h(/[\\dq-\\dr\\\\]/,q(1f){G 8j=26.ac[1f[0]];o 8j?8j:\'\\\\ds\'+1f[0].an().4t(2,16)});E(ao)o\'"\'+8i.1V(/"/g,\'\\\\"\')+\'"\';o"\'"+8i.1V(/\'/g,\'\\\\\\\'\')+"\'"},3m:q(){o C.2z(1q)},8k:q(2d){o C.ad(2d||1g.9X,\'#{1}\')},ap:q(){G 5r=C;E(5r.4W())o 1t;5r=C.1V(/\\\\./g,\'@\').1V(/"[^"\\\\\\n\\r]*"/g,\'\');o(/^[,:{}\\[\\]0-9.\\-+dt-u \\n\\r\\t]*$/).2N(5r)},5w:q(aq){G 3j=C.8k();2o{E(!aq||3j.ap())o 75(\'(\'+3j+\')\')}2B(e){}4n 1s du(\'dv dw ar 3f: \'+C.2z());},1L:q(24){o C.3Q(24)>-1},8l:q(24){o C.3Q(24)===0},at:q(24){G d=C.N-24.N;o d>=0&&C.8m(24)===d},5x:q(){o C==\'\'},4W:q(){o/^\\s*$/.2N(C)},dx:q(Y,24){o 1s 2V(C,24).2L(Y)}});E(1g.1U.4l||1g.1U.3P)M.19(26.1l,{76:q(){o C.1V(/&/g,\'&au;\').1V(/</g,\'&av;\').1V(/>/g,\'&gt;\')},al:q(){o C.1V(/&au;/g,\'&\').1V(/&av;/g,\'<\').1V(/&gt;/g,\'>\')}});26.1l.3h.8c=q(3p){E(M.2m(3p))o 3p;G 5y=1s 2V(3p);o q(1f){o 5y.2L(1f)}};26.1l.dy=26.1l.78;M.19(26.1l.76,{1R:1c.3S(\'1R\'),3W:1c.aw(\'\')});ax(26.1l.76)1R.5z(3W);G 2V=29.2l({2F:q(5y,24){C.5y=5y.2y();C.24=24||2V.ay},2L:q(Y){E(M.2m(Y.8n))Y=Y.8n();o C.5y.3h(C.24,q(1f){E(Y==1k)o\'\';G 4X=1f[1]||\'\';E(4X==\'\\\\\')o 1f[2];G 6d=Y,6e=1f[3];G 24=/^([^.[]+|\\[((?:.*?[^\\\\])?)\\])(\\.|\\[|$)/;1f=24.az(6e);E(1f==1k)o 4X;1O(1f!=1k){G aA=1f[1].8l(\'[\')?1f[2].3h(\'\\\\\\\\]\',\']\'):1f[1];6d=6d[aA];E(1k==6d||\'\'==1f[3])2b;6e=6e.5v(\'[\'==1f[3]?1f[1].N:1f[0].N);1f=24.az(6e)}o 4X+26.5q(6d)}.1G(C))}});2V.ay=/(^|.|\\r|\\n)(#\\{(.*?)\\})/;G $2b={};G 2G={1E:q(W,1M){G 1i=0;W=W.1G(1M);2o{C.4e(q(I){W(I,1i++)})}2B(e){E(e!=$2b)4n e;}o C},aB:q(4q,W,1M){W=W?W.1G(1M):1g.K;G 1i=-4q,8o=[],2D=C.3t();1O((1i+=4q)<2D.N)8o.1h(2D.3q(1i,1i+4q));o 8o.8p(W,1M)},8q:q(W,1M){W=W?W.1G(1M):1g.K;G 1r=1q;C.1E(q(I,1i){1r=1r&&!!W(I,1i);E(!1r)4n $2b;});o 1r},aC:q(W,1M){W=W?W.1G(1M):1g.K;G 1r=1t;C.1E(q(I,1i){E(1r=!!W(I,1i))4n $2b;});o 1r},8p:q(W,1M){W=W?W.1G(1M):1g.K;G V=[];C.1E(q(I,1i){V.1h(W(I,1i))});o V},7b:q(W,1M){W=W.1G(1M);G 1r;C.1E(q(I,1i){E(W(I,1i)){1r=I;4n $2b;}});o 1r},5A:q(W,1M){W=W.1G(1M);G V=[];C.1E(q(I,1i){E(W(I,1i))V.1h(I)});o V},dz:q(2d,W,1M){W=W?W.1G(1M):1g.K;G V=[];E(M.3e(2d))2d=1s 4b(2d);C.1E(q(I,1i){E(2d.1f(I))V.1h(W(I,1i))});o V},1L:q(Y){E(M.2m(C.3Q))E(C.3Q(Y)!=-1)o 1q;G 8r=1t;C.1E(q(I){E(I==Y){8r=1q;4n $2b;}});o 8r},dA:q(4q,6f){6f=M.2A(6f)?1k:6f;o C.aB(4q,q(3q){1O(3q.N<4q)3q.1h(6f);o 3q})},3F:q(2P,W,1M){W=W.1G(1M);C.1E(q(I,1i){2P=W(2P,I,1i)});o 2P},71:q(1D){G 20=$A(1p).3q(1);o C.2O(q(I){o I[1D].3D(I,20)})},dB:q(W,1M){W=W?W.1G(1M):1g.K;G 1r;C.1E(q(I,1i){I=W(I,1i);E(1r==1k||I>=1r)1r=I});o 1r},dC:q(W,1M){W=W?W.1G(1M):1g.K;G 1r;C.1E(q(I,1i){I=W(I,1i);E(1r==1k||I<1r)1r=I});o 1r},dD:q(W,1M){W=W?W.1G(1M):1g.K;G 8s=[],8t=[];C.1E(q(I,1i){(W(I,1i)?8s:8t).1h(I)});o[8s,8t]},5B:q(1x){G V=[];C.1E(q(I){V.1h(I[1x])});o V},dE:q(W,1M){W=W.1G(1M);G V=[];C.1E(q(I,1i){E(!W(I,1i))V.1h(I)});o V},aD:q(W,1M){W=W.1G(1M);o C.2O(q(I,1i){o{I:I,6g:W(I,1i)}}).dF(q(2r,5C){G a=2r.6g,b=5C.6g;o a<b?-1:a>b?1:0}).5B(\'I\')},3t:q(){o C.2O()},dG:q(){G W=1g.K,20=$A(1p);E(M.2m(20.2s()))W=20.dH();G aE=[C].21(20).2O($A);o C.2O(q(I,1i){o W(aE.5B(1i))})},aF:q(){o C.3t().N},2z:q(){o\'#<2G:\'+C.3t().2z()+\'>\'}};M.19(2G,{2O:2G.8p,8u:2G.7b,2H:2G.5A,2d:2G.5A,dI:2G.1L,dJ:2G.3t,dK:2G.8q,dL:2G.aC});q $A(2W){E(!2W)o[];E(2W.3t)o 2W.3t();G N=2W.N||0,V=1s 2a(N);1O(N--)V[N]=2W[N];o V}E(1g.1U.4l){q $A(2W){E(!2W)o[];E(!(M.2m(2W)&&2W==\'[Y dM]\')&&2W.3t)o 2W.3t();G N=2W.N||0,V=1s 2a(N);1O(N--)V[N]=2W[N];o V}}2a.aG=$A;M.19(2a.1l,2G);E(!2a.1l.8v)2a.1l.8v=2a.1l.4f;M.19(2a.1l,{4e:q(W){15(G i=0,N=C.N;i<N;i++)W(C[i])},aH:q(){C.N=0;o C},3E:q(){o C[0]},2s:q(){o C[C.N-1]},dN:q(){o C.2H(q(I){o I!=1k})},aI:q(){o C.3F([],q(2D,I){o 2D.21(M.4p(I)?I.aI():[I])})},6h:q(){G 1S=$A(1p);o C.2H(q(I){o!1S.1L(I)})},4f:q(aJ){o(aJ!==1t?C:C.3t()).8v()},dO:q(){o C.N>1?C:C[0]},aK:q(aL){o C.3F([],q(2D,I,1i){E(0==1i||(aL?2D.2s()!=I:!2D.1L(I)))2D.1h(I);o 2D})},dP:q(2D){o C.aK().5A(q(5D){o 2D.7b(q(I){o 5D===I})})},2q:q(){o[].21(C)},aF:q(){o C.N},2z:q(){o\'[\'+C.2O(M.2z).2C(\', \')+\']\'},3m:q(){G V=[];C.1E(q(Y){G I=M.3m(Y);E(!M.2A(I))V.1h(I)});o\'[\'+V.2C(\', \')+\']\'}});E(M.2m(2a.1l.aM))2a.1l.4e=2a.1l.aM;E(!2a.1l.3Q)2a.1l.3Q=q(5D,i){i||(i=0);G N=C.N;E(i<0)i=N+i;15(;i<N;i++)E(C[i]===5D)o i;o-1};E(!2a.1l.8m)2a.1l.8m=q(5D,i){i=dQ(i)?C.N:(i<0?C.N+i:i)+1;G n=C.3q(0,i).4f().3Q(5D);o(n<0)?n:i-n-1};2a.1l.3t=2a.1l.2q;q $w(3f){E(!M.3e(3f))o[];3f=3f.3U();o 3f?3f.4U(/\\s+/):[]}E(1g.1U.4M){2a.1l.21=q(){G 2D=[];15(G i=0,N=C.N;i<N;i++)2D.1h(C[i]);15(G i=0,N=1p.N;i<N;i++){E(M.4p(1p[i])){15(G j=0,aN=1p[i].N;j<aN;j++)2D.1h(1p[i][j])}1m{2D.1h(1p[i])}}o 2D}}M.19(4Y.1l,{dR:q(){o C.4t(2,16)},8e:q(){o C+1},79:q(W){$R(0,C,1q).1E(W);o C},4t:q(N,aO){G 3f=C.2y(aO||10);o\'0\'.79(N-3f.N)+3f},3m:q(){o dS(C)?C.2y():\'1k\'}});$w(\'dT dU dV dW\').1E(q(1D){4Y.1l[1D]=dX[1D].4r()});q $H(Y){o 1s 3T(Y)};G 3T=29.2l(2G,(q(){q 8w(1v,I){E(M.2A(I))o 1v;o 1v+\'=\'+aP(26.5q(I))}o{2F:q(Y){C.4x=M.86(Y)?Y.6i():M.2q(Y)},4e:q(W){15(G 1v 1Z C.4x){G I=C.4x[1v],1H=[1v,I];1H.1v=1v;1H.I=I;W(1H)}},6j:q(1v,I){o C.4x[1v]=I},8x:q(1v){o C.4x[1v]},dY:q(1v){G I=C.4x[1v];8y C.4x[1v];o I},6i:q(){o M.2q(C.4x)},44:q(){o C.5B(\'1v\')},1S:q(){o C.5B(\'I\')},1i:q(I){G 1f=C.7b(q(1H){o 1H.I===I});o 1f&&1f.1v},dZ:q(Y){o C.2q().4Z(Y)},4Z:q(Y){o 1s 3T(Y).3F(C,q(1r,1H){1r.6j(1H.1v,1H.I);o 1r})},4o:q(){o C.2O(q(1H){G 1v=aP(1H.1v),1S=1H.I;E(1S&&48 1S==\'Y\'){E(M.4p(1S))o 1S.2O(8w.72(1v)).2C(\'&\')}o 8w(1v,1S)}).2C(\'&\')},2z:q(){o\'#<3T:{\'+C.2O(q(1H){o 1H.2O(M.2z).2C(\': \')}).2C(\', \')+\'}>\'},3m:q(){o M.3m(C.6i())},2q:q(){o 1s 3T(C)}}})());3T.1l.8n=3T.1l.6i;3T.aG=$H;G aQ=29.2l(2G,{2F:q(4g,50,5E){C.4g=4g;C.50=50;C.5E=5E},4e:q(W){G I=C.4g;1O(C.1L(I)){W(I);I=I.8e()}},1L:q(I){E(I<C.4g)o 1t;E(C.5E)o I<C.50;o I<=C.50}});G $R=q(4g,50,5E){o 1s aQ(4g,50,5E)};G 1Q={aR:q(){o a5.a6(q(){o 1s aS()},q(){o 1s aT(\'e0.aU\')},q(){o 1s aT(\'e1.aU\')})||1t},8z:0};1Q.5F={6k:[],4e:q(W){C.6k.4e(W)},aV:q(4h){E(!C.1L(4h))C.6k.1h(4h)},e2:q(4h){C.6k=C.6k.6h(4h)},7c:q(2U,3k,1W,3j){C.1E(q(4h){E(M.2m(4h[2U])){2o{4h[2U].3D(4h,[3k,1W,3j])}2B(e){}}})}};M.19(1Q.5F,2G);1Q.5F.aV({7d:q(){1Q.8z++},3G:q(){1Q.8z--}});1Q.8A=29.2l({2F:q(U){C.U={1D:\'6l\',7e:1q,6m:\'7f/x-e3-1w-e4\',8B:\'e5-8\',3u:\'\',5w:1q,8C:1q};M.19(C.U,U||{});C.U.1D=C.U.1D.2c();E(M.3e(C.U.3u))C.U.3u=C.U.3u.78();1m E(M.86(C.U.3u))C.U.3u=C.U.3u.6i()}});1Q.51=29.2l(1Q.8A,{8D:1t,2F:q($47,2X,U){$47(U);C.1W=1Q.aR();C.3k(2X)},3k:q(2X){C.2X=2X;C.1D=C.U.1D;G 2Y=M.2q(C.U.3u);E(![\'8x\',\'6l\'].1L(C.1D)){2Y[\'e6\']=C.1D;C.1D=\'6l\'}C.3u=2Y;E(2Y=M.4o(2Y)){E(C.1D==\'8x\')C.2X+=(C.2X.1L(\'?\')?\'&\':\'?\')+2Y;1m E(/e7|9W|9U/.2N(4N.4O))2Y+=\'&6c=\'}2o{G 2t=1s 1Q.8E(C);E(C.U.7d)C.U.7d(2t);1Q.5F.7c(\'7d\',C,2t);C.1W.e8(C.1D.2Q(),C.2X,C.U.7e);E(C.U.7e)C.8F.1G(C).4s(1);C.1W.7g=C.8G.1G(C);C.aW();C.2u=C.1D==\'6l\'?(C.U.e9||2Y):1k;C.1W.ea(C.2u);E(!C.U.7e&&C.1W.aX)C.8G()}2B(e){C.52(e)}},8G:q(){G 2R=C.1W.2R;E(2R>1&&!((2R==4)&&C.8D))C.8F(C.1W.2R)},aW:q(){G 53={\'X-eb-ec\':\'aS\',\'X-1g-82\':1g.82,\'ed\':\'3W/ee, 3W/7h, 7f/6n, 3W/6n, */*\'};E(C.1D==\'6l\'){53[\'8H-1A\']=C.U.6m+(C.U.8B?\'; ef=\'+C.U.8B:\'\');E(C.1W.aX&&(4N.4O.1f(/6X\\/(\\d{4})/)||[0,aY])[1]<aY)53[\'eg\']=\'eh\'}E(48 C.U.aZ==\'Y\'){G 5G=C.U.aZ;E(M.2m(5G.1h))15(G i=0,N=5G.N;i<N;i+=2)53[5G[i]]=5G[i+1];1m $H(5G).1E(q(1H){53[1H.1v]=1H.I})}15(G 1e 1Z 53)C.1W.ei(1e,53[1e])},54:q(){G 4y=C.6o();o!4y||(4y>=ej&&4y<ek)},6o:q(){2o{o C.1W.4y||0}2B(e){o 0}},8F:q(2R){G 6p=1Q.51.b0[2R],2t=1s 1Q.8E(C);E(6p==\'8I\'){2o{C.8D=1q;(C.U[\'5H\'+2t.4y]||C.U[\'5H\'+(C.54()?\'el\':\'em\')]||1g.43)(2t,2t.7i)}2B(e){C.52(e)}G 6m=2t.5I(\'8H-1A\');E(C.U.8C==\'b1\'||(C.U.8C&&6m&&6m.1f(/^\\s*(3W|7f)\\/(x-)?(eo|ep)4Q(;.*)?\\s*$/i)))C.b2()}2o{(C.U[\'5H\'+6p]||1g.43)(2t,2t.7i);1Q.5F.7c(\'5H\'+6p,C,2t,2t.7i)}2B(e){C.52(e)}E(6p==\'8I\'){C.1W.7g=1g.43}},5I:q(1e){2o{o C.1W.8J(1e)||1k}2B(e){o 1k}},b2:q(){2o{o 75((C.1W.2Z||\'\').8k())}2B(e){C.52(e)}},52:q(8K){(C.U.b3||1g.43)(C,8K);1Q.5F.7c(\'b3\',C,8K)}});1Q.51.b0=[\'eq\',\'er\',\'es\',\'et\',\'8I\'];1Q.8E=29.2l({2F:q(3k){C.3k=3k;G 1W=C.1W=3k.1W,2R=C.2R=1W.2R;E((2R>2&&!1g.1U.3P)||2R==4){C.4y=C.6o();C.8L=C.b4();C.2Z=26.5q(1W.2Z);C.7i=C.b5()}E(2R==4){G 6n=1W.b6;C.b6=M.2A(6n)?1k:6n;C.eu=C.b7()}},4y:0,8L:\'\',6o:1Q.51.1l.6o,b4:q(){2o{o C.1W.8L||\'\'}2B(e){o\'\'}},5I:1Q.51.1l.5I,ev:q(){2o{o C.8M()}2B(e){o 1k}},8J:q(1e){o C.1W.8J(1e)},8M:q(){o C.1W.8M()},b5:q(){G 3j=C.5I(\'X-ar\');E(!3j)o 1k;3j=8d(a8(3j));2o{o 3j.5w(C.3k.U.b8)}2B(e){C.3k.52(e)}},b7:q(){G U=C.3k.U;E(!U.5w||(U.5w!=\'b1\'&&!(C.5I(\'8H-1A\')||\'\').1L(\'7f/3j\'))||C.2Z.4W())o 1k;2o{o C.2Z.5w(U.b8)}2B(e){C.3k.52(e)}}});1Q.b9=29.2l(1Q.51,{2F:q($47,3v,2X,U){C.3v={54:(3v.54||3v),8N:(3v.8N||(3v.54?1k:3v))};U=M.2q(U);G 3G=U.3G;U.3G=(q(2t,3j){C.ba(2t.2Z);E(M.2m(3G))3G(2t,3j)}).1G(C);$47(2X,U)},ba:q(2Z){G 5J=C.3v[C.54()?\'54\':\'8N\'],U=C.U;E(!U.4V)2Z=2Z.4d();E(5J=$(5J)){E(U.55){E(M.3e(U.55)){G 55={};55[U.55]=2Z;5J.3w(55)}1m U.55(5J,2Z)}1m 5J.4Z(2Z)}}});1Q.ew=29.2l(1Q.8A,{2F:q($47,3v,2X,U){$47(U);C.3G=C.U.3G;C.4c=(C.U.4c||2);C.56=(C.U.56||1);C.8O={};C.3v=3v;C.2X=2X;C.4g()},4g:q(){C.U.3G=C.bb.1G(C);C.6a()},8b:q(){C.8O.U.3G=4m;ex(C.3V);(C.3G||1g.43).3D(C,1p)},bb:q(2t){E(C.U.56){C.56=(2t.2Z==C.bc?C.56*C.U.56:1);C.bc=2t.2Z}C.3V=C.6a.1G(C).88(C.56*C.4c)},6a:q(){C.8O=1s 1Q.b9(C.3v,C.2X,C.U)}});q $(k){E(1p.N>1){15(G i=0,1X=[],N=1p.N;i<N;i++)1X.1h($(1p[i]));o 1X}E(M.3e(k))k=1c.ey(k);o J.19(k)}E(1g.3R.6Y){1c.8P=q(1u,7j){G V=[];G 8Q=1c.2L(1u,$(7j)||1c,1k,ez.eA,1k);15(G i=0,N=8Q.eB;i<N;i++)V.1h(J.19(8Q.eC(i)));o V}}E(!1z.6q)G 6q={};E(!6q.bd){M.19(6q,{bd:1,eD:2,be:3,eE:4,eF:5,eG:6,eH:7,eI:8,eJ:9,eK:10,eL:11,eM:12})}(q(){G k=C.J;C.J=q(1a,2h){2h=2h||{};1a=1a.2c();G 2S=J.2S;E(1g.1U.3P&&2h.1e){1a=\'<\'+1a+\' 1e="\'+2h.1e+\'">\';8y 2h.1e;o J.6r(1c.3S(1a),2h)}E(!2S[1a])2S[1a]=J.19(1c.3S(1a));o J.6r(2S[1a].eN(1t),2h)};M.19(C.J,k||{})}).8R(1z);J.2S={};J.1d={8S:q(k){o $(k).14.3x!=\'7k\'},bf:q(k){k=$(k);J[J.8S(k)?\'bg\':\'bh\'](k);o k},bg:q(k){$(k).14.3x=\'7k\';o k},bh:q(k){$(k).14.3x=\'\';o k},bi:q(k){k=$(k);k.1P.6s(k);o k},4Z:q(k,17){k=$(k);E(17&&17.3y)17=17.3y();E(M.49(17))o k.4Z().3w(17);17=M.4a(17);k.4u=17.4d();17.4V.1G(17).4s();o k},1V:q(k,17){k=$(k);E(17&&17.3y)17=17.3y();1m E(!M.49(17)){17=M.4a(17);G 8T=k.eO.eP();8T.eQ(k);17.4V.1G(17).4s();17=8T.eR(17.4d())}k.1P.8U(17,k);o k},3w:q(k,3H){k=$(k);E(M.3e(3H)||M.4T(3H)||M.49(3H)||(3H&&(3H.3y||3H.4a)))3H={57:3H};G 17,3w,1a,3i;15(1B 1Z 3H){17=3H[1B];1B=1B.2c();3w=J.5K[1B];E(17&&17.3y)17=17.3y();E(M.49(17)){3w(k,17);3I}17=M.4a(17);1a=((1B==\'4X\'||1B==\'7l\')?k.1P:k).1a.2Q();3i=J.7m(1a,17.4d());E(1B==\'2i\'||1B==\'7l\')3i.4f();3i.1E(3w.72(k));17.4V.1G(17).4s()}o k},5n:q(k,1K,2h){k=$(k);E(M.49(1K))$(1K).6r(2h||{});1m E(M.3e(1K))1K=1s J(1K,2h);1m 1K=1s J(\'1R\',1K);E(k.1P)k.1P.8U(1K,k);1K.5z(k);o 1K},2z:q(k){k=$(k);G 1r=\'<\'+k.1a.2c();$H({\'1o\':\'1o\',\'1j\':\'6t\'}).1E(q(1H){G 1x=1H.3E(),1T=1H.2s();G I=(k[1x]||\'\').2y();E(I)1r+=\' \'+1T+\'=\'+I.2z(1q)});o 1r+\'>\'},7n:q(k,1x){k=$(k);G 1X=[];1O(k=k[1x])E(k.3n==1)1X.1h(J.19(k));o 1X},5L:q(k){o $(k).7n(\'1P\')},bj:q(k){o $(k).bk("*")},bl:q(k){k=$(k).5M;1O(k&&k.3n!=1)k=k.3J;o $(k)},bm:q(k){E(!(k=$(k).5M))o[];1O(k&&k.3n!=1)k=k.3J;E(k)o[k].21($(k).4z());o[]},5N:q(k){o $(k).7n(\'bn\')},4z:q(k){o $(k).7n(\'3J\')},eS:q(k){k=$(k);o k.5N().4f().21(k.4z())},1f:q(k,3X){E(M.3e(3X))3X=1s 18(3X);o 3X.1f($(k))},eT:q(k,1u,1i){k=$(k);E(1p.N==1)o $(k.1P);G 5L=k.5L();o M.4T(1u)?5L[1u]:18.5O(5L,1u,1i)},eU:q(k,1u,1i){k=$(k);E(1p.N==1)o k.bl();o M.4T(1u)?k.bj()[1u]:k.2H(1u)[1i||0]},eV:q(k,1u,1i){k=$(k);E(1p.N==1)o $(18.25.6u(k));G 5N=k.5N();o M.4T(1u)?5N[1u]:18.5O(5N,1u,1i)},6v:q(k,1u,1i){k=$(k);E(1p.N==1)o $(18.25.6w(k));G 4z=k.4z();o M.4T(1u)?4z[1u]:18.5O(4z,1u,1i)},2H:q(){G 20=$A(1p),k=$(20.4R());o 18.7o(k,20)},58:q(){G 20=$A(1p),k=$(20.4R());o 18.7o(k.1P,20).6h(k)},bo:q(k){k=$(k);G 1o=k.59(\'1o\'),5u=1p.5s;E(1o)o 1o;do{1o=\'eW\'+5u.bp++}1O($(1o));k.6r(\'1o\',1o);o 1o},59:q(k,1e){k=$(k);E(1g.1U.3P){G t=J.3K.7p;E(t.1S[1e])o t.1S[1e](k,1e);E(t.3o[1e])1e=t.3o[1e];E(1e.1L(\':\')){o(!k.2h||!k.2h[1e])?1k:k.2h[1e].I}}o k.8V(1e)},6r:q(k,1e,I){k=$(k);G 2h={},t=J.3K.6x;E(48 1e==\'Y\')2h=1e;1m 2h[1e]=M.2A(I)?1q:I;15(G 28 1Z 2h){1e=t.3o[28]||28;I=2h[28];E(t.1S[28])1e=t.1S[28](k,I);E(I===1t||I===1k)k.bq(1e);1m E(I===1q)k.br(1e,1e);1m k.br(1e,I)}o k},bs:q(k){o $(k).5P().31},bt:q(k){o $(k).5P().2e},6y:q(k){o 1s J.7q(k)},7r:q(k,1j){E(!(k=$(k)))o;G 7s=k.1j;o(7s.N>0&&(7s==1j||1s 4b("(^|\\\\s)"+1j+"(\\\\s|$)").2N(7s)))},bu:q(k,1j){E(!(k=$(k)))o;E(!k.7r(1j))k.1j+=(k.1j?\' \':\'\')+1j;o k},bv:q(k,1j){E(!(k=$(k)))o;k.1j=k.1j.1V(1s 4b("(^|\\\\s+)"+1j+"(\\\\s+|$)"),\' \').3U();o k},eX:q(k,1j){E(!(k=$(k)))o;o k[k.7r(1j)?\'bv\':\'bu\'](1j)},eY:q(k){k=$(k);G L=k.5M;1O(L){G bw=L.3J;E(L.3n==3&&!/\\S/.2N(L.4v))k.6s(L);L=bw}o k},5x:q(k){o $(k).4u.4W()},7t:q(k,2T){k=$(k),2T=$(2T);G bx=2T;E(k.by)o(k.by(2T)&8)===8;E(k.7u&&!1g.1U.4M){G e=k.7u,a=2T.7u,6z=2T.3J;E(!6z){do{2T=2T.1P}1O(!(6z=2T.3J)&&2T.1P)}E(6z)o(e>a&&e<6z.7u)}1O(k=k.1P)E(k==bx)o 1q;o 1t},bz:q(k){k=$(k);G 5Q=k.5a();1z.bz(5Q[0],5Q[1]);o k},2j:q(k,14){k=$(k);14=14==\'8W\'?\'7v\':14.8f();G I=k.14[14];E(!I){G 8X=1c.eZ.f0(k,1k);I=8X?8X[14]:1k}E(14==\'3L\')o I?5R(I):1.0;o I==\'7w\'?1k:I},f1:q(k){o $(k).2j(\'3L\')},8Y:q(k,4A){k=$(k);G 8Z=k.14,1f;E(M.3e(4A)){k.14.90+=\';\'+4A;o 4A.1L(\'3L\')?k.5S(4A.1f(/3L:\\s*(\\d?\\.?\\d*)/)[1]):k}15(G 1x 1Z 4A)E(1x==\'3L\')k.5S(4A[1x]);1m 8Z[(1x==\'8W\'||1x==\'7v\')?(M.2A(8Z.91)?\'7v\':\'91\'):1x]=4A[1x];o k},5S:q(k,I){k=$(k);k.14.3L=(I==1||I===\'\')?\'\':(I<0.7x)?0:I;o k},5P:q(k){k=$(k);G 3x=$(k).2j(\'3x\');E(3x!=\'7k\'&&3x!=1k)o{2e:k.5T,31:k.5U};G 3Y=k.14;G bA=3Y.92;G bB=3Y.1B;G bC=3Y.3x;3Y.92=\'7y\';3Y.1B=\'5b\';3Y.3x=\'f2\';G bD=k.bE;G bF=k.bG;3Y.3x=bC;3Y.1B=bB;3Y.92=bA;o{2e:bD,31:bF}},f3:q(k){k=$(k);G 5Q=J.2j(k,\'1B\');E(5Q==\'7z\'||!5Q){k.93=1q;k.14.1B=\'6A\';E(1z.83){k.14.2i=0;k.14.2r=0}}o k},f4:q(k){k=$(k);E(k.93){k.93=4m;k.14.1B=k.14.2i=k.14.2r=k.14.57=k.14.5C=\'\'}o k},f5:q(k){k=$(k);E(k.5c)o k;k.5c=J.2j(k,\'94\')||\'7w\';E(k.5c!==\'7y\')k.14.94=\'7y\';o k},f6:q(k){k=$(k);E(!k.5c)o k;k.14.94=k.5c==\'7w\'?\'\':k.5c;k.5c=1k;o k},5a:q(k){G 2I=0,2J=0;do{2I+=k.5d||0;2J+=k.5e||0;k=k.4i}1O(k);o J.5f(2J,2I)},6B:q(k){G 2I=0,2J=0;do{2I+=k.5d||0;2J+=k.5e||0;k=k.4i;E(k){E(k.1a==\'bH\')2b;G p=J.2j(k,\'1B\');E(p==\'6A\'||p==\'5b\')2b}}1O(k);o J.5f(2J,2I)},95:q(k){k=$(k);E(k.2j(\'1B\')==\'5b\')o;G 96=k.6B();G 2i=96[1];G 2r=96[0];G 2e=k.bE;G 31=k.bG;k.bI=2r-5R(k.14.2r||0);k.bJ=2i-5R(k.14.2i||0);k.bK=k.14.2e;k.bL=k.14.31;k.14.1B=\'5b\';k.14.2i=2i+\'3l\';k.14.2r=2r+\'3l\';k.14.2e=2e+\'3l\';k.14.31=31+\'3l\';o k},97:q(k){k=$(k);E(k.2j(\'1B\')==\'6A\')o;k.14.1B=\'6A\';G 2i=5R(k.14.2i||0)-(k.bJ||0);G 2r=5R(k.14.2r||0)-(k.bI||0);k.14.2i=2i+\'3l\';k.14.2r=2r+\'3l\';k.14.31=k.bL;k.14.2e=k.bK;o k},98:q(k){G 2I=0,2J=0;do{2I+=k.4B||0;2J+=k.4C||0;k=k.1P}1O(k);o J.5f(2J,2I)},7A:q(k){E(k.4i)o $(k.4i);E(k==1c.2u)o $(k);1O((k=k.1P)&&k!=1c.2u)E(J.2j(k,\'1B\')!=\'7z\')o $(k);o $(1c.2u)},6C:q(99){G 2I=0,2J=0;G k=99;do{2I+=k.5d||0;2J+=k.5e||0;E(k.4i==1c.2u&&J.2j(k,\'1B\')==\'5b\')2b}1O(k=k.4i);k=99;do{E(!1g.1U.4M||k.1a==\'bH\'){2I-=k.4B||0;2J-=k.4C||0}}1O(k=k.1P);o J.5f(2J,2I)},bM:q(k,22){G U=M.19({bN:1q,bO:1q,bP:1q,bQ:1q,5d:0,5e:0},1p[2]||{});22=$(22);G p=22.6C();k=$(k);G 5V=[0,0];G 2M=1k;E(J.2j(k,\'1B\')==\'5b\'){2M=k.7A();5V=2M.6C()}E(2M==1c.2u){5V[0]-=1c.2u.5e;5V[1]-=1c.2u.5d}E(U.bN)k.14.2r=(p[0]-5V[0]+U.5e)+\'3l\';E(U.bO)k.14.2i=(p[1]-5V[1]+U.5d)+\'3l\';E(U.bP)k.14.2e=22.5T+\'3l\';E(U.bQ)k.14.31=22.5U+\'3l\';o k}};J.1d.bo.bp=1;M.19(J.1d,{bk:J.1d.2H,f7:J.1d.bm});J.3K={6x:{3o:{1j:\'6t\',bR:\'15\'},1S:{}}};E(1g.1U.4M){J.1d.2j=J.1d.2j.5n(q(3Z,k,14){5p(14){2p\'2r\':2p\'2i\':2p\'5C\':2p\'57\':E(3Z(k,\'1B\')===\'7z\')o 1k;2p\'31\':2p\'2e\':E(!J.8S(k))o 1k;G 7B=bS(3Z(k,14),10);E(7B!==k[\'32\'+14.6b()])o 7B+\'3l\';G 3d;E(14===\'31\'){3d=[\'7C-2i-2e\',\'7D-2i\',\'7D-57\',\'7C-57-2e\']}1m{3d=[\'7C-2r-2e\',\'7D-2r\',\'7D-5C\',\'7C-5C-2e\']}o 3d.3F(7B,q(2P,1x){G 9a=3Z(k,1x);o 9a===1k?2P:2P-bS(9a,10)})+\'3l\';6D:o 3Z(k,14)}});J.1d.59=J.1d.59.5n(q(3Z,k,1T){E(1T===\'7E\')o k.7E;o 3Z(k,1T)})}1m E(1g.1U.3P){$w(\'6B 7A 6C\').1E(q(1D){J.1d[1D]=J.1d[1D].5n(q(3Z,k){k=$(k);G 1B=k.2j(\'1B\');E(1B!=\'7z\')o 3Z(k);k.8Y({1B:\'6A\'});G I=3Z(k);k.8Y({1B:1B});o I})});J.1d.2j=q(k,14){k=$(k);14=(14==\'8W\'||14==\'7v\')?\'91\':14.8f();G I=k.14[14];E(!I&&k.5g)I=k.5g[14];E(14==\'3L\'){E(I=(k.2j(\'2d\')||\'\').1f(/9b\\(3L=(.*)\\)/))E(I[1])o 5R(I[1])/bT;o 1.0}E(I==\'7w\'){E((14==\'2e\'||14==\'31\')&&(k.2j(\'3x\')!=\'7k\'))o k[\'32\'+14.6b()]+\'3l\';o 1k}o I};J.1d.5S=q(k,I){q 9c(2d){o 2d.1V(/9b\\([^\\)]*\\)/gi,\'\')}k=$(k);G 5g=k.5g;E((5g&&!5g.f8)||(!5g&&k.14.bU==\'f9\'))k.14.bU=1;G 2d=k.2j(\'2d\'),14=k.14;E(I==1||I===\'\'){(2d=9c(2d))?14.2d=2d:14.bq(\'2d\');o k}1m E(I<0.7x)I=0;14.2d=9c(2d)+\'9b(3L=\'+(I*bT)+\')\';o k};J.3K={7p:{3o:{\'6t\':\'1j\',\'15\':\'bR\'},1S:{7F:q(k,1T){o k.8V(1T,2)},bV:q(k,1T){G L=k.bW(1T);o L?L.I:""},2k:q(k,1T){1T=k.8V(1T);o 1T?1T.2y().3q(23,-2):1k},6E:q(k,1T){o $(k).3M(1T)?1T:1k},14:q(k){o k.14.90.2c()},7E:q(k){o k.7E}}}};J.3K.6x={3o:M.2q(J.3K.7p.3o),1S:{3N:q(k,I){k.3N=!!I},14:q(k,I){k.14.90=I?I:\'\'}}};J.3K.9d={};$w(\'fa fb fc fd fe 7G \'+\'ff fg fh fi\').1E(q(28){J.3K.6x.3o[28.2c()]=28;J.3K.9d[28.2c()]=28});(q(v){M.19(v,{bX:v.7F,bY:v.7F,1A:v.7F,5W:v.bV,3z:v.6E,3N:v.6E,fj:v.6E,fk:v.6E,fl:v.2k,bZ:v.2k,fm:v.2k,fn:v.2k,fo:v.2k,fp:v.2k,fq:v.2k,fr:v.2k,fs:v.2k,ft:v.2k,fu:v.2k,fv:v.2k,fw:v.2k,fx:v.2k,fy:v.2k,fz:v.2k,fA:v.2k,fB:v.2k})})(J.3K.7p.1S)}1m E(1g.1U.6X&&/fC:1\\.8\\.0/.2N(4N.4O)){J.1d.5S=q(k,I){k=$(k);k.14.3L=(I==1)?0.fD:(I===\'\')?\'\':(I<0.7x)?0:I;o k}}1m E(1g.1U.4l){J.1d.5S=q(k,I){k=$(k);k.14.3L=(I==1||I===\'\')?\'\':(I<0.7x)?0:I;E(I==1)E(k.1a==\'c0\'&&k.2e){k.2e++;k.2e--}1m 2o{G n=1c.aw(\' \');k.5z(n);k.6s(n)}2B(e){}o k};J.1d.5a=q(k){G 2I=0,2J=0;do{2I+=k.5d||0;2J+=k.5e||0;E(k.4i==1c.2u)E(J.2j(k,\'1B\')==\'5b\')2b;k=k.4i}1O(k);o J.5f(2J,2I)}}E(1g.1U.3P||1g.1U.4M){J.1d.4Z=q(k,17){k=$(k);E(17&&17.3y)17=17.3y();E(M.49(17))o k.4Z().3w(17);17=M.4a(17);G 1a=k.1a.2Q();E(1a 1Z J.5K.4D){$A(k.3i).1E(q(L){k.6s(L)});J.7m(1a,17.4d()).1E(q(L){k.5z(L)})}1m k.4u=17.4d();17.4V.1G(17).4s();o k}}E(1c.3S(\'1R\').c1){J.1d.1V=q(k,17){k=$(k);E(17&&17.3y)17=17.3y();E(M.49(17)){k.1P.8U(17,k);o k}17=M.4a(17);G 2M=k.1P,1a=2M.1a.2Q();E(J.5K.4D[1a]){G 3J=k.6v();G 9e=J.7m(1a,17.4d());2M.6s(k);E(3J)9e.1E(q(L){2M.7H(L,3J)});1m 9e.1E(q(L){2M.5z(L)})}1m k.c1=17.4d();17.4V.1G(17).4s();o k}}J.5f=q(l,t){G 1r=[l,t];1r.2r=l;1r.2i=t;o 1r};J.7m=q(1a,7h){G 1R=1s J(\'1R\'),t=J.5K.4D[1a];E(t){1R.4u=t[0]+7h+t[1];t[2].79(q(){1R=1R.5M})}1m 1R.4u=7h;o $A(1R.3i)};J.5K={4X:q(k,L){k.1P.7H(L,k)},2i:q(k,L){k.7H(L,k.5M)},57:q(k,L){k.5z(L)},7l:q(k,L){k.1P.7H(L,k.3J)},4D:{fE:[\'<4E>\',\'</4E>\',1],7I:[\'<4E><5X>\',\'</5X></4E>\',2],c2:[\'<4E><5X><7J>\',\'</7J></5X></4E>\',3],9f:[\'<4E><5X><7J><c3>\',\'</c3></7J></5X></4E>\',4],c4:[\'<2H>\',\'</2H>\',1]}};(q(){M.19(C.4D,{c5:C.4D.7I,c6:C.4D.7I,c7:C.4D.9f})}).8R(J.5K);J.1d.7K={3M:q(k,1T){1T=J.3K.9d[1T]||1T;G L=$(k).bW(1T);o L&&L.fF}};J.1d.3A={};M.19(J,J.1d);E(!1g.3R.66&&1c.3S(\'1R\').4P){1z.67={};1z.67.1l=1c.3S(\'1R\').4P;1g.3R.66=1q}J.19=(q(){E(1g.3R.6Z)o 1g.K;G 1d={},3A=J.1d.3A;G 19=M.19(q(k){E(!k||k.7L||k.3n!=1||k==1z)o k;G 2E=M.2q(1d),1a=k.1a,1x,I;E(3A[1a])M.19(2E,3A[1a]);15(1x 1Z 2E){I=2E[1x];E(M.2m(I)&&!(1x 1Z k))k[1x]=I.4r()}k.7L=1g.43;o k},{7M:q(){E(!1g.3R.66){M.19(1d,J.1d);M.19(1d,J.1d.7K)}}});19.7M();o 19})();J.3M=q(k,1T){E(k.3M)o k.3M(1T);o J.1d.7K.3M(k,1T)};J.68=q(2E){G F=1g.3R,T=J.1d.3A;E(!2E){M.19(1C,1C.1d);M.19(1C.J,1C.J.1d);M.19(J.1d.3A,{"fG":M.2q(1C.1d),"fH":M.2q(1C.J.1d),"c4":M.2q(1C.J.1d),"c8":M.2q(1C.J.1d)})}E(1p.N==2){G 1a=2E;2E=1p[1]}E(!1a)M.19(J.1d,2E||{});1m{E(M.4p(1a))1a.1E(19);1m 19(1a)}q 19(1a){1a=1a.2Q();E(!J.1d.3A[1a])J.1d.3A[1a]={};M.19(J.1d.3A[1a],2E)}q 7N(2E,5o,7O){7O=7O||1t;15(G 1x 1Z 2E){G I=2E[1x];E(!M.2m(I))3I;E(!7O||!(1x 1Z 5o))5o[1x]=I.4r()}}q c9(1a){G 1N;G 9g={"fI":"fJ","c8":"fK","P":"fL","fM":"fN","fO":"fP","fQ":"fR","fS":"fT","fU":"fV","fW":"5Y","fX":"5Y","fY":"5Y","fZ":"5Y","g0":"5Y","g1":"5Y","Q":"g2","g3":"ca","g4":"ca","A":"g5","c0":"g6","g7":"g8","g9":"cb","ga":"cb","c5":"9h","c6":"9h","7I":"9h","c2":"gb","c7":"cc","9f":"cc","gc":"gd","ge":"gf"};E(9g[1a])1N=\'9i\'+9g[1a]+\'J\';E(1z[1N])o 1z[1N];1N=\'9i\'+1a+\'J\';E(1z[1N])o 1z[1N];1N=\'9i\'+1a.6b()+\'J\';E(1z[1N])o 1z[1N];1z[1N]={};1z[1N].1l=1c.3S(1a).4P;o 1z[1N]}E(F.66){7N(J.1d,67.1l);7N(J.1d.7K,67.1l,1q)}E(F.6Z){15(G 9j 1Z J.1d.3A){G 1N=c9(9j);E(M.2A(1N))3I;7N(T[9j],1N.1l)}}M.19(J,J.1d);8y J.3A;E(J.19.7M)J.19.7M();J.2S={}};1c.gg={5P:q(){G 9k={};G B=1g.1U;$w(\'2e 31\').1E(q(d){G D=d.6b();9k[d]=(B.4l&&!1c.2L)?5u[\'gh\'+D]:(B.4M)?1c.2u[\'cd\'+D]:1c.4F[\'cd\'+D]});o 9k},bt:q(){o C.5P().2e},bs:q(){o C.5P().31},gj:q(){o J.5f(1z.ce||1c.4F.4C||1c.2u.4C,1z.cf||1c.4F.4B||1c.2u.4B)}};G 18=29.2l({2F:q(1u){C.1u=1u.3U();C.cg()},ch:q(){E(!1g.3R.6Y)o 1t;G e=C.1u;E(1g.1U.4l&&(e.1L("-2v-1A")||e.1L(":5x")))o 1t;E((/(\\[[\\w-]*?:|:3N)/).2N(C.1u))o 1t;o 1q},cg:q(){E(C.ch())o C.ci();G e=C.1u,4j=18.6F,h=18.25,c=18.6g,3B,p,m;E(18.5h[e]){C.3O=18.5h[e];o}C.3O=["C.3O = q(1n) {","G r = 1n, h = 18.25, c = 1t, n;"];1O(e&&3B!=e&&(/\\S/).2N(e)){3B=e;15(G i 1Z 4j){p=4j[i];E(m=e.1f(p)){C.3O.1h(M.2m(c[i])?c[i](m):1s 2V(c[i]).2L(m));e=e.1V(m[0],\'\');2b}}}C.3O.1h("o h.9l(n);\\n}");75(C.3O.2C(\'\\n\'));18.5h[C.1u]=C.3O},ci:q(){G e=C.1u,4j=18.6F,x=18.2w,3B,m;E(18.5h[e]){C.2w=18.5h[e];o}C.3O=[\'.//*\'];1O(e&&3B!=e&&(/\\S/).2N(e)){3B=e;15(G i 1Z 4j){E(m=e.1f(4j[i])){C.3O.1h(M.2m(x[i])?x[i](m):1s 2V(x[i]).2L(m));e=e.1V(m[0],\'\');2b}}}C.2w=C.3O.2C(\'\');18.5h[C.1u]=C.2w},6G:q(1n){1n=1n||1c;E(C.2w)o 1c.8P(C.2w,1n);o C.3O(1n)},1f:q(k){C.9m=[];G e=C.1u,4j=18.6F,as=18.9n;G 3B,p,m;1O(e&&3B!==e&&(/\\S/).2N(e)){3B=e;15(G i 1Z 4j){p=4j[i];E(m=e.1f(p)){E(as[i]){C.9m.1h([i,M.2q(m)]);e=e.1V(m[0],\'\')}1m{o C.6G(1c).1L(k)}}}}G 1f=1q,1e,2x;15(G i=0,7P;7P=C.9m[i];i++){1e=7P[0],2x=7P[1];E(!18.9n[1e](k,2x)){1f=1t;2b}}o 1f},2y:q(){o C.1u},2z:q(){o"#<18:"+C.1u.2z()+">"}});M.19(18,{5h:{},2w:{4G:"//*",1I:"/*",58:"/6H-4H::*[1]",6I:\'/6H-4H::*\',1a:q(m){E(m[1]==\'*\')o\'\';o"[cj-1e()=\'"+m[1].2c()+"\' 9o cj-1e()=\'"+m[1].2Q()+"\']"},1j:"[6J(21(\' \', @6t, \' \'), \' #{1} \')]",1o:"[@1o=\'#{1}\']",5Z:q(m){m[1]=m[1].2c();o 1s 2V("[@#{1}]").2L(m)},28:q(m){m[1]=m[1].2c();m[3]=m[5]||m[6];o 1s 2V(18.2w.6K[m[2]]).2L(m)},6L:q(m){G h=18.2w.2f[m[1]];E(!h)o\'\';E(M.2m(h))o h(m);o 1s 2V(18.2w.2f[m[1]]).2L(m)},6K:{\'=\':"[@#{1}=\'#{3}\']",\'!=\':"[@#{1}!=\'#{3}\']",\'^=\':"[gk-ax(@#{1}, \'#{3}\')]",\'$=\':"[5v(@#{1}, (3f-N(@#{1}) - 3f-N(\'#{3}\') + 1))=\'#{3}\']",\'*=\':"[6J(@#{1}, \'#{3}\')]",\'~=\':"[6J(21(\' \', @#{1}, \' \'), \' #{3} \')]",\'|=\':"[6J(21(\'-\', @#{1}, \'-\'), \'-#{3}-\')]"},2f:{\'3E-1I\':\'[4I(9p-4H::*)]\',\'2s-1I\':\'[4I(6H-4H::*)]\',\'6M-1I\':\'[4I(9p-4H::* 9o 6H-4H::*)]\',\'5x\':"[3r(*) = 0 9q (3r(3W()) = 0 9o gl(3W(), \' \\t\\r\\n\', \'\') = \'\')]",\'3N\':"[@3N]",\'3z\':"[@3z]",\'ck\':"[4I(@3z)]",\'4I\':q(m){G e=m[6],p=18.6F,x=18.2w,3B,v;G 9r=[];1O(e&&3B!=e&&(/\\S/).2N(e)){3B=e;15(G i 1Z p){E(m=e.1f(p[i])){v=M.2m(x[i])?x[i](m):1s 2V(x[i]).2L(m);9r.1h("("+v.5v(1,v.N-1)+")");e=e.1V(m[0],\'\');2b}}}o"[4I("+9r.2C(" 9q ")+")]"},\'1Y-1I\':q(m){o 18.2w.2f.1Y("(3r(./9p-4H::*) + 1) ",m)},\'1Y-2s-1I\':q(m){o 18.2w.2f.1Y("(3r(./6H-4H::*) + 1) ",m)},\'1Y-2v-1A\':q(m){o 18.2w.2f.1Y("1B() ",m)},\'1Y-2s-2v-1A\':q(m){o 18.2w.2f.1Y("(2s() + 1 - 1B()) ",m)},\'3E-2v-1A\':q(m){m[6]="1";o 18.2w.2f[\'1Y-2v-1A\'](m)},\'2s-2v-1A\':q(m){m[6]="1";o 18.2w.2f[\'1Y-2s-2v-1A\'](m)},\'6M-2v-1A\':q(m){G p=18.2w.2f;o p[\'3E-2v-1A\'](m)+p[\'2s-2v-1A\'](m)},1Y:q(60,m){G 41,1J=m[6],9s;E(1J==\'cl\')1J=\'2n+0\';E(1J==\'cm\')1J=\'2n+1\';E(41=1J.1f(/^(\\d+)$/))o\'[\'+60+"= "+41[1]+\']\';E(41=1J.1f(/^(-?\\d*)?n(([+-])(\\d+))?/)){E(41[1]=="-")41[1]=-1;G a=41[1]?4Y(41[1]):1;G b=41[2]?4Y(41[2]):0;9s="[((#{60} - #{b}) gm #{a} = 0) 9q "+"((#{60} - #{b}) 1R #{a} >= 0)]";o 1s 2V(9s).2L({60:60,a:a,b:b})}}}},6g:{1a:\'n = h.1a(n, r, "#{1}", c);   c = 1t;\',1j:\'n = h.1j(n, r, "#{1}", c); c = 1t;\',1o:\'n = h.1o(n, r, "#{1}", c);        c = 1t;\',5Z:\'n = h.5Z(n, r, "#{1}"); c = 1t;\',28:q(m){m[3]=(m[5]||m[6]);o 1s 2V(\'n = h.28(n, r, "#{1}", "#{3}", "#{2}"); c = 1t;\').2L(m)},6L:q(m){E(m[6])m[6]=m[6].1V(/"/g,\'\\\\"\');o 1s 2V(\'n = h.6L(n, "#{1}", "#{6}", r, c); c = 1t;\').2L(m)},4G:\'c = "4G";\',1I:\'c = "1I";\',58:\'c = "58";\',6I:\'c = "6I";\'},6F:{6I:/^\\s*~\\s*/,1I:/^\\s*>\\s*/,58:/^\\s*\\+\\s*/,4G:/^\\s/,1a:/^\\s*(\\*|[\\w\\-]+)(\\b|$)?/,1o:/^#([\\w\\-\\*]+)(\\b|$)/,1j:/^\\.([\\w\\-\\*]+)(\\b|$)/,6L:/^:((3E|2s|1Y|1Y-2s|6M)(-1I|-2v-1A)|5x|3N|(en|gn)go|4I)(\\((.*?)\\))?(\\b|$|(?=\\s|[:+~>]))/,5Z:/^\\[([\\w]+)\\]/,28:/\\[((?:[\\w-]*:)?[\\w-]+)\\s*(?:([!^$*~|]?=)\\s*(([\'"])([^\\4]*?)\\4|([^\'"][^\\]]*?)))?\\]/},9n:{1a:q(k,2x){o 2x[1].2Q()==k.1a.2Q()},1j:q(k,2x){o J.7r(k,2x[1])},1o:q(k,2x){o k.1o===2x[1]},5Z:q(k,2x){o J.3M(k,2x[1])},28:q(k,2x){G 4v=J.59(k,2x[1]);o 18.6K[2x[2]](4v,2x[3])}},25:{21:q(a,b){15(G i=0,L;L=b[i];i++)a.1h(L);o a},7Q:q(O){15(G i=0,L;L=O[i];i++)L.42=1q;o O},61:q(O){15(G i=0,L;L=O[i];i++)L.42=4m;o O},1i:q(1P,4f,6N){1P.42=1q;E(4f){15(G O=1P.3i,i=O.N-1,j=1;i>=0;i--){G L=O[i];E(L.3n==1&&(!6N||L.42))L.7R=j++}}1m{15(G i=0,j=1,O=1P.3i;L=O[i];i++)E(L.3n==1&&(!6N||L.42))L.7R=j++}},9l:q(O){E(O.N==0)o O;G V=[],n;15(G i=0,l=O.N;i<l;i++)E(!(n=O[i]).42){n.42=1q;V.1h(J.19(n))}o 18.25.61(V)},4G:q(O){G h=18.25;15(G i=0,V=[],L;L=O[i];i++)h.21(V,L.4k(\'*\'));o V},1I:q(O){G h=18.25;15(G i=0,V=[],L;L=O[i];i++){15(G j=0,1I;1I=L.3i[j];j++)E(1I.3n==1&&1I.1a!=\'!\')V.1h(1I)}o V},58:q(O){15(G i=0,V=[],L;L=O[i];i++){G 6v=C.6w(L);E(6v)V.1h(6v)}o V},6I:q(O){G h=18.25;15(G i=0,V=[],L;L=O[i];i++)h.21(V,J.4z(L));o V},6w:q(L){1O(L=L.3J)E(L.3n==1)o L;o 1k},6u:q(L){1O(L=L.bn)E(L.3n==1)o L;o 1k},1a:q(O,1n,1a,2K){G co=1a.2Q();G V=[],h=18.25;E(O){E(2K){E(2K=="4G"){15(G i=0,L;L=O[i];i++)h.21(V,L.4k(1a));o V}1m O=C[2K](O);E(1a=="*")o O}15(G i=0,L;L=O[i];i++)E(L.1a.2Q()===co)V.1h(L);o V}1m o 1n.4k(1a)},1o:q(O,1n,1o,2K){G 3a=$(1o),h=18.25;E(!3a)o[];E(!O&&1n==1c)o[3a];E(O){E(2K){E(2K==\'1I\'){15(G i=0,L;L=O[i];i++)E(3a.1P==L)o[3a]}1m E(2K==\'4G\'){15(G i=0,L;L=O[i];i++)E(J.7t(3a,L))o[3a]}1m E(2K==\'58\'){15(G i=0,L;L=O[i];i++)E(18.25.6u(3a)==L)o[3a]}1m O=h[2K](O)}15(G i=0,L;L=O[i];i++)E(L==3a)o[3a];o[]}o(3a&&J.7t(3a,1n))?[3a]:[]},1j:q(O,1n,1j,2K){E(O&&2K)O=C[2K](O);o 18.25.cp(O,1n,1j)},cp:q(O,1n,1j){E(!O)O=18.25.4G([1n]);G cq=\' \'+1j+\' \';15(G i=0,V=[],L,6O;L=O[i];i++){6O=L.1j;E(6O.N==0)3I;E(6O==1j||(\' \'+6O+\' \').1L(cq))V.1h(L)}o V},5Z:q(O,1n,28){E(!O)O=1n.4k("*");G V=[];15(G i=0,L;L=O[i];i++)E(J.3M(L,28))V.1h(L);o V},28:q(O,1n,28,I,cr){E(!O)O=1n.4k("*");G 2g=18.6K[cr],V=[];15(G i=0,L;L=O[i];i++){G 4v=J.59(L,28);E(4v===1k)3I;E(2g(4v,I))V.1h(L)}o V},6L:q(O,1e,I,1n,2K){E(O&&2K)O=C[2K](O);E(!O)O=1n.4k("*");o 18.2f[1e](O,I,1n)}},2f:{\'3E-1I\':q(O,I,1n){15(G i=0,V=[],L;L=O[i];i++){E(18.25.6u(L))3I;V.1h(L)}o V},\'2s-1I\':q(O,I,1n){15(G i=0,V=[],L;L=O[i];i++){E(18.25.6w(L))3I;V.1h(L)}o V},\'6M-1I\':q(O,I,1n){G h=18.25;15(G i=0,V=[],L;L=O[i];i++)E(!h.6u(L)&&!h.6w(L))V.1h(L);o V},\'1Y-1I\':q(O,1J,1n){o 18.2f.1Y(O,1J,1n)},\'1Y-2s-1I\':q(O,1J,1n){o 18.2f.1Y(O,1J,1n,1q)},\'1Y-2v-1A\':q(O,1J,1n){o 18.2f.1Y(O,1J,1n,1t,1q)},\'1Y-2s-2v-1A\':q(O,1J,1n){o 18.2f.1Y(O,1J,1n,1q,1q)},\'3E-2v-1A\':q(O,1J,1n){o 18.2f.1Y(O,"1",1n,1t,1q)},\'2s-2v-1A\':q(O,1J,1n){o 18.2f.1Y(O,"1",1n,1q,1q)},\'6M-2v-1A\':q(O,1J,1n){G p=18.2f;o p[\'2s-2v-1A\'](p[\'3E-2v-1A\'](O,1J,1n),1J,1n)},cs:q(a,b,ct){E(a==0)o b>0?[b]:[];o $R(1,ct).3F([],q(2P,i){E(0==(i-b)%a&&(i-b)/a>=0)2P.1h(i);o 2P})},1Y:q(O,1J,1n,4f,6N){E(O.N==0)o[];E(1J==\'cl\')1J=\'2n+0\';E(1J==\'cm\')1J=\'2n+1\';G h=18.25,V=[],9t=[],m;h.7Q(O);15(G i=0,L;L=O[i];i++){E(!L.1P.42){h.1i(L.1P,4f,6N);9t.1h(L.1P)}}E(1J.1f(/^\\d+$/)){1J=4Y(1J);15(G i=0,L;L=O[i];i++)E(L.7R==1J)V.1h(L)}1m E(m=1J.1f(/^(-?\\d*)?n(([+-])(\\d+))?/)){E(m[1]=="-")m[1]=-1;G a=m[1]?4Y(m[1]):1;G b=m[2]?4Y(m[2]):0;G 9u=18.2f.cs(a,b,O.N);15(G i=0,L,l=9u.N;L=O[i];i++){15(G j=0;j<l;j++)E(L.7R==9u[j])V.1h(L)}}h.61(O);h.61(9t);o V},\'5x\':q(O,I,1n){15(G i=0,V=[],L;L=O[i];i++){E(L.1a==\'!\'||(L.5M&&!L.4u.1f(/^\\s*$/)))3I;V.1h(L)}o V},\'4I\':q(O,3X,1n){G h=18.25,gp,m;G 9v=1s 18(3X).6G(1n);h.7Q(9v);15(G i=0,V=[],L;L=O[i];i++)E(!L.42)V.1h(L);h.61(9v);o V},\'ck\':q(O,I,1n){15(G i=0,V=[],L;L=O[i];i++)E(!L.3z)V.1h(L);o V},\'3z\':q(O,I,1n){15(G i=0,V=[],L;L=O[i];i++)E(L.3z)V.1h(L);o V},\'3N\':q(O,I,1n){15(G i=0,V=[],L;L=O[i];i++)E(L.3N)V.1h(L);o V}},6K:{\'=\':q(3b,v){o 3b==v},\'!=\':q(3b,v){o 3b!=v},\'^=\':q(3b,v){o 3b.8l(v)},\'$=\':q(3b,v){o 3b.at(v)},\'*=\':q(3b,v){o 3b.1L(v)},\'~=\':q(3b,v){o(\' \'+3b+\' \').1L(\' \'+v+\' \')},\'|=\':q(3b,v){o(\'-\'+3b.2Q()+\'-\').1L(\'-\'+v.2Q()+\'-\')}},cu:q(1X,1u){G 2x=1s 18(1u).6G(),h=18.25;h.7Q(2x);15(G i=0,V=[],k;k=1X[i];i++)E(k.42)V.1h(k);h.61(2x);o V},5O:q(1X,1u,1i){E(M.4T(1u)){1i=1u;1u=1t}o 18.cu(1X,1u||\'*\')[1i||0]},7o:q(k,62){G cv=62.2C(\',\');62=[];cv.ae(/(([\\w#:.~>+()\\s-]+|\\*|\\[.*?\\])+)\\s*(,|$)/,q(m){62.1h(m[1].3U())});G V=[],h=18.25;15(G i=0,l=62.N,3X;i<l;i++){3X=1s 18(62[i].3U());h.21(V,3X.6G(k))}o(l>1)?h.9l(V):V}});E(1g.1U.3P){18.25.21=q(a,b){15(G i=0,L;L=b[i];i++)E(L.1a!=="!")a.1h(L);o a}}q $$(){o 18.7o(1c,$A(1p))}G 1C={9w:q(1w){$(1w).9w();o 1w},cw:q(1X,U){E(48 U!=\'Y\')U={3s:!!U};1m E(M.2A(U.3s))U.3s=1q;G 1v,I,9x=1t,5i=U.5i;G 77=1X.3F({},q(1r,k){E(!k.3z&&k.1e){1v=k.1e;I=$(k).3c();E(I!=1k&&(k.1A!=\'5i\'||(!9x&&5i!==1t&&(!5i||1v==5i)&&(9x=1q)))){E(1v 1Z 1r){E(!M.4p(1r[1v]))1r[1v]=[1r[1v]];1r[1v].1h(I)}1m 1r[1v]=I}}o 1r});o U.3s?77:M.4o(77)}};1C.1d={6P:q(1w,U){o 1C.cw(1C.63(1w),U)},63:q(1w){o $A($(1w).4k(\'*\')).3F([],q(1X,1I){E(1C.J.64[1I.1a.2c()])1X.1h(J.19(1I));o 1X})},gq:q(1w,7S,1e){1w=$(1w);G 7T=1w.4k(\'4J\');E(!7S&&!1e)o $A(7T).2O(J.19);15(G i=0,9y=[],N=7T.N;i<N;i++){G 4J=7T[i];E((7S&&4J.1A!=7S)||(1e&&4J.1e!=1e))3I;9y.1h(J.19(4J))}o 9y},9z:q(1w){1w=$(1w);1C.63(1w).71(\'9z\');o 1w},9A:q(1w){1w=$(1w);1C.63(1w).71(\'9A\');o 1w},cx:q(1w){G 1X=$(1w).63().5A(q(k){o\'7y\'!=k.1A&&!k.3z});G 9B=1X.5A(q(k){o k.3M(\'7G\')&&k.7G>=0}).aD(q(k){o k.7G}).3E();o 9B?9B:1X.8u(q(k){o[\'4J\',\'2H\',\'9C\'].1L(k.1a.2c())})},gr:q(1w){1w=$(1w);1w.cx().cy();o 1w},3k:q(1w,U){1w=$(1w),U=M.2q(U||{});G 2Y=U.3u,5W=1w.59(\'5W\')||\'\';E(5W.4W())5W=1z.gs.bX;U.3u=1w.6P(1q);E(2Y){E(M.3e(2Y))2Y=2Y.78();M.19(U.3u,2Y)}E(1w.3M(\'1D\')&&!U.1D)U.1D=1w.1D;o 1s 1Q.51(5W,U)}};1C.J={9D:q(k){$(k).9D();o k},2H:q(k){$(k).2H();o k}};1C.J.1d={6P:q(k){k=$(k);E(!k.3z&&k.1e){G I=k.3c();E(I!=4m){G 1H={};1H[k.1e]=I;o M.4o(1H)}}o\'\'},3c:q(k){k=$(k);G 1D=k.1a.2c();o 1C.J.64[1D](k)},gu:q(k,I){k=$(k);G 1D=k.1a.2c();1C.J.64[1D](k,I);o k},aH:q(k){$(k).I=\'\';o k},gv:q(k){o $(k).I!=\'\'},cy:q(k){k=$(k);2o{k.9D();E(k.2H&&(k.1a.2c()!=\'4J\'||![\'9E\',\'9w\',\'5i\'].1L(k.1A)))k.2H()}2B(e){}o k},9z:q(k){k=$(k);k.gw();k.3z=1q;o k},9A:q(k){k=$(k);k.3z=1t;o k}};G gx=1C.J;G $F=1C.J.1d.3c;1C.J.64={4J:q(k,I){5p(k.1A.2c()){2p\'cz\':2p\'cA\':o 1C.J.64.cB(k,I);6D:o 1C.J.64.9C(k,I)}},cB:q(k,I){E(M.2A(I))o k.3N?k.I:1k;1m k.3N=!!I},9C:q(k,I){E(M.2A(I))o k.I;1m k.I=I},2H:q(k,1i){E(M.2A(1i))o C[k.1A==\'2H-gy\'?\'cC\':\'cD\'](k);1m{G 3C,I,cE=!M.4p(1i);15(G i=0,N=k.N;i<N;i++){3C=k.U[i];I=C.7U(3C);E(cE){E(I==1i){3C.9F=1q;o}}1m 3C.9F=1i.1L(I)}}},cC:q(k){G 1i=k.gz;o 1i>=0?C.7U(k.U[1i]):1k},cD:q(k){G 1S,N=k.N;E(!N)o 1k;15(G i=0,1S=[];i<N;i++){G 3C=k.U[i];E(3C.9F)1S.1h(C.7U(3C))}o 1S},7U:q(3C){o J.19(3C).3M(\'I\')?3C.I:3C.3W}};4S.9G=29.2l(a9,{2F:q($47,k,4c,2U){$47(2U,4c);C.k=$(k);C.4K=C.3c()},8a:q(){G I=C.3c();E(M.3e(C.4K)&&M.3e(I)?C.4K!=I:26(C.4K)!=26(I)){C.2U(C.k,I);C.4K=I}}});1C.J.cF=29.2l(4S.9G,{3c:q(){o 1C.J.3c(C.k)}});1C.cF=29.2l(4S.9G,{3c:q(){o 1C.6P(C.k)}});4S.6Q=29.2l({2F:q(k,2U){C.k=$(k);C.2U=2U;C.4K=C.3c();E(C.k.1a.2c()==\'1w\')C.cG();1m C.69(C.k)},9H:q(){G I=C.3c();E(C.4K!=I){C.2U(C.k,I);C.4K=I}},cG:q(){1C.63(C.k).1E(C.69,C)},69:q(k){E(k.1A){5p(k.1A.2c()){2p\'cz\':2p\'cA\':1F.4L(k,\'gA\',C.9H.1G(C));2b;6D:1F.4L(k,\'gB\',C.9H.1G(C));2b}}}});1C.J.6Q=29.2l(4S.6Q,{3c:q(){o 1C.J.3c(C.k)}});1C.6Q=29.2l(4S.6Q,{3c:q(){o 1C.6P(C.k)}});E(!1z.1F)G 1F={};M.19(1F,{gC:8,gD:9,gE:13,gF:27,gG:37,gH:38,gI:39,gJ:40,gK:46,gL:36,gM:35,gN:33,gO:34,gP:45,2S:{},9I:q(1b){G k;5p(1b.1A){2p\'gQ\':k=1b.gR;2b;2p\'gS\':k=1b.3y;2b;6D:o 1k}o J.19(k)}});1F.1d=(q(){G 5j;E(1g.1U.3P){G cH={0:1,1:4,2:2};5j=q(1b,5k){o 1b.9E==cH[5k]}}1m E(1g.1U.4l){5j=q(1b,5k){5p(5k){2p 0:o 1b.7V==1&&!1b.cI;2p 1:o 1b.7V==1&&1b.cI;6D:o 1t}}}1m{5j=q(1b,5k){o 1b.7V?(1b.7V===5k+1):(1b.9E===5k)}}o{gT:q(1b){o 5j(1b,0)},gU:q(1b){o 5j(1b,1)},gV:q(1b){o 5j(1b,2)},k:q(1b){G L=1F.19(1b).7W;o J.19(L.3n==6q.be?L.1P:L)},5O:q(1b,1u){G k=1F.k(1b);E(!1u)o k;G 1X=[k].21(k.5L());o 18.5O(1X,1u,0)},5l:q(1b){o{x:1b.cJ||(1b.gW+(1c.4F.4C||1c.2u.4C)),y:1b.cK||(1b.gX+(1c.4F.4B||1c.2u.4B))}},gY:q(1b){o 1F.5l(1b).x},gZ:q(1b){o 1F.5l(1b).y},8b:q(1b){1F.19(1b);1b.cL();1b.cM();1b.h0=1q}}})();1F.19=(q(){G 2E=M.44(1F.1d).3F({},q(m,1e){m[1e]=1F.1d[1e].4r();o m});E(1g.1U.3P){M.19(2E,{cM:q(){C.h1=1q},cL:q(){C.73=1t},2z:q(){o"[Y 1F]"}});o q(1b){E(!1b)o 1t;E(1b.7L)o 1b;1b.7L=1g.43;G 5l=1F.5l(1b);M.19(1b,{7W:1b.h2,9I:1F.9I(1b),cJ:5l.x,cK:5l.y});o M.19(1b,2E)}}1m{1F.1l=1F.1l||1c.6R("cN").4P;M.19(1F.1l,2E);o 1g.K}})();M.19(1F,(q(){G 2S=1F.2S;q 9J(k){E(k.9K)o k.9K;1p.5s.1o=1p.5s.1o||1;o k.9K=++1p.5s.1o}q 9L(1y){E(1y&&1y.1L(\':\'))o"cO";o 1y}q 7X(1o){o 2S[1o]=2S[1o]||{}}q 7Y(1o,1y){G c=7X(1o);o c[1y]=c[1y]||[]}q cP(k,1y,2g){G 1o=9J(k);G c=7Y(1o,1y);E(c.5B("2g").1L(2g))o 1t;G 1K=q(1b){E(!1F||!1F.19||(1b.1y&&1b.1y!=1y))o 1t;1F.19(1b);2g.8R(k,1b)};1K.2g=2g;c.1h(1K);o 1K}q 9M(1o,1y,2g){G c=7Y(1o,1y);o c.8u(q(1K){o 1K.2g==2g})}q cQ(1o,1y,2g){G c=7X(1o);E(!c[1y])o 1t;c[1y]=c[1y].6h(9M(1o,1y,2g))}q cR(){15(G 1o 1Z 2S)15(G 1y 1Z 2S[1o])2S[1o][1y]=1k}E(1z.6W){1z.6W("bZ",cR)}o{4L:q(k,1y,2g){k=$(k);G 1e=9L(1y);G 1K=cP(k,1y,2g);E(!1K)o k;E(k.7Z){k.7Z(1e,1K,1t)}1m{k.6W("5H"+1e,1K)}o k},5m:q(k,1y,2g){k=$(k);G 1o=9J(k),1e=9L(1y);E(!2g&&1y){7Y(1o,1y).1E(q(1K){k.5m(1y,1K.2g)});o k}1m E(!1y){M.44(7X(1o)).1E(q(1y){k.5m(1y)});o k}G 1K=9M(1o,1y,2g);E(!1K)o k;E(k.cS){k.cS(1e,1K,1t)}1m{k.h3("5H"+1e,1K)}cQ(1o,1y,2g);o k},65:q(k,1y,2P){k=$(k);E(k==1c&&1c.6R&&!k.cT)k=1c.4F;G 1b;E(1c.6R){1b=1c.6R("cN");1b.h4("cO",1q,1q)}1m{1b=1c.h5();1b.cU="h6"}1b.1y=1y;1b.2P=2P||{};E(1c.6R){k.cT(1b)}1m{k.h7(1b.cU,1b)}o 1F.19(1b)}}})());M.19(1F,1F.1d);J.68({65:1F.65,4L:1F.4L,5m:1F.5m});M.19(1c,{65:J.1d.65.4r(),4L:J.1d.4L.4r(),5m:J.1d.5m.4r(),6S:1t});(q(){G 3V;q 6T(){E(1c.6S)o;E(3V)1z.ab(3V);1c.65("h8:6S");1c.6S=1q}E(1c.7Z){E(1g.1U.4l){3V=1z.aa(q(){E(/6S|cV/.2N(1c.2R))6T()},0);1F.4L(1z,"h9",6T)}1m{1c.7Z("ha",6T,1t)}}1m{1c.6x("<4Q 1o=cW 4s bY=//:><\\/4Q>");$("cW").7g=q(){E(C.2R=="cV"){C.7g=1k;6T()}}}})();3T.4o=M.4o;G hb={3x:J.bf};J.1d.hc=J.1d.7t;G hd={he:q(k,17){o J.3w(k,{4X:17})},hf:q(k,17){o J.3w(k,{2i:17})},hg:q(k,17){o J.3w(k,{57:17})},hh:q(k,17){o J.3w(k,{7l:17})}};G $3I=1s hi(\'"4n $3I" hj hk, hl "o" hm\');G 9N={cX:1t,9O:q(){C.cY=1z.ce||1c.4F.4C||1c.2u.4C||0;C.cZ=1z.cf||1c.4F.4B||1c.2u.4B||0},hn:q(k,x,y){E(C.cX)o C.d0(k,x,y);C.6U=x;C.6V=y;C.32=J.5a(k);o(y>=C.32[1]&&y<C.32[1]+k.5U&&x>=C.32[0]&&x<C.32[0]+k.5T)},d0:q(k,x,y){G 9P=J.98(k);C.6U=x+9P[0]-C.cY;C.6V=y+9P[1]-C.cZ;C.32=J.5a(k);o(C.6V>=C.32[1]&&C.6V<C.32[1]+k.5U&&C.6U>=C.32[0]&&C.6U<C.32[0]+k.5T)},ho:q(80,k){E(!80)o 0;E(80==\'hp\')o((C.32[1]+k.5U)-C.6V)/k.5U;E(80==\'hq\')o((C.32[0]+k.5T)-C.6U)/k.5T},5a:J.1d.5a,6B:J.1d.6B,95:q(k){9N.9O();o J.95(k)},97:q(k){9N.9O();o J.97(k)},hr:J.1d.98,4i:J.1d.7A,hs:J.1d.6C,2q:q(22,7W,U){U=U||{};o J.bM(7W,22,U)}};E(!1c.81)1c.81=q(d1){q 9Q(1e){o 1e.4W()?1k:"[6J(21(\' \', @6t, \' \'), \' "+1e+" \')]"}d1.81=1g.3R.6Y?q(k,1j){1j=1j.2y().3U();G 9R=/\\s/.2N(1j)?$w(1j).2O(9Q).2C(\'\'):9Q(1j);o 9R?1c.8P(\'.//*\'+9R,k):[]}:q(k,1j){1j=1j.2y().3U();G 1X=[],6y=(/\\s/.2N(1j)?$w(1j):1k);E(!6y&&!1j)o 1X;G O=$(k).4k(\'*\');1j=\' \'+1j+\' \';15(G i=0,1I,cn;1I=O[i];i++){E(1I.1j&&(cn=\' \'+1I.1j+\' \')&&(cn.1L(1j)||(6y&&6y.8q(q(1e){o!1e.2y().4W()&&cn.1L(\' \'+1e+\' \')}))))1X.1h(J.19(1I))}o 1X};o q(1j,7j){o $(7j||1c.2u).81(1j)}}(J.1d);J.7q=29.2l();J.7q.1l={2F:q(k){C.k=$(k)},4e:q(W){C.k.1j.4U(/\\s+/).2H(q(1e){o 1e.N>0}).4e(W)},6j:q(1j){C.k.1j=1j},ht:q(9S){E(C.1L(9S))o;C.6j($A(C).21(9S).2C(\' \'))},bi:q(9T){E(!C.1L(9T))o;C.6j($A(C).6h(9T).2C(\' \'))},2y:q(){o $A(C).2C(\' \')}};M.19(J.7q.1l,2G);J.68();',62,1084,'||||||||||||||||||||element||||return||function||||||||||||this||if||var||value|Element||node|Object|length|nodes||||||options|results|iterator||object||||||style|for||content|Selector|extend|tagName|event|document|Methods|name|match|Prototype|push|index|className|null|prototype|else|root|id|arguments|true|result|new|false|expression|key|form|property|eventName|window|type|position|Form|method|each|Event|bind|pair|child|formula|wrapper|include|context|klass|while|parentNode|Ajax|div|values|attribute|Browser|replace|transport|elements|nth|in|args|concat|source||pattern|handlers|String||attr|Class|Array|break|toLowerCase|filter|width|pseudos|handler|attributes|top|getStyle|_getEv|create|isFunction||try|case|clone|left|last|response|body|of|xpath|matches|toString|inspect|isUndefined|catch|join|array|methods|initialize|Enumerable|select|valueT|valueL|combinator|evaluate|parent|test|map|memo|toUpperCase|readyState|cache|ancestor|callback|Template|iterable|url|params|responseText||height|offset||||||||targetNode|nv|getValue|properties|isString|string|__method|gsub|childNodes|json|request|px|toJSON|nodeType|names|replacement|slice|count|hash|toArray|parameters|container|insert|display|toElement|disabled|ByTag|le|opt|apply|first|inject|onComplete|insertions|continue|nextSibling|_attributeTranslations|opacity|hasAttribute|checked|matcher|IE|indexOf|BrowserFeatures|createElement|Hash|strip|timer|text|selector|els|proceed||mm|_counted|emptyFunction|keys|||super|typeof|isElement|toHTML|RegExp|frequency|stripScripts|_each|reverse|start|responder|offsetParent|ps|getElementsByTagName|WebKit|undefined|throw|toQueryString|isArray|number|methodize|defer|toPaddedString|innerHTML|nodeValue|parts|_object|status|nextSiblings|styles|scrollTop|scrollLeft|tags|table|documentElement|descendant|sibling|not|input|lastValue|observe|Opera|navigator|userAgent|__proto__|script|shift|Abstract|isNumber|split|evalScripts|blank|before|Number|update|end|Request|dispatchException|headers|success|insertion|decay|bottom|adjacent|readAttribute|cumulativeOffset|absolute|_overflow|offsetTop|offsetLeft|_returnOffset|currentStyle|_cache|submit|isButton|code|pointer|stopObserving|wrap|destination|switch|interpret|str|callee|truncation|self|substring|evalJSON|empty|template|appendChild|findAll|pluck|right|item|exclusive|Responders|extras|on|getHeader|receiver|_insertionTranslations|ancestors|firstChild|previousSiblings|findElement|getDimensions|pos|parseFloat|setOpacity|offsetWidth|offsetHeight|delta|action|tbody|Heading|attrPresence|fragment|unmark|expressions|getElements|Serializers|fire|ElementExtensions|HTMLElement|addMethods|registerCallback|onTimerEvent|capitalize|_|ctx|expr|fillWith|criteria|without|toObject|set|responders|post|contentType|xml|getStatus|state|Node|writeAttribute|removeChild|class|previousElementSibling|next|nextElementSibling|write|classNames|nextAncestor|relative|positionedOffset|viewportOffset|default|_flag|patterns|findElements|following|laterSibling|contains|operators|pseudo|only|ofType|nodeClassName|serialize|EventObserver|createEvent|loaded|fireContentLoadedEvent|xcomp|ycomp|attachEvent|Gecko|XPath|SpecificElementExtensions|ScriptFragment|invoke|curry|returnValue|currentlyExecuting|eval|escapeHTML|data|toQueryParams|times|charAt|detect|dispatch|onCreate|asynchronous|application|onreadystatechange|html|headerJSON|parentElement|none|after|_getContentFromAnonymousElement|recursivelyCollect|findChildElements|read|ClassNames|hasClassName|elementClassName|descendantOf|sourceIndex|cssFloat|auto|00001|hidden|static|getOffsetParent|dim|border|padding|title|_getAttr|tabIndex|insertBefore|TBODY|tr|Simulated|_extendedByPrototype|refresh|copy|onlyIfAbsent|token|mark|nodeIndex|typeName|inputs|optionValue|which|target|getCacheForID|getWrappersForEventName|addEventListener|mode|getElementsByClassName|Version|opera|superclass|subclass|isHash|Function|delay|_methodized|execute|stop|prepareReplacement|decodeURIComponent|succ|camelize|len|camelized|escapedString|character|unfilterJSON|startsWith|lastIndexOf|toTemplateReplacements|slices|collect|all|found|trues|falses|find|_reverse|toQueryPair|get|delete|activeRequestCount|Base|encoding|evalJS|_complete|Response|respondToReadyState|onStateChange|Content|Complete|getResponseHeader|exception|statusText|getAllResponseHeaders|failure|updater|_getElementsByXPath|query|call|visible|range|replaceChild|getAttribute|float|css|setStyle|elementStyle|cssText|styleFloat|visibility|_madePositioned|overflow|absolutize|offsets|relativize|cumulativeScrollOffset|forElement|val|alpha|stripAlpha|has|fragments|TD|trans|TableSection|HTML|tag|dimensions|unique|tokens|assertions|or|preceding|and|exclusion|predicate|indexed|indices|exclusions|reset|submitted|matchingInputs|disable|enable|firstByIndex|textarea|focus|button|selected|TimedObserver|onElementEvent|relatedTarget|getEventID|_eventID|getDOMEventName|findWrapper|Position|prepare|offsetcache|iter|cond|classNameToAdd|classNameToRemove|KHTML|MobileSafari|Safari|JSONFilter|subclasses|constructor|valueOf|argumentNames|instanceof|timeout|1000|Try|these|lambda|escape|PeriodicalExecuter|setInterval|clearInterval|specialChar|sub|scan|stripTags|img|extractScripts|matchAll|matchOne|scriptTag|unescapeHTML|separator|charCodeAt|useDoubleQuotes|isJSON|sanitize|JSON||endsWith|amp|lt|createTextNode|with|Pattern|exec|comp|eachSlice|any|sortBy|collections|size|from|clear|flatten|inline|uniq|sorted|forEach|arrayLength|radix|encodeURIComponent|ObjectRange|getTransport|XMLHttpRequest|ActiveXObject|XMLHTTP|register|setRequestHeaders|overrideMimeType|2005|requestHeaders|Events|force|evalResponse|onException|getStatusText|_getHeaderJSON|responseXML|_getResponseJSON|sanitizeJSON|Updater|updateContent|updateComplete|lastText|ELEMENT_NODE|TEXT_NODE|toggle|hide|show|remove|descendants|getElementsBySelector|firstDescendant|immediateDescendants|previousSibling|identify|counter|removeAttribute|setAttribute|getHeight|getWidth|addClassName|removeClassName|nextNode|originalAncestor|compareDocumentPosition|scrollTo|originalVisibility|originalPosition|originalDisplay|originalWidth|clientWidth|originalHeight|clientHeight|BODY|_originalLeft|_originalTop|_originalWidth|_originalHeight|clonePosition|setLeft|setTop|setWidth|setHeight|htmlFor|parseInt|100|zoom|_getAttrNode|getAttributeNode|href|src|onunload|IMG|outerHTML|TR|td|SELECT|THEAD|TFOOT|TH|TEXTAREA|findDOMClass|Mod|TableCol|TableCell|client|pageXOffset|pageYOffset|compileMatcher|shouldUseXPath|compileXPathMatcher|local|enabled|even|odd||uTagName|byClassName|needle|operator|getIndices|total|matchElements|exprs|serializeElements|findFirstElement|activate|checkbox|radio|inputSelector|selectOne|selectMany|single|Observer|registerFormCallbacks|buttonMap|metaKey|pageX|pageY|preventDefault|stopPropagation|HTMLEvents|dataavailable|createWrapper|destroyWrapper|destroyCache|removeEventListener|dispatchEvent|eventType|complete|__onDOMContentLoaded|includeScrollOffsets|deltaX|deltaY|withinIncludingScrolloffsets|instanceMethods|AppleWebKit|Apple|Mobile|secure|RangeError|unknown|boolean|bindAsEventListener|setTimeout|01|Date|getUTCFullYear|getUTCMonth|getUTCDate|getUTCHours|getUTCMinutes|getUTCSeconds|finally|truncate|im|fromCharCode|underscore||dasherize|x00|x1f|u00|Eaeflnr|SyntaxError|Badly|formed|interpolate|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|charset|Connection|close|setRequestHeader|200|300|Success|Failure||java|ecma|Uninitialized|Loading|Loaded|Interactive|responseJSON|getAllHeaders|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|childElements|hasLayout|normal|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|location||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|srcElement|detachEvent|initEvent|createEventObject|ondataavailable|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,{}))

var niftyOk=(document.getElementById&&document.createElement&&Array.prototype.push);var niftyCss=false;String.prototype.find=function(a){return (this.indexOf(a)>=0?true:false)};var oldonload=window.onload;if(typeof (NiftyLoad)!="function"){NiftyLoad=function(){}}if(typeof (oldonload)=="function"){window.onload=function(){oldonload();AddCss();NiftyLoad()}}else{window.onload=function(){AddCss();NiftyLoad()}}function AddCss(){niftyCss=true;var l=CreateEl("link");l.setAttribute("type","text/css");l.setAttribute("rel","stylesheet");l.setAttribute("href","http://www.clipad.net/ads/ch/music_dev/js/uncompr/NiftyCube3/niftyCorners.css");l.setAttribute("media","screen");document.getElementsByTagName("head")[0].appendChild(l)}function Nifty(a,b){if(niftyOk==false){return}if(niftyCss==false){AddCss()}var i,v=a.split(","),h=0;if(b==null){b=""}if(b.find("fixed-height")){h=getElementsBySelector(v[0])[0].offsetHeight}for(i=0;i<v.length;i++){Rounded(v[i],b)}if(b.find("height")){SameHeight(a,h)}}function Rounded(a,b){var i,c="",d="",v=new Array();if(b!=""){b=b.replace("left","tl bl");b=b.replace("right","tr br");b=b.replace("top","tr tl");b=b.replace("bottom","br bl");b=b.replace("transparent","alias");if(b.find("tl")){c="both";if(!b.find("tr")){c="left"}}else{if(b.find("tr")){c="right"}}if(b.find("bl")){d="both";if(!b.find("br")){d="left"}}else{if(b.find("br")){d="right"}}}if(c==""&&d==""&&!b.find("none")){c="both";d="both"}v=getElementsBySelector(a);for(i=0;i<v.length;i++){FixIE(v[i]);if(c!=""){AddTop(v[i],c,b)}if(d!=""){AddBottom(v[i],d,b)}}}function AddTop(a,b,c){var d=CreateEl("b"),e=4,f="",p,i,g="r",h,j;d.style.marginLeft="-"+getPadding(a,"Left")+"px";d.style.marginRight="-"+getPadding(a,"Right")+"px";if(c.find("alias")||(j=getBk(a))=="transparent"){j="transparent";h="transparent";f=getParentBk(a);g="t"}else{h=getParentBk(a);f=Mix(j,h)}d.style.background=h;d.className="niftycorners";p=getPadding(a,"Top");if(c.find("small")){d.style.marginBottom=(p-2)+"px";g+="s";e=2}else{if(c.find("big")){d.style.marginBottom=(p-10)+"px";g+="b";e=8}else{d.style.marginBottom=(p-5)+"px"}}for(i=1;i<=e;i++){d.appendChild(CreateStrip(i,b,j,f,g))}a.style.paddingTop="0";a.insertBefore(d,a.firstChild)}function AddBottom(a,b,c){var d=CreateEl("b"),e=4,f="",p,i,g="r",h,j;d.style.marginLeft="-"+getPadding(a,"Left")+"px";d.style.marginRight="-"+getPadding(a,"Right")+"px";if(c.find("alias")||(j=getBk(a))=="transparent"){j="transparent";h="transparent";f=getParentBk(a);g="t"}else{h=getParentBk(a);f=Mix(j,h)}d.style.background=h;d.className="niftycorners";p=getPadding(a,"Bottom");if(c.find("small")){d.style.marginTop=(p-2)+"px";g+="s";e=2}else{if(c.find("big")){d.style.marginTop=(p-10)+"px";g+="b";e=8}else{d.style.marginTop=(p-5)+"px"}}for(i=e;i>0;i--){d.appendChild(CreateStrip(i,b,j,f,g))}a.style.paddingBottom=0;a.appendChild(d)}function CreateStrip(a,b,c,d,e){var x=CreateEl("b");x.className=e+a;x.style.backgroundColor=c;x.style.borderColor=d;if(b=="left"){x.style.borderRightWidth="0";x.style.marginRight="0"}else{if(b=="right"){x.style.borderLeftWidth="0";x.style.marginLeft="0"}}return (x)}function CreateEl(x){return (document.createElement(x))}function FixIE(a){if(a.currentStyle!=null&&a.currentStyle.hasLayout!=null&&a.currentStyle.hasLayout==false){a.style.display="inline-block"}}function SameHeight(a,b){var i,v=a.split(","),t,j,c=[],d;for(i=0;i<v.length;i++){t=getElementsBySelector(v[i]);c=c.concat(t)}for(i=0;i<c.length;i++){if(c[i].offsetHeight>b){b=c[i].offsetHeight}c[i].style.height="auto"}for(i=0;i<c.length;i++){d=b-c[i].offsetHeight;if(d>0){t=CreateEl("b");t.className="niftyfill";t.style.height=d+"px";nc=c[i].lastChild;if(nc.className=="niftycorners"){c[i].insertBefore(t,nc)}else{c[i].appendChild(t)}}}}function getElementsBySelector(a){var i,j,b="",c="",d=a,e="",f,k,g,h,s=[],l=[],m;if(a.find("#")){if(a.find(" ")){s=a.split(" ");var n=s[0].split("#");if(n.length==1){return (l)}g=document.getElementById(n[1]);if(g){o=g.getElementsByTagName(s[1]);for(i=0;i<o.length;i++){l.push(o[i])}}return (l)}else{s=a.split("#");d=s[0];b=s[1];if(b!=""){g=document.getElementById(b);if(g){l.push(g)}return (l)}}}if(a.find(".")){s=a.split(".");d=s[0];c=s[1];if(c.find(" ")){s=c.split(" ");c=s[0];e=s[1]}}var o=document.getElementsByTagName(d);if(c==""){for(i=0;i<o.length;i++){l.push(o[i])}return (l)}for(i=0;i<o.length;i++){m=o[i].className.split(" ");for(j=0;j<m.length;j++){if(m[j]==c){if(e==""){l.push(o[i])}else{f=o[i].getElementsByTagName(e);for(k=0;k<f.length;k++){l.push(f[k])}}}}}return (l)}function getParentBk(x){var a=x.parentNode,c;while(a.tagName.toUpperCase()!="HTML"&&(c=getBk(a))=="transparent"){a=a.parentNode}if(c=="transparent"){c="#FFFFFF"}return (c)}function getBk(x){var c=getStyleProp(x,"backgroundColor");if(c==null||c=="transparent"||c.find("rgba(0, 0, 0, 0)")){return ("transparent")}if(c.find("rgb")){c=rgb2hex(c)}return (c)}function getPadding(x,a){var p=getStyleProp(x,"padding"+a);if(p==null||!p.find("px")){return (0)}return (parseInt(p))}function getStyleProp(x,a){if(x.currentStyle){return (x.currentStyle[a])}if(document.defaultView.getComputedStyle){return (document.defaultView.getComputedStyle(x,"")[a])}return (null)}function rgb2hex(a){var b="",v,h,i;var c=/([0-9]+)[, ]+([0-9]+)[, ]+([0-9]+)/;var h=c.exec(a);for(i=1;i<4;i++){v=parseInt(h[i]).toString(16);if(v.length==1){b+="0"+v}else{b+=v}}return ("#"+b)}function Mix(a,b){var i,c,d,x,y,r=new Array(3);if(a.length==4){c=1}else{c=2}if(b.length==4){d=1}else{d=2}for(i=0;i<3;i++){x=parseInt(a.substr(1+c*i,c),16);if(c==1){x=16*x+x}y=parseInt(b.substr(1+d*i,d),16);if(d==1){y=16*y+y}r[i]=Math.floor((x*50+y*50)/100);r[i]=r[i].toString(16);if(r[i].length==1){r[i]="0"+r[i]}}return ("#"+r[0]+r[1]+r[2])}


var isIE=(navigator.appVersion.indexOf("MSIE")!=-1)?true:false;var isWin=(navigator.appVersion.toLowerCase().indexOf("win")!=-1)?true:false;var isOpera=(navigator.userAgent.indexOf("Opera")!=-1)?true:false;function ControlVersion(){var a;var b;var e;try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.7");a=b.GetVariable("$version")}catch(e){}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.6");a="WIN 6,0,21,0";b.AllowScriptAccess="always";a=b.GetVariable("$version")}catch(e){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a=b.GetVariable("$version")}catch(e){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash.3");a="WIN 3,0,18,0"}catch(e){}}if(!a){try{b=new ActiveXObject("ShockwaveFlash.ShockwaveFlash");a="WIN 2,0,0,11"}catch(e){a=-1}}return a}function GetSwfVer(){var a=-1;if(navigator.plugins!=null&&navigator.plugins.length>0){if(navigator.plugins["Shockwave Flash 2.0"]||navigator.plugins["Shockwave Flash"]){var b=navigator.plugins["Shockwave Flash 2.0"]?" 2.0":"";var c=navigator.plugins["Shockwave Flash"+b].description;var d=c.split(" ");var e=d[2].split(".");var f=e[0];var g=e[1];if(d[3]!=""){tempArrayMinor=d[3].split("r")}else{tempArrayMinor=d[4].split("r")}var h=tempArrayMinor[1]>0?tempArrayMinor[1]:0;var a=f+"."+g+"."+h}}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.6")!=-1){a=4}else{if(navigator.userAgent.toLowerCase().indexOf("webtv/2.5")!=-1){a=3}else{if(navigator.userAgent.toLowerCase().indexOf("webtv")!=-1){a=2}else{if(isIE&&isWin&&!isOpera){a=ControlVersion()}}}}}return a}function DetectFlashVer(a,b,c){versionStr=GetSwfVer();if(versionStr==-1){return false}else{if(versionStr!=0){if(isIE&&isWin&&!isOpera){tempArray=versionStr.split(" ");tempString=tempArray[1];versionArray=tempString.split(",")}else{versionArray=versionStr.split(".")}var d=versionArray[0];var e=versionArray[1];var f=versionArray[2];if(d>parseFloat(a)){return true}else{if(d==parseFloat(a)){if(e>parseFloat(b)){return true}else{if(e==parseFloat(b)){if(f>=parseFloat(c)){return true}}}}}return false}}}function AC_AddExtension(a,b){if(a.indexOf("?")!=-1){return a.replace(/\?/,b+"?")}else{return a+b}}function AC_Generateobj(a,b,c){var d="";if(isIE&&isWin&&!isOpera){d+="<object ";for(var i in a){d+=i+'="'+a[i]+'" '}for(var i in b){d+='><param name="'+i+'" value="'+b[i]+'" /> '}d+="></object>"}else{d+="<embed ";for(var i in c){d+=i+'="'+c[i]+'" '}d+="> </embed>"}document.write(d)}function AC_FL_RunContent(){var a=AC_GetArgs(arguments,"","movie","clsid:d27cdb6e-ae6d-11cf-96b8-444553540000","application/x-shockwave-flash");AC_Generateobj(a.objAttrs,a.params,a.embedAttrs)}function AC_GetArgs(a,b,c,d,e){var f=new Object();f.embedAttrs=new Object();f.params=new Object();f.objAttrs=new Object();for(var i=0;i<a.length;i=i+2){var g=a[i].toLowerCase();switch(g){case "classid":break;case "pluginspage":f.embedAttrs[a[i]]=a[i+1];break;case "src":case "movie":a[i+1]=AC_AddExtension(a[i+1],b);f.embedAttrs["src"]=a[i+1];f.params[c]=a[i+1];break;case "onafterupdate":case "onbeforeupdate":case "onblur":case "oncellchange":case "onclick":case "ondblClick":case "ondrag":case "ondragend":case "ondragenter":case "ondragleave":case "ondragover":case "ondrop":case "onfinish":case "onfocus":case "onhelp":case "onmousedown":case "onmouseup":case "onmouseover":case "onmousemove":case "onmouseout":case "onkeypress":case "onkeydown":case "onkeyup":case "onload":case "onlosecapture":case "onpropertychange":case "onreadystatechange":case "onrowsdelete":case "onrowenter":case "onrowexit":case "onrowsinserted":case "onstart":case "onscroll":case "onbeforeeditfocus":case "onactivate":case "onbeforedeactivate":case "ondeactivate":case "type":case "codebase":case "id":f.objAttrs[a[i]]=a[i+1];break;case "width":case "height":case "align":case "vspace":case "hspace":case "class":case "title":case "accesskey":case "name":case "tabindex":f.embedAttrs[a[i]]=f.objAttrs[a[i]]=a[i+1];break;default:f.embedAttrs[a[i]]=f.params[a[i]]=a[i+1]}}f.objAttrs["classid"]=d;if(e){f.embedAttrs["type"]=e}return f}


TooltipManager={options:{cssClassName:"tooltip",delayOver:400,delayOut:150,shiftX:10,shiftY:10,className:"mac_os_x",width:260,height:null,draggable:true,minimizable:false,maximizable:false,showEffect:Element.appear,hideEffect:Element.fade},ajaxInfo:null,elements:null,showTimer:null,hideTimer:null,init:function(a,b,c){TooltipManager.options=Object.extend(TooltipManager.options,c||{});a=TooltipManager.options.cssClassName||"tooltip";TooltipManager.ajaxInfo=b;TooltipManager.elements=$$("."+a);TooltipManager.elements.each(function(d){d=$(d);var e=TooltipManager._getInfo(d);if(e.ajax){d.ajaxId=e.id;d.ajaxInfo=b}else{d.tooltipElement=$(e.id)}d.observe("mouseover",TooltipManager._mouseOver);d.observe("mouseout",TooltipManager._mouseOut)});Windows.addObserver(this)},addHTML:function(a,b){a=$(a);b=$(b);a.tooltipElement=b;a.observe("mouseover",TooltipManager._mouseOver);a.observe("mouseout",TooltipManager._mouseOut)},addAjax:function(a,b){a=$(a);a.ajaxInfo=b;a.observe("mouseover",TooltipManager._mouseOver);a.observe("mouseout",TooltipManager._mouseOut)},addURL:function(a,b,c,d){a=$(a);a.url=b;a.frameWidth=c;a.frameHeight=d;a.observe("mouseover",TooltipManager._mouseOver);a.observe("mouseout",TooltipManager._mouseOut)},close:function(){if(TooltipManager.tooltipWindow){TooltipManager.tooltipWindow.hide()}},preloadImages:function(a,b,c){if(!c){c=".gif"}$A(b).each(function(i){var d=new Image();d.src=a+"/"+i+c})},_showTooltip:function(a){if(this.element==a){return}while(a&&(!a.tooltipElement&&!a.ajaxInfo&&!a.url)){a=a.parentNode}this.element=a;TooltipManager.showTimer=null;if(TooltipManager.hideTimer){clearTimeout(TooltipManager.hideTimer)}var b=Position.cumulativeOffset(a);var c=a.getDimensions();if(!this.tooltipWindow){this.tooltipWindow=new Window("__tooltip__",TooltipManager.options)}this.tooltipWindow.hide();this.tooltipWindow.setLocation(b[1]+c.height+TooltipManager.options.shiftY,b[0]+TooltipManager.options.shiftX);Event.observe(this.tooltipWindow.element,"mouseover",function(d){TooltipManager._tooltipOver(d,a)});Event.observe(this.tooltipWindow.element,"mouseout",function(d){TooltipManager._tooltipOut(d,a)});this.tooltipWindow.height=TooltipManager.options.height;this.tooltipWindow.width=TooltipManager.options.width;if(a.ajaxInfo){var p=a.ajaxInfo.options.parameters;var d=p;if(a.ajaxId){if(p){p+="&id="+a.ajaxId}else{p="id="+a.ajaxId}}a.ajaxInfo.options.parameters=p||"";this.tooltipWindow.setHTMLContent("");this.tooltipWindow.setAjaxContent(a.ajaxInfo.url,a.ajaxInfo.options);a.ajaxInfo.options.parameters=d}else{if(a.url){this.tooltipWindow.setURL(a.url);this.tooltipWindow.setSize(a.frameWidth,a.frameHeight);this.tooltipWindow.height=a.frameHeight;this.tooltipWindow.width=a.frameWidth}else{this.tooltipWindow.setHTMLContent(a.tooltipElement.innerHTML)}}if(!a.ajaxInfo){this.tooltipWindow.show();this.tooltipWindow.toFront()}},_hideTooltip:function(a){if(this.tooltipWindow){this.tooltipWindow.hide();this.element=null}},_mouseOver:function(a){var b=Event.element(a);if(TooltipManager.showTimer){clearTimeout(TooltipManager.showTimer)}TooltipManager.showTimer=setTimeout(function(){TooltipManager._showTooltip(b)},TooltipManager.options.delayOver)},_mouseOut:function(a){var b=Event.element(a);if(TooltipManager.showTimer){clearTimeout(TooltipManager.showTimer);TooltipManager.showTimer=null;return}if(TooltipManager.tooltipWindow){TooltipManager.hideTimer=setTimeout(function(){TooltipManager._hideTooltip(b)},TooltipManager.options.delayOut)}},_tooltipOver:function(a,b){if(TooltipManager.hideTimer){clearTimeout(TooltipManager.hideTimer);TooltipManager.hideTimer=null}},_tooltipOut:function(a,b){if(TooltipManager.hideTimer==null){TooltipManager.hideTimer=setTimeout(function(){TooltipManager._hideTooltip(b)},TooltipManager.options.delayOut)}},_getInfo:function(a){var b=a.className.split(" ").detect(function(c){return c.indexOf("html_")==0});var c=true;if(b){c=false}else{b=a.className.split(" ").detect(function(d){return d.indexOf("ajax_")==0})}b=b.substr(b.indexOf("_")+1,b.length);return b?{ajax:c,id:b}:null},onBeforeShow:function(a,b){var c=parseFloat(b.getLocation().top);var d=b.element.getDimensions();if(c+d.height>TooltipManager._getScrollTop()+TooltipManager._getPageHeight()){var e=Position.cumulativeOffset(this.element);var c=e[1]-TooltipManager.options.shiftY-d.height;b.setLocation(c,e[0]+TooltipManager.options.shiftX)}},_getPageWidth:function(){return window.innerWidth||document.documentElement.clientWidth||0},_getPageHeight:function(){return window.innerHeight||document.documentElement.clientHeight||0},_getScrollTop:function(){return document.documentElement.scrollTop||window.pageYOffset||0},_getScrollLeft:function(){return document.documentElement.scrollLeft||window.pageXOffset||0}}

var isIE=navigator.userAgent.toLowerCase().indexOf("msie")>-1;var isMoz=document.implementation&&document.implementation.createDocument;var isSafari=((navigator.userAgent.toLowerCase().indexOf("safari")!=-1)&&(navigator.userAgent.toLowerCase().indexOf("mac")!=-1))?true:false;function curvyCorners(){if(typeof (arguments[0])!="object"){throw newCurvyError("First parameter of curvyCorners() must be an object.")}if(typeof (arguments[1])!="object"&&typeof (arguments[1])!="string"){throw newCurvyError("Second parameter of curvyCorners() must be an object or a class name.")}if(typeof (arguments[1])=="string"){var a=0;var b=getElementsByClass(arguments[1])}else{var a=1;var b=arguments}var c=new Array();if(arguments[0].validTags){var d=arguments[0].validTags}else{var d=["div"]}for(var i=a,j=b.length;i<j;i++){var e=b[i].tagName.toLowerCase();if(inArray(d,e)!==false){c[c.length]=new curvyObject(arguments[0],b[i])}}this.objects=c;this.applyCornersToAll=function(){for(var x=0,k=this.objects.length;x<k;x++){this.objects[x].applyCorners()}}}function curvyObject(){this.box=arguments[1];this.settings=arguments[0];this.topContainer=null;this.bottomContainer=null;this.masterCorners=new Array();this.contentDIV=null;var a=get_style(this.box,"height","height");var b=get_style(this.box,"width","width");var c=get_style(this.box,"borderTopWidth","border-top-width");var d=get_style(this.box,"borderTopColor","border-top-color");var e=get_style(this.box,"backgroundColor","background-color");var f=get_style(this.box,"backgroundImage","background-image");var g=get_style(this.box,"position","position");var h=get_style(this.box,"paddingTop","padding-top");this.boxHeight=parseInt(((a!=""&&a!="auto"&&a.indexOf("%")==-1)?a.substring(0,a.indexOf("px")):this.box.scrollHeight));this.boxWidth=parseInt(((b!=""&&b!="auto"&&b.indexOf("%")==-1)?b.substring(0,b.indexOf("px")):this.box.scrollWidth));this.borderWidth=parseInt(((c!=""&&c.indexOf("px")!==-1)?c.slice(0,c.indexOf("px")):0));this.boxColour=format_colour(e);this.boxPadding=parseInt(((h!=""&&h.indexOf("px")!==-1)?h.slice(0,h.indexOf("px")):0));this.borderColour=format_colour(d);this.borderString=this.borderWidth+"px solid "+this.borderColour;this.backgroundImage=((f!="none")?f:"");this.boxContent=this.box.innerHTML;if(g!="absolute"){this.box.style.position="relative"}this.box.style.padding="0px";if(isIE&&b=="auto"&&a=="auto"){this.box.style.width="100%"}if(this.settings.autoPad==true&&this.boxPadding>0){this.box.innerHTML=""}this.applyCorners=function(){for(var t=0;t<2;t++){switch(t){case 0:if(this.settings.tl||this.settings.tr){var i=document.createElement("DIV");i.style.width="100%";i.style.fontSize="1px";i.style.overflow="hidden";i.style.position="absolute";i.style.paddingLeft=this.borderWidth+"px";i.style.paddingRight=this.borderWidth+"px";var j=Math.max(this.settings.tl?this.settings.tl.radius:0,this.settings.tr?this.settings.tr.radius:0);i.style.height=j+"px";i.style.top=0-j+"px";i.style.left=0-this.borderWidth+"px";this.topContainer=this.box.appendChild(i)}break;case 1:if(this.settings.bl||this.settings.br){var i=document.createElement("DIV");i.style.width="100%";i.style.fontSize="1px";i.style.overflow="hidden";i.style.position="absolute";i.style.paddingLeft=this.borderWidth+"px";i.style.paddingRight=this.borderWidth+"px";var k=Math.max(this.settings.bl?this.settings.bl.radius:0,this.settings.br?this.settings.br.radius:0);i.style.height=k+"px";i.style.bottom=0-k+"px";i.style.left=0-this.borderWidth+"px";this.bottomContainer=this.box.appendChild(i)}break}}if(this.topContainer){this.box.style.borderTopWidth="0px"}if(this.bottomContainer){this.box.style.borderBottomWidth="0px"}var l=["tr","tl","br","bl"];for(var m in l){if(m>-1<4){var n=l[m];if(!this.settings[n]){if(((n=="tr"||n=="tl")&&this.topContainer!=null)||((n=="br"||n=="bl")&&this.bottomContainer!=null)){var o=document.createElement("DIV");o.style.position="relative";o.style.fontSize="1px";o.style.overflow="hidden";if(this.backgroundImage==""){o.style.backgroundColor=this.boxColour}else{o.style.backgroundImage=this.backgroundImage}switch(n){case "tl":o.style.height=j-this.borderWidth+"px";o.style.marginRight=this.settings.tr.radius-(this.borderWidth*2)+"px";o.style.borderLeft=this.borderString;o.style.borderTop=this.borderString;o.style.left=-this.borderWidth+"px";break;case "tr":o.style.height=j-this.borderWidth+"px";o.style.marginLeft=this.settings.tl.radius-(this.borderWidth*2)+"px";o.style.borderRight=this.borderString;o.style.borderTop=this.borderString;o.style.backgroundPosition="-"+(j+this.borderWidth)+"px 0px";o.style.left=this.borderWidth+"px";break;case "bl":o.style.height=k-this.borderWidth+"px";o.style.marginRight=this.settings.br.radius-(this.borderWidth*2)+"px";o.style.borderLeft=this.borderString;o.style.borderBottom=this.borderString;o.style.left=-this.borderWidth+"px";o.style.backgroundPosition="-"+(this.borderWidth)+"px -"+(this.boxHeight+(k+this.borderWidth))+"px";break;case "br":o.style.height=k-this.borderWidth+"px";o.style.marginLeft=this.settings.bl.radius-(this.borderWidth*2)+"px";o.style.borderRight=this.borderString;o.style.borderBottom=this.borderString;o.style.left=this.borderWidth+"px";o.style.backgroundPosition="-"+(k+this.borderWidth)+"px -"+(this.boxHeight+(k+this.borderWidth))+"px";break}}}else{if(this.masterCorners[this.settings[n].radius]){var o=this.masterCorners[this.settings[n].radius].cloneNode(true)}else{var o=document.createElement("DIV");o.style.height=this.settings[n].radius+"px";o.style.width=this.settings[n].radius+"px";o.style.position="absolute";o.style.fontSize="1px";o.style.overflow="hidden";var p=parseInt(this.settings[n].radius-this.borderWidth);for(var q=0,r=this.settings[n].radius;q<r;q++){if((q+1)>=p){var s=-1}else{var s=(Math.floor(Math.sqrt(Math.pow(p,2)-Math.pow((q+1),2)))-1)}if(p!=r){if((q)>=p){var u=-1}else{var u=Math.ceil(Math.sqrt(Math.pow(p,2)-Math.pow(q,2)))}if((q+1)>=r){var v=-1}else{var v=(Math.floor(Math.sqrt(Math.pow(r,2)-Math.pow((q+1),2)))-1)}}if((q)>=r){var w=-1}else{var w=Math.ceil(Math.sqrt(Math.pow(r,2)-Math.pow(q,2)))}if(s>-1){this.drawPixel(q,0,this.boxColour,100,(s+1),o,-1,this.settings[n].radius)}if(p!=r){for(var x=(s+1);x<u;x++){if(this.settings.antiAlias){if(this.backgroundImage!=""){var y=(pixelFraction(q,x,p)*100);if(y<30){this.drawPixel(q,x,this.borderColour,100,1,o,0,this.settings[n].radius)}else{this.drawPixel(q,x,this.borderColour,100,1,o,-1,this.settings[n].radius)}}else{var A=BlendColour(this.boxColour,this.borderColour,pixelFraction(q,x,p));this.drawPixel(q,x,A,100,1,o,0,this.settings[n].radius,n)}}}if(this.settings.antiAlias){if(v>=u){if(u==-1){u=0}this.drawPixel(q,u,this.borderColour,100,(v-u+1),o,0,0)}}else{if(v>=s){this.drawPixel(q,(s+1),this.borderColour,100,(v-s),o,0,0)}}var B=this.borderColour}else{var B=this.boxColour;var v=s}if(this.settings.antiAlias){for(var x=(v+1);x<w;x++){this.drawPixel(q,x,B,(pixelFraction(q,x,r)*100),1,o,((this.borderWidth>0)?0:-1),this.settings[n].radius)}}}this.masterCorners[this.settings[n].radius]=o.cloneNode(true)}if(n!="br"){for(var t=0,C=o.childNodes.length;t<C;t++){var D=o.childNodes[t];var E=parseInt(D.style.top.substring(0,D.style.top.indexOf("px")));var F=parseInt(D.style.left.substring(0,D.style.left.indexOf("px")));var G=parseInt(D.style.height.substring(0,D.style.height.indexOf("px")));if(n=="tl"||n=="bl"){D.style.left=this.settings[n].radius-F-1+"px"}if(n=="tr"||n=="tl"){D.style.top=this.settings[n].radius-G-E+"px"}switch(n){case "tr":D.style.backgroundPosition="-"+Math.abs((this.boxWidth-this.settings[n].radius+this.borderWidth)+F)+"px -"+Math.abs(this.settings[n].radius-G-E-this.borderWidth)+"px";break;case "tl":D.style.backgroundPosition="-"+Math.abs((this.settings[n].radius-F-1)-this.borderWidth)+"px -"+Math.abs(this.settings[n].radius-G-E-this.borderWidth)+"px";break;case "bl":D.style.backgroundPosition="-"+Math.abs((this.settings[n].radius-F-1)-this.borderWidth)+"px -"+Math.abs((this.boxHeight+this.settings[n].radius+E)-this.borderWidth)+"px";break}}}}if(o){switch(n){case "tl":if(o.style.position=="absolute"){o.style.top="0px"}if(o.style.position=="absolute"){o.style.left="0px"}if(this.topContainer){this.topContainer.appendChild(o)}break;case "tr":if(o.style.position=="absolute"){o.style.top="0px"}if(o.style.position=="absolute"){o.style.right="0px"}if(this.topContainer){this.topContainer.appendChild(o)}break;case "bl":if(o.style.position=="absolute"){o.style.bottom="0px"}if(o.style.position=="absolute"){o.style.left="0px"}if(this.bottomContainer){this.bottomContainer.appendChild(o)}break;case "br":if(o.style.position=="absolute"){o.style.bottom="0px"}if(o.style.position=="absolute"){o.style.right="0px"}if(this.bottomContainer){this.bottomContainer.appendChild(o)}break}}}}var H=new Array();H["t"]=Math.abs(this.settings.tl.radius-this.settings.tr.radius);H["b"]=Math.abs(this.settings.bl.radius-this.settings.br.radius);for(z in H){if(z=="t"||z=="b"){if(H[z]){var I=((this.settings[z+"l"].radius<this.settings[z+"r"].radius)?z+"l":z+"r");var J=document.createElement("DIV");J.style.height=H[z]+"px";J.style.width=this.settings[I].radius+"px";J.style.position="absolute";J.style.fontSize="1px";J.style.overflow="hidden";J.style.backgroundColor=this.boxColour;switch(I){case "tl":J.style.bottom="0px";J.style.left="0px";J.style.borderLeft=this.borderString;this.topContainer.appendChild(J);break;case "tr":J.style.bottom="0px";J.style.right="0px";J.style.borderRight=this.borderString;this.topContainer.appendChild(J);break;case "bl":J.style.top="0px";J.style.left="0px";J.style.borderLeft=this.borderString;this.bottomContainer.appendChild(J);break;case "br":J.style.top="0px";J.style.right="0px";J.style.borderRight=this.borderString;this.bottomContainer.appendChild(J);break}}var K=document.createElement("DIV");K.style.position="relative";K.style.fontSize="1px";K.style.overflow="hidden";K.style.backgroundColor=this.boxColour;K.style.backgroundImage=this.backgroundImage;switch(z){case "t":if(this.topContainer){if(this.settings.tl.radius&&this.settings.tr.radius){K.style.height=j-this.borderWidth+"px";K.style.marginLeft=this.settings.tl.radius-this.borderWidth+"px";K.style.marginRight=this.settings.tr.radius-this.borderWidth+"px";K.style.borderTop=this.borderString;if(this.backgroundImage!=""){K.style.backgroundPosition="-"+(j+this.borderWidth)+"px 0px"}this.topContainer.appendChild(K)}this.box.style.backgroundPosition="0px -"+(j-this.borderWidth)+"px"}break;case "b":if(this.bottomContainer){if(this.settings.bl.radius&&this.settings.br.radius){K.style.height=k-this.borderWidth+"px";K.style.marginLeft=this.settings.bl.radius-this.borderWidth+"px";K.style.marginRight=this.settings.br.radius-this.borderWidth+"px";K.style.borderBottom=this.borderString;if(this.backgroundImage!=""){K.style.backgroundPosition="-"+(k+this.borderWidth)+"px -"+(this.boxHeight+(j+this.borderWidth))+"px"}this.bottomContainer.appendChild(K)}}break}}}if(this.settings.autoPad==true&&this.boxPadding>0){var L=document.createElement("DIV");L.style.position="relative";L.innerHTML=this.boxContent;L.className="autoPadDiv";var M=Math.abs(j-this.boxPadding);var N=Math.abs(k-this.boxPadding);if(j<this.boxPadding){L.style.paddingTop=M+"px"}if(k<this.boxPadding){L.style.paddingBottom=k+"px"}L.style.paddingLeft=this.boxPadding+"px";L.style.paddingRight=this.boxPadding+"px";this.contentDIV=this.box.appendChild(L)}};this.drawPixel=function(i,j,k,l,m,n,o,p){var q=document.createElement("DIV");q.style.height=m+"px";q.style.width="1px";q.style.position="absolute";q.style.fontSize="1px";q.style.overflow="hidden";var r=Math.max(this.settings["tr"].radius,this.settings["tl"].radius);if(o==-1&&this.backgroundImage!=""){q.style.backgroundImage=this.backgroundImage;q.style.backgroundPosition="-"+(this.boxWidth-(p-i)+this.borderWidth)+"px -"+((this.boxHeight+r+j)-this.borderWidth)+"px"}else{q.style.backgroundColor=k}if(l!=100){setOpacity(q,l)}q.style.top=j+"px";q.style.left=i+"px";n.appendChild(q)}}function insertAfter(a,b,c){a.insertBefore(b,c.nextSibling)}function BlendColour(a,b,c){var d=parseInt(a.substr(1,2),16);var e=parseInt(a.substr(3,2),16);var f=parseInt(a.substr(5,2),16);var g=parseInt(b.substr(1,2),16);var h=parseInt(b.substr(3,2),16);var i=parseInt(b.substr(5,2),16);if(c>1||c<0){c=1}var j=Math.round((d*c)+(g*(1-c)));if(j>255){j=255}if(j<0){j=0}var k=Math.round((e*c)+(h*(1-c)));if(k>255){k=255}if(k<0){k=0}var l=Math.round((f*c)+(i*(1-c)));if(l>255){l=255}if(l<0){l=0}return "#"+IntToHex(j)+IntToHex(k)+IntToHex(l)}function IntToHex(a){base=a/16;rem=a%16;base=base-(rem/16);baseS=MakeHex(base);remS=MakeHex(rem);return baseS+""+remS}function MakeHex(x){if((x>=0)&&(x<=9)){return x}else{switch(x){case 10:return "A";case 11:return "B";case 12:return "C";case 13:return "D";case 14:return "E";case 15:return "F"}}}function pixelFraction(x,y,r){var a=0;var b=new Array(1);var c=new Array(1);var d=0;var e="";var f=Math.sqrt((Math.pow(r,2)-Math.pow(x,2)));if((f>=y)&&(f<(y+1))){e="Left";b[d]=0;c[d]=f-y;d=d+1}var f=Math.sqrt((Math.pow(r,2)-Math.pow(y+1,2)));if((f>=x)&&(f<(x+1))){e=e+"Top";b[d]=f-x;c[d]=1;d=d+1}var f=Math.sqrt((Math.pow(r,2)-Math.pow(x+1,2)));if((f>=y)&&(f<(y+1))){e=e+"Right";b[d]=1;c[d]=f-y;d=d+1}var f=Math.sqrt((Math.pow(r,2)-Math.pow(y,2)));if((f>=x)&&(f<(x+1))){e=e+"Bottom";b[d]=f-x;c[d]=0}switch(e){case "LeftRight":a=Math.min(c[0],c[1])+((Math.max(c[0],c[1])-Math.min(c[0],c[1]))/2);break;case "TopRight":a=1-(((1-b[0])*(1-c[1]))/2);break;case "TopBottom":a=Math.min(b[0],b[1])+((Math.max(b[0],b[1])-Math.min(b[0],b[1]))/2);break;case "LeftBottom":a=(c[0]*b[1])/2;break;default:a=1}return a}function rgb2Hex(a){try{var b=rgb2Array(a);var c=parseInt(b[0]);var d=parseInt(b[1]);var f=parseInt(b[2]);var g="#"+IntToHex(c)+IntToHex(d)+IntToHex(f)}catch(e){alert("There was an error converting the RGB value to Hexadecimal in function rgb2Hex")}return g}function rgb2Array(a){var b=a.substring(4,a.indexOf(")"));var c=b.split(", ");return c}function setOpacity(a,b){b=(b==100)?99.999:b;if(isSafari&&a.tagName!="IFRAME"){var c=rgb2Array(a.style.backgroundColor);var d=parseInt(c[0]);var e=parseInt(c[1]);var f=parseInt(c[2]);a.style.backgroundColor="rgba("+d+", "+e+", "+f+", "+b/100+")"}else{if(typeof (a.style.opacity)!="undefined"){a.style.opacity=b/100}else{if(typeof (a.style.MozOpacity)!="undefined"){a.style.MozOpacity=b/100}else{if(typeof (a.style.filter)!="undefined"){a.style.filter="alpha(opacity:"+b+")"}else{if(typeof (a.style.KHTMLOpacity)!="undefined"){a.style.KHTMLOpacity=b/100}}}}}}function inArray(a,b){for(var i=0;i<a.length;i++){if(a[i]===b){return i}}return false}function inArrayKey(a,b){for(key in a){if(key===b){return true}}return false}function addEvent(a,b,c,d){if(a.addEventListener){a.addEventListener(b,c,d);return true}else{if(a.attachEvent){var r=a.attachEvent("on"+b,c);return r}else{a["on"+b]=c}}}function removeEvent(a,b,c,d){if(a.removeEventListener){a.removeEventListener(b,c,d);return true}else{if(a.detachEvent){var r=a.detachEvent("on"+b,c);return r}else{alert("Handler could not be removed")}}}function format_colour(a){var b="#ffffff";if(a!=""&&a!="transparent"){if(a.substr(0,3)=="rgb"){b=rgb2Hex(a)}else{if(a.length==4){b="#"+a.substring(1,2)+a.substring(1,2)+a.substring(2,3)+a.substring(2,3)+a.substring(3,4)+a.substring(3,4)}else{b=a}}}return b}function get_style(a,b,c){try{if(a.currentStyle){var d=eval("obj.currentStyle."+b)}else{if(isSafari&&a.style.display=="none"){a.style.display="";var f=true}var d=document.defaultView.getComputedStyle(a,"").getPropertyValue(c);if(isSafari&&f){a.style.display="none"}}}catch(e){}return d}function getElementsByClass(a,b,c){var d=new Array();if(b==null){b=document}if(c==null){c="*"}var e=b.getElementsByTagName(c);var f=e.length;var g=new RegExp("(^|s)"+a+"(s|$)");for(i=0,j=0;i<f;i++){if(g.test(e[i].className)){d[j]=e[i];j++}}return d}function newCurvyError(a){return new Error("curvyCorners Error:\n"+a)}


function grayOut(a,b){var b=b||{};var c=b.zindex||2050;var d=b.opacity||70;var e=(d/100);var f=b.bgcolor||"#000000";var g=document.getElementById("darkenScreenObject");if(!g){var h=document.getElementsByTagName("body")[0];var i=document.createElement("div");i.style.position="absolute";i.style.top="0px";i.style.left="0px";i.style.overflow="hidden";i.style.display="none";i.id="darkenScreenObject";h.appendChild(i);g=document.getElementById("darkenScreenObject")}if(a){if(document.body&&(document.body.scrollWidth||document.body.scrollHeight)){var j=document.body.scrollWidth+"px";var k=document.body.scrollHeight+"px"}else{if(document.body.offsetWidth){var j=document.body.offsetWidth+"px";var k=document.body.offsetHeight+"px"}else{var j="100%";var k="100%"}}g.style.opacity=e;g.style.MozOpacity=e;g.style.filter="alpha(opacity="+d+")";g.style.zIndex=c;g.style.backgroundColor=f;g.style.width=j;g.style.height=k;g.style.display="block"}else{g.style.display="none"}}function getElementsByClassName_show(a,b,c){var d=(b=="*"&&a.all)?a.all:a.getElementsByTagName(b);var e=new Array();c=c.replace(/\-/g,"\\-");var f=new RegExp("(^|\\s)"+c+"(\\s|$)");var g;for(var i=0;i<d.length;i++){g=d[i];if(f.test(g.className)){e.push(g);show2(g,"blind")}}return (e)}function getElementsByClassName_hide(a,b,c){var d=(b=="*"&&a.all)?a.all:a.getElementsByTagName(b);var e=new Array();c=c.replace(/\-/g,"\\-");var f=new RegExp("(^|\\s)"+c+"(\\s|$)");var g;for(var i=0;i<d.length;i++){g=d[i];if(f.test(g.className)){e.push(g);weg2(g,"blind")}}return (e)}function weg(a){new Effect.Fade(a,{duration:1.2,from:0.9})}function weg2(a,b){if(b=="switch"){new Effect.SwitchOff(a)}else{if(b=="drop"){new Effect.DropOut(a)}else{if(b=="blind"){new Effect.BlindUp(a)}else{if(b=="squish"){new Effect.squish(a)}else{if(b=="fold"){new Effect.Fold(a)}else{if(b=="shrink"){new Effect.Shrink(a)}else{if(b=="slide"){new Effect.SlideUp(a)}else{if(b=="puff"){new Effect.Puff(a,{duration:4.5})}else{if(b=="fade"){new Effect.Fade(a,{duration:1.2,from:0.9})}}}}}}}}}}function show2(a,b){if(b=="blind"){new Effect.BlindDown(a)}else{if(b=="grow"){new Effect.Grow(a)}else{if(b=="slide"){new Effect.SlideDown(a)}else{if(b=="appear"){new Effect.Appear(a,{duration:1.2,from:0.9})}}}}}function open_vort_besucher(){var a=new Window({className:"mac_os_x",width:770,height:520,zIndex:100,resizable:true,title:"Diese Gratis-Vorteile haben Sie als registriertes Mitglied:",showEffect:Effect.Appear,hideEffect:Effect.Shrink,destroyOnClose:true,draggable:true,wiredDrag:true});$url="include_frags/vorteile_reg_besucher.htm";a.setAjaxContent($url,{method:"get"},{showCentered:true},{showModal:true})}function get_text(a,b,c){var d=b;var e="id="+a;var f=c;var g=new Ajax.Updater(f,d,{method:"get",parameters:e})}document.ondblclick=goPageTop;function goPageTop(){window.scrollTo(0,0)}function fullw(){window.moveTo(0,0);window.resizeTo(screen.availWidth,screen.availHeight+3)}function gettranslation(a){var b=window.location;var c=window.screen.width-200;var d=window.screen.height-100;var e=190;var f=90;if(a=="e"){var g="http://translate.google.com/translate?hl=en&ie=UTF-8&oe=UTF-8&langpair=de%7Cen&u=";g=g+b;g=g+"&prev=/language_tools"}else{var g="http://translate.google.com/translate?hl=en&ie=UTF-8&oe=UTF-8&langpair=de%7Cfr&u=";g=g+b;g=g+"&prev=/language_tools"}popUpWin=open(g,"popUpWin","toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=yes,width="+c+",height="+d+",left="+f+", top="+e+",screenX="+f+",screenY="+e+"")}


var fileLoadingImage="lightbox/images/loading.gif";var fileBottomNavCloseImage="layout_images/icons/close.gif";var overlayOpacity=0.7;var animate=true;var resizeSpeed=6;var borderSize=10;var imageArray=new Array;var activeImage;if(animate==true){overlayDuration=0.2;if(resizeSpeed>10){resizeSpeed=10}if(resizeSpeed<1){resizeSpeed=1}resizeDuration=(11-resizeSpeed)*0.15}else{overlayDuration=0;resizeDuration=0}Object.extend(Element,{getWidth:function(a){a=$(a);return a.offsetWidth},setWidth:function(a,w){a=$(a);a.style.width=w+"px"},setHeight:function(a,h){a=$(a);a.style.height=h+"px"},setTop:function(a,t){a=$(a);a.style.top=t+"px"},setLeft:function(a,l){a=$(a);a.style.left=l+"px"},setSrc:function(a,b){a=$(a);a.src=b},setHref:function(a,b){a=$(a);a.href=b},setInnerHTML:function(a,b){a=$(a);a.innerHTML=b}});Array.prototype.removeDuplicates=function(){for(i=0;i<this.length;i++){for(j=this.length-1;j>i;j--){if(this[i][0]==this[j][0]){this.splice(j,1)}}}};Array.prototype.empty=function(){for(i=0;i<=this.length;i++){this.shift()}};var Lightbox=Class.create();Lightbox.prototype={initialize:function(){this.updateImageList();var a=document.getElementsByTagName("body").item(0);var b=document.createElement("div");b.setAttribute("id","overlay");b.style.display="none";b.onclick=function(){myLightbox.end()};a.appendChild(b);var c=document.createElement("div");c.setAttribute("id","lightbox");c.style.display="none";c.onclick=function(e){if(!e){var e=window.event}var d=Event.element(e).id;if(d=="lightbox"){myLightbox.end()}};a.appendChild(c);var d=document.createElement("div");d.setAttribute("id","imageDataContainer");c.appendChild(d);var e=document.createElement("div");e.setAttribute("id","outerImageContainer");c.appendChild(e);if(animate){Element.setWidth("outerImageContainer",250);Element.setHeight("outerImageContainer",250)}else{Element.setWidth("outerImageContainer",1);Element.setHeight("outerImageContainer",1)}var f=document.createElement("div");f.setAttribute("id","imageData");d.appendChild(f);var g=document.createElement("div");g.setAttribute("id","imageDetails");f.appendChild(g);var h=document.createElement("span");h.setAttribute("id","caption");g.appendChild(h);var i=document.createElement("span");i.setAttribute("id","numberDisplay");g.appendChild(i);var j=document.createElement("div");j.setAttribute("id","bottomNav");f.appendChild(j);var k=document.createElement("a");k.setAttribute("id","bottomNavClose");k.setAttribute("href","myLightbox.end()");k.onclick=function(){myLightbox.end();return false};j.appendChild(k);var l=document.createElement("img");l.setAttribute("src",fileBottomNavCloseImage);k.appendChild(l);var m=document.createElement("div");m.setAttribute("id","imageContainer");e.appendChild(m);var n=document.createElement("img");n.setAttribute("id","lightboxImage");m.appendChild(n);var o=document.createElement("div");o.setAttribute("id","hoverNav");m.appendChild(o);var p=document.createElement("a");p.setAttribute("id","prevLink");p.setAttribute("href","#");o.appendChild(p);var q=document.createElement("a");q.setAttribute("id","nextLink");q.setAttribute("href","#");o.appendChild(q);var r=document.createElement("div");r.setAttribute("id","loading");m.appendChild(r);var s=document.createElement("a");s.setAttribute("id","loadingLink");s.setAttribute("href","#");s.onclick=function(){myLightbox.end();return false};r.appendChild(s);var t=document.createElement("img");t.setAttribute("src",fileLoadingImage);s.appendChild(t)},updateImageList:function(){if(!document.getElementsByTagName){return}var a=document.getElementsByTagName("a");var b=document.getElementsByTagName("area");for(var i=0;i<a.length;i++){var c=a[i];var d=String(c.getAttribute("rel"));if(c.getAttribute("href")&&(d.toLowerCase().match("lightbox"))){c.onclick=function(){myLightbox.start(this);return false}}}for(var i=0;i<b.length;i++){var e=b[i];var d=String(e.getAttribute("rel"));if(e.getAttribute("href")&&(d.toLowerCase().match("lightbox"))){e.onclick=function(){myLightbox.start(this);return false}}}},start:function(a){hideSelectBoxes();hideFlash();var b=getPageSize();Element.setWidth("overlay",b[0]);Element.setHeight("overlay",b[1]);new Effect.Appear("overlay",{duration:overlayDuration,from:0,to:overlayOpacity});imageArray=[];imageNum=0;if(!document.getElementsByTagName){return}var c=document.getElementsByTagName(a.tagName);if((a.getAttribute("rel")=="lightbox")){imageArray.push(new Array(a.getAttribute("href"),a.getAttribute("title")))}else{for(var i=0;i<c.length;i++){var d=c[i];if(d.getAttribute("href")&&(d.getAttribute("rel")==a.getAttribute("rel"))){imageArray.push(new Array(d.getAttribute("href"),d.getAttribute("title")))}}imageArray.removeDuplicates();while(imageArray[imageNum][0]!=a.getAttribute("href")){imageNum++}}var e=getPageScroll();var f=e[1]+(b[3]/10);var g=e[0];Element.setTop("lightbox",f);Element.setLeft("lightbox",g);Element.show("lightbox");this.changeImage(imageNum)},changeImage:function(a){activeImage=a;if(animate){Element.show("loading")}Element.hide("lightboxImage");Element.hide("hoverNav");Element.hide("prevLink");Element.hide("nextLink");Element.hide("imageDataContainer");Element.hide("numberDisplay");imgPreloader=new Image();imgPreloader.onload=function(){Element.setSrc("lightboxImage",imageArray[activeImage][0]);myLightbox.resizeImageContainer(imgPreloader.width,imgPreloader.height);imgPreloader.onload=function(){}};imgPreloader.src=imageArray[activeImage][0]},resizeImageContainer:function(a,b){this.widthCurrent=Element.getWidth("outerImageContainer");this.heightCurrent=Element.getHeight("outerImageContainer");var c=(a+(borderSize*2));var d=(b+(borderSize*2));this.xScale=(c/this.widthCurrent)*100;this.yScale=(d/this.heightCurrent)*100;wDiff=this.widthCurrent-c;hDiff=this.heightCurrent-d;if(!(hDiff==0)){new Effect.Scale("outerImageContainer",this.yScale,{scaleX:false,duration:resizeDuration,queue:"front"})}if(!(wDiff==0)){new Effect.Scale("outerImageContainer",this.xScale,{scaleY:false,delay:resizeDuration,duration:resizeDuration})}if((hDiff==0)&&(wDiff==0)){if(navigator.appVersion.indexOf("MSIE")!=-1){pause(250)}else{pause(100)}}Element.setHeight("prevLink",b);Element.setHeight("nextLink",b);Element.setWidth("imageDataContainer",c);this.showImage()},showImage:function(){Element.hide("loading");new Effect.Appear("lightboxImage",{duration:resizeDuration,queue:"end",afterFinish:function(){myLightbox.updateDetails()}});this.preloadNeighborImages()},updateDetails:function(){if(imageArray[activeImage][1]){Element.show("caption");Element.setInnerHTML("caption",imageArray[activeImage][1])}if(imageArray.length>1){Element.show("numberDisplay");Element.setInnerHTML("numberDisplay","Bild "+eval(activeImage+1)+" von "+imageArray.length+"  -  Mit den Pfeiltasten Ihrer Tastatur (rechts/links-oben/unten/ESC) k"+unescape("%F6")+"nnen Sie navigieren.")}new Effect.Parallel([new Effect.SlideDown("imageDataContainer",{sync:true,duration:resizeDuration,from:0,to:1}),new Effect.Appear("imageDataContainer",{sync:true,duration:resizeDuration})],{duration:resizeDuration,afterFinish:function(){var a=getPageSize();Element.setHeight("overlay",a[1]);myLightbox.updateNav()}})},updateNav:function(){Element.show("hoverNav");if(activeImage!=0){Element.show("prevLink");document.getElementById("prevLink").onclick=function(){myLightbox.changeImage(activeImage-1);return false}}if(activeImage!=(imageArray.length-1)){Element.show("nextLink");document.getElementById("nextLink").onclick=function(){myLightbox.changeImage(activeImage+1);return false}}this.enableKeyboardNav()},enableKeyboardNav:function(){document.onkeydown=this.keyboardAction},disableKeyboardNav:function(){document.onkeydown=""},keyboardAction:function(e){if(e==null){keycode=event.keyCode;escapeKey=27}else{keycode=e.keyCode;escapeKey=e.DOM_VK_ESCAPE}key=String.fromCharCode(keycode).toLowerCase();if((key=="x")||(key=="o")||(key=="c")||(keycode==escapeKey)){myLightbox.end()}else{if((key=="p")||(keycode==37)){if(activeImage!=0){myLightbox.disableKeyboardNav();myLightbox.changeImage(activeImage-1)}}else{if((key=="n")||(keycode==39)){if(activeImage!=(imageArray.length-1)){myLightbox.disableKeyboardNav();myLightbox.changeImage(activeImage+1)}}}}},preloadNeighborImages:function(){if((imageArray.length-1)>activeImage){preloadNextImage=new Image();preloadNextImage.src=imageArray[activeImage+1][0]}if(activeImage>0){preloadPrevImage=new Image();preloadPrevImage.src=imageArray[activeImage-1][0]}},end:function(){this.disableKeyboardNav();Element.hide("lightbox");new Effect.Fade("overlay",{duration:overlayDuration});showSelectBoxes();showFlash()}};function getPageScroll(){var a,b;if(self.pageYOffset){b=self.pageYOffset;a=self.pageXOffset}else{if(document.documentElement&&document.documentElement.scrollTop){b=document.documentElement.scrollTop;a=document.documentElement.scrollLeft}else{if(document.body){b=document.body.scrollTop;a=document.body.scrollLeft}}}arrayPageScroll=new Array(a,b);return arrayPageScroll}function getPageSize(){var a,b;if(window.innerHeight&&window.scrollMaxY){a=window.innerWidth+window.scrollMaxX;b=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){a=document.body.scrollWidth;b=document.body.scrollHeight}else{a=document.body.offsetWidth;b=document.body.offsetHeight}}var c,d;if(self.innerHeight){if(document.documentElement.clientWidth){c=document.documentElement.clientWidth}else{c=self.innerWidth}d=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){c=document.documentElement.clientWidth;d=document.documentElement.clientHeight}else{if(document.body){c=document.body.clientWidth;d=document.body.clientHeight}}}if(b<d){pageHeight=d}else{pageHeight=b}if(a<c){pageWidth=a}else{pageWidth=c}arrayPageSize=new Array(pageWidth,pageHeight,c,d);return arrayPageSize}function getKey(e){if(e==null){keycode=event.keyCode}else{keycode=e.which}key=String.fromCharCode(keycode).toLowerCase();if(key=="x"){}}function listenKey(){document.onkeypress=getKey}function showSelectBoxes(){var a=document.getElementsByTagName("select");for(i=0;i!=a.length;i++){a[i].style.visibility="visible"}}function hideSelectBoxes(){var a=document.getElementsByTagName("select");for(i=0;i!=a.length;i++){a[i].style.visibility="hidden"}}function showFlash(){var a=document.getElementsByTagName("object");for(i=0;i<a.length;i++){a[i].style.visibility="visible"}var b=document.getElementsByTagName("embed");for(i=0;i<b.length;i++){b[i].style.visibility="visible"}}function hideFlash(){var a=document.getElementsByTagName("object");for(i=0;i<a.length;i++){a[i].style.visibility="hidden"}var b=document.getElementsByTagName("embed");for(i=0;i<b.length;i++){b[i].style.visibility="hidden"}}function pause(a){var b=new Date();c=null;do{var c=new Date()}while(c-b<a)}function initLightbox(){myLightbox=new Lightbox()}Event.observe(window,"load",initLightbox,false)
/*


<script type="text/javascript" src="js/compr/email_valid.js" charset="ISO-8859-1"></script>
<script type="text/javascript" src="js/compr/smooth.pack.js" charset="ISO-8859-1"></script>

*/


/*
<script type="text/javascript" src="js/compr/windows/window.js" charset="ISO-8859-1"></script>

eval((function(){var a="8Ì=Cl.cÓÿ,(`Ì.keepMultiÿÌ=Ð;Ù=(Â!`Ì.ÓsDuraØ=0.4;Ì.pÿ={Qitial:78a;8b=0;Íÿ>07ÂÍÿ-ûrQg7a=Íî;b=1êa=Íî?Íî.id:6}}!a7a=wQ_+new Dÿ,().ÆTime(Ñ(a)7açrt(Ì +a+ is alÓady ÓgiûeÓdÿDOM! Make suÓ you  9D() or d: ÃÿconûructorÑopØs=Å{cl:dialog,ÿSmQWidth:100,mQHeÀ:20,ÓsúclosÄe:Ã,mQimúmaximúÞ:Ã,rDataSÁÿAppear:EÁ),ÒÿFañ:EÒ),Á#:{òÒ#:{òßSè:ÿ,titç:&nbsp;,urlSonlá:Pÿ.emptyÿ,É:200,å:300,oÕ:1,ÓcerAuto:Ã,wiÓdù:Ð,cÚSd:Ð,gridX:1,gridY:1òÍ[b]||{}`üÿ7focusCl=cl}ÂÎÿ#%=7ÎÏYÑÂlÔÿ#rÀ=7lÔÏXÑüß7ÅÒÿÅÁÿüÁ==EÝ}Ù7üÁ==.ÝüÒ==.Fañ7Ò#.from=oÕ}}üÒ==EÒ7Ò=7EÒ(ÿ`üdðñÿ/(Ñ}ÿüè!=ÿ7è=(èÑÿÊcÓÿ,Ì(a`ewQ=à;MoDownÊQitùÿUpÊendùÿMoveÊupdÿ,ùOnLáÊÿÿDownC=toFrontResÊÓcerÎæ_Î`%æ_%`Gæ~Î%GCïéwQËèË`üÞ78c=à;[Î,ÎâÎÎ_ÞÑ`[%.up(),%â%%_ÞÑÑüÓsizÄeðsræ_srÿÑÿíóíÂlÔ!7V{lÔ:lÔÛLÔ=ÃêV{rÀ:rÀÛLÔ=Ð}ÂÎ!7V{Î:ÎÛTop=ÃêV{%:%ÛTop=Ð}ûoÓdÿí9OÕ(oÕ`üzÿ&ð9Zÿ&(zÿ&Ñüdð9D(ÃÑ_ÿ(`É=É;å=å;visibç=Ð;Ç=Ðÿ!{Î:0,lÔ:0,%:0,rÀ:0};É&&åðÿ É,åÑ9Titç(titç`Ìs.ÿñÿ/:ð_notify(onDeÿ/`Î`%`GC`ï`é`wQË`G,lá,onlá`Ö78a=ã`8bífor(8i=0;i<ÿÿ;i++7b=ÿ[i];b.noñType==17bÓak}b=6}b7ÖõbÑÖ=6}ÿ7ÿÑÜ}iefix7ÿiefixÑÿÿ`Ìs.unÿ9CÚì7cÚ=aòÆCäGò9Cì,b,c78d=(a`6==d7throw UnÄe to fQd ÿ '+aÿQ DOM}Ö=d.èNoñ;8eí8píb7e=EÆDimensions(dÑc7p=PosiØ.cumulativeOff9(dÑ8f=ã`ÿf=ã`fõd`d.Á(`bðÿ e.É,e.åÑcð9ÿ(pB-åN,pî-ÉWÑòöì7Ü;×í8b='<div id='+ÆId()+'~ cl='+cl+'~> </div>'Èã).QnerHTML=aò÷ìþðÁÿ=c?ÁCer:Á;Áÿ=d||Ð;b=b||{};ÿ=b.;!_ôð_ôÊ÷ÿb.Êô;new Ajax.Requeû(a,b`b.=ò_÷ì7Eupdÿ,(ã),a.ÓsponseText`ð(aÑíà[Áÿ](ÁÿÑ,9URLì7Ü}×=a;8b=<iÿ ÿborñr='0' nameÿ idÿsrcøaÿÉøÉÿåøå+'> </iÿ>È,ÆURLä×?×:6òÓfÓsh:7×7@eÆAttribute(idK~).src=×}ò9ÿ%ìþ,e7a=a||eJ;cookie=[aþ,e];8f=ÌUtilities.Æÿ%(a`f78g=fë,`8x=gîë:`8y=gBë:`8w=g[2]),h=g[3]`8i=g[4];8j=g[5];ÿ w,h`i=ÿQim=Ãêj=ÿaxim=Ã}}ÿ=xÿ-l;ó=yÿ-t;Vÿ?{lÔ:xB}:{rÀ:xB}`Vó?{Î:yB}:{%:yB}ÑòÆIdäeJò9D:7d=Ãò9ConûraQtì,b7Ç=aÿ!ÅÇPad,b||{}`ó&&ÿð9ÿ(ÿÎ),ÿlÔ)Ñò_Qitù:functi",b=0,d=0,c=[],f="#%6789@GJKQV`~ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüþÿÿÿÿÿÿBÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ Sÿ!ÿ#ÿ%ÿ&ÿ,ÿ-ÿ/",e,g;while(d<f.length){e='';while((g=f.charAt(d++))=="ÿ")e+=g;e+=g;c[b++]=e}for(b=c.length-1;b>=0;)a=a.replace(new RegExp(c[b],"g"),("\042\044this.options.entdowusefunction(,mon,evMoDownEv.bindAsListener(this);Effect.stopObserving(ontlem.onCompleteestroyOnCloseif();.observe(NamassparseFloat(ebar=undefinedev.up().next()].each(d){d.observe(mon,c.MoDown);d.addCl(Optionsbottomnull){var set(cid)+ine9Style();_cizeightshowtypeof trueablObject.extend(getconstraQt;@ÆId(K_tÄe~).QnerHTML=b;G=@eJ+~)}width=_,scroll,ResWQargumstopÊround(Math.random()*500,gridfalse)}hidereeftpacity_oldParurltionÌ.hasLibloseCallbackKpx}`×7G.src=6Appear7Á#.to=oÕ}draggÄeeffect#thisoad.up().pÓvious(),ÆC(:7Óturn heÀ=@eJ+leparwQ,Ós,Res}else{.split(:a=6;[0]wQ,lá,OnLá7de},TopHandçr.appendChild(9HTMLC9AjaxC='+DragizÄe:Ã,st,b,c,da.childNoñsdocum.bodyÓgiûer(àÑ,øÆId(K~' EÓmove(ÆÌBorñrS[1]LÔMoeûyç.=ÃðdoMFuncØLocaØModaleçmframerototype:(Ù?. Q the .bQd(àÑblurClsrö(`#,ß`+' .çngth9S(:6,;ÇPad==&&ÂCookieInñxateî==ûroy".split(""))[b--]);var r=a;a="on4{8ÿ=ðáÿÿ!ðaxÿPrototype.BrowQr.IE&&N==0Â_ÏwBorderS()}5Á8wiâdDóÂ=_Uÿ)È=9çÿ==srÂõû;ÅÔ=Å;Ô=;JÔ÷JËìÔ÷ìËÿÒÈõ=Õb=(ÏId()î_åË8b&&Position.withá(b,í0],í1])Â=æ;6}toFront(Ë8!dógÀÂ6}ÿMÄ}ßÿßÿêdisÿ,Ì,ÄrlayOpacity)dó=ÿÕ}ëÿÕ};.showÿroundÓ,bÂ6 b==1?a:a=Math.floor(a/b)*bãGDóÓÂbÁc=b[0]-í0]d=b[1]-í1];8õÂw=ÅÔ+ch=Ô+d;c=Å-ÅÔ;d=-Ô;8äÂw=GþC(w)ÈÉì:(ìÔ-c)%ç×Âh=GÙC(h)ÈÉJ:(JÔ-d)%}QtS(w,hËZÒÈ5=b;8äÂe=R~)+cf=ü(eËí0]+=f-e;É~:f%ÈÉì:Rì)-c%ç×Âg=RÊ)+di=ñ(gËí1]+=i-g;ÉÊ:i%ÈÉJ:RJ)-d%}ZMÄçiefixÂ_fixIEOverlappág()}_âmÄStoâÿÿendDóÓÂêenÿË8õÂZEndÒÈZEndMÄ}ÿÿè4;_hideÿË_saveCookie()dó=æëæãüÓKbþ`w;8a<X~àX~ça+Åÿb-Xìàb-Xì-ÅöaãñÓKbÙ`òh=ï;8a<XÊàXÊça+h>b-XJàb-XJ-h}}6 aãGþC:wKaþ`wb÷~Ë8b+wÿa-XìÂw=a-Xì-böwãGÙC:hKaÙ`òb÷ÊË8b+hï>a-XJÂh=a-XJ-b-N-S}}6 hã_Uwôdocum.UEÖ(7Ëc.QtAttribute(id,aËc.c=dialogd;8urlÂd='<iÆ Æborder=0 nameÞ  idÞ src='+url+'> </iÆ>'Èd='<7 idÞÑ'+b+'Ç> </7>'}e=closéå'åÍåjf=ùimizéÐ'ÐÍÐjg=imizé'Íjh=âsizÀ?sr'sr':Q'i=../themes/default/blank.gif;c.ánerHTML=e+f+gî     q1'Ñ@ÊYnw'Øøn'><7Ê' Ü Ü_wádow'>+Üî</7Øøne'ÿ q2'Ñ@midYw'Ø  qdtÀ_ÿÿvalign='Ê'>+dîÃd øe'Î<t3'Ñ@botYsw'Ø  øs'><7J'Ñ'status_bar'><span style='float:~; w:1px; ò:1px'></span></7Ø  qd +hîÿ;EÖ.hide(cË.áQrtBefoâ(c,.firstChildËß((aîÇ),load,onloadË6 cãchangeCôÏId(ËA([_åÿÐÿÿsr,Ç])úÿ+d),b+d,a+d)}.bád(this)Ëÿî_Ê,bî_Ü,aî_ÜË(#+cî tdúd.c=d.c.sub(b,a)}Ëc=aãÚÓ,b,cÂif4{a.âmÄC(bËa.addC(c)}ãQtÿÓ,bàñ4;b=ü(bËe=||9;eÉÊ:a%;eÉ~:b%;äû;×ûãÏÿ:Âa={};8×)VÊ:9RÊÿJ:9RJ})çä)V~:9R~ÿì:9Rì})}6 aãÏS:ÿ{w:Å,ò:}ãQtSÓ,b,càaËb=bË8ÿa<ùþàùþçÿb<ùÙÂb=ùÙçÙ&&b>ÙÂb=Ùçþ&&a>þàþç×&&ä&&w.hasÝLib&&Ý.Òw&&cÂnew Ý.Òw(this,æ,æ,a,b,{durÛ:w.âsÝDurÛ})ÈÅ=a;=be=?:9;eÉw:a+ÅW+ÅE%;eÉò:bï%;8!||==9Âd=(9.idîÇËdÉò:b%;dÉw:a%",b=0,d=0,c=[],f="ÿ0%456789@GJKQVZ`jq~ÀÁXYÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒRÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüþÿUÿÆÏÿÿÿ~ÿÿÿÿÿÿÿÿÿÿÿÿÿ";while(d<f.length){e='';while((g=f.charAt(d++))=="ÿ")e+=g;e+=g;c[b++]=e}for(b=c.length-1;b>=0;)a=a.replace(new RegExp(c[b],"g"),("\\\042\044this.options.onstraintent.gecurrDragWinclass='+b+_doizepartStyle(function(===docum.body?wUtilitiestPageS().windowight>        idthus id='+a+_var lassNamecseFloat(eft+px})(a)pointerreturndivif(elemÿ0_updatebottom){8&&eL&&eTop){se{a=Object.extend(a,{_notify(on:tDimensions().(@+a+@, ev)'> </7>:; <tEvheable=[_round(~.5X4,gridX),_round(~.5Y4,gridY)];Pad.;docum.body.on tÀ_window@<tr qd ){</tovew(docum,mouQ_cont}elQ{.Q{top);__invisible__' onclick='ws.>ÃdÃr>      ÃÀ,evMouQminim class=Resmax):aOrgfalQlemeTop>Ãd He_toggleCationtitleEffect='+a+'Ç~.obQrveÂa=inre},eL;cloQnull}8~.sÊÀ?<7 wUtilities.Qlectstart=r5[++N+S=sr&&isMGTopCheimragÓÂb=cc=doÒ-ÅE-ÅW}}6 =9Rqd má.each(dÂ=trueGLCWÆupÏUp,ÕËcâateÆmÄÏMÄ,ÕËframegetèObQrvágÿ})}elQV~.eÖ4lÀrowÀScâen(Ìd()Â6ç+ÅE+ÅW>WiâdEÖ(cont' ,_Ú((cÂ6 !Ðd&&(Ëè4ã_LocÛZStartÎ>    ".split(""))[b--]);r+=a;a="}}Jå÷õîÐ,ùsÎ÷,éÔ,åW7õîùsÎW7,Ä,éÔ,ßFráõÅÿ%<WRmaxZÁ9ÒÔÅq9þÃJgBoundsÿÿ3||!Ó9ÙÃÿ#w=Ðèh=Ä(!a9w+=ÐW+ÐE;h+=ÄN+ÄS}varObject.extend(gã(),{w7:wç,h:hç}ÌÉ bJÙõÅÿ3Ær a=_computeSÂ(ùí,ùid,Ð,Ä,0,Ú)h9Ð=a+5}`Ä=a+5}}îÐ,Ä)Èedì,Ëa9Ó=é(a9Åò ëOÑ=Ýÿ;æb.Ë(aÔ,10ÌÉ}WRaddÿmð=é;ÒøÔ`Å!ÿ%9ÒÔ}Åÿ9ÿ0ÿ}ÔÙ(ÌUBefoShowöopËt!=Í.Ë&&ûÿ59û(,ûÿ5Ô`û(Ôÿ&(Ìfÿ7=t;UShow8Ô,ËC@era,b,c9Èed=é;ÈTop=b;ÈL=c;Ë(aÔ,isVisibleõÉ ÓJ_Èa,bÆr cÞèd=×(ò a=Ý9a=(dÜ÷-(Ä+ÄN+ÄS))/2}a+=c.ßp(òÝ9b=(dÜW7-(Ð+ÐW+ÐE))/2}b+=c.l;sã(a,bÌÿÃ,_ÈÿÈedÿ;×ècÞñ&&ñÜW7==ÿ&&ñÜ÷==bÜ÷&&ÿ.l==c.l&&ÿ.ßp==c.ßp9É}ñ=b;ÿ=c(ÿ9ÿ.s4{h:(b.page÷çÔÔifÈAußìJhGõÓ=ÿmð9WRm#ÿWRsOveäÃÿ=êg48#äö||8auß8;ÿ08hidden8}Ìÿ2(,ÿ2ÿ5ÿÅ!Ö9UHG8ÔJcÿ6õÅÓ9ifÿ&&!ÿ(t)9É}ifÿ-OnCÿ6Ær a=ÿ-ÿopYÿ;Y;ÿb(ÌaÃ}`ÿaÃ}}WRåFÿ7(ÌÖ=é;hG(ÌÖ=ÿ;UCÿ68ÔJmÕõÅÿÿ#aÿ2ö(!ÿ9ÿ=éraÿ;ÿ1=bèÿ-bÿ-b~Ä-óhGÇ+b)ç}Ô}`ÿ=ÿrÿ1;ÿ1=Ûÿ+b~ÿ#ÿ+b;Ä+óËÇ-b)ç}ÔÿÃUMÕïmÿõÅisMÕd()||ÿÅÊIE&&ÄN==09ÿÃÅÿ9_sßã(ÿ}`_sßã(ø)èaÞr×èc=a.lèd=a.ßpopp!=ÿ=9a={ßp:0,l:0,Q:0,ÿ!:0}èe=p6(Ìÿ=e.w7;bÜ÷=e.h;d=0;c=0}Åconstraint9ÿ-=l)+ÿ!ÌbÜ÷-=ßp)+QÌc+=lÌd+=ßpÔÿ#f=ÿ-ÐW-ÐEèg=bÜ÷-ÄN-ÄSd,c,f,g~îf,gÌÀ4L?{l:c}:{ÿ!:c}ÌÀ4Top?{ßp:d}:{Q:d}Ôÿ()q9þÃ}UMÿïisMÕdõÉ ÿJisMÿdõÉ (ÿÔ,ÿ9ÿÍ.ÿ99Í.ÿ9(,aÔJsZÁa9À4{zÁ:a}ÌWRåZindex(a,tÔ,sÿ:ÿ!a||a=k89ak&nbsp;8}Í.åÿ4ßp8,aÔ,gÿ:õÉ ÿ4ßpö.íJsStatusBaraÿ;ÏQö(ò (a)=kobject89Åÿ/9âplaceØ(a,ÿ/Ô`âÿ,(aÔ}`âí=a}Jÿ&õÅ!q&ÿappVersionÿMSIEö>0)&ÿrAg@ÿOperaö<0)&&(.g48pÿ8ö=kÿö9new Inser.After(ú,'<iÿ  idk'+ú+'_q8 sàkdisplay:none;pÿ8:ÿ;filter:progid:DXImageTransform.Microsoft.Alpha(oÑ=0Ì8 srckjavascript:ÿ;8 ÿ borderk08 sÎingkno8></iÿ >'Ìq=ÿ4q8ÔÅq9sTimeout(þÿ,50ÔJþõPÿ8.clone(,qÌq.sà.zÁ=ÿ%-1;q.ËÃ,ÿaÿ;_cateHiddenDivÚ_n8ÌÄNüh%s8ÌÄSüh%e8ÌÐEüw7%w8ÌÐWüw7;ôrÿcateÍ(8div8Ìb.Úkë_8+Ú;ÿ=.ÿ,èc=æc.ëOÑ=(.g48oÑöÌôJ10)(ÊIE9ÄSÿ3öÿ;ÄNÿ1öÿ}ÅÊWebKit&&Pro",b=0,d=0,c=[],f="ÿ#%46789@GJQRUY`Rq~ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝÞßàáâãäåæçèéêëìíîïðñòóôõö÷øùúûüþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿ!ÿ#ÿ%ÿ&Jkÿ,ÿ-ÿ/ÿ0ÿ1ÿ2ÿ3ÿ4ÿ5ÿ6ÿ7ÿ8ÿ9ÿ:ÿ;ÿ=";while(d<f.length){e='';while((g=f.charAt(d++))=="ÿ")e+=g;e+=g;c[b++]=e}for(b=c.length-1;b>=0;)a=a.replace(new RegExp(c[b],"g"),("\042\044this.tionindoweightelement;if(Effecop:func(s. b=eft(esi(b)Math.max(0,constraintPad.+ÿhis;vausearentL&&Top&&W.hastLib&&t.RzeW){new t.RzeW(t,ove;b.pNode.rem#Childr_createHiddenDivclassName_etStyle(.getDimensionsidthÿWUtilities.){entideIEOverlappingbottomels_notify(8onhGtOpafterFinishRe{s.iefix,{dura:W.rzetDura})}`et.sIndexize()}hif(9vaÃÅ!TopÆr c=parseFloat(.g48Q8));À4{Q:(cc@errurnPrototype.Browser.show);Elem@croll(gId()_w7pacitysZÁ(WRmaxZÁ+1visible)}inimÂdoNotNotifyHGgPageSÂp)ChildcomputeBoundsclassNamenull.w=8undefined8=gWSÎp)totyleontQbar.Locarflowupdatet;sTimeout(func(9px8r truegCá@().#rlay9_È(ÈTop,ÈLÔ}innerHTMLsSÂ(8Ì_saveCookieÃ,odalpageSÂtypeof=b;À4{h:hç}Ìa.b.pNode.rem#Ø98)HÌWRunsOveä(tcá@..idËt=Í6._fixJ_gWBorderSÂcloseCallbackdocum@.&(navigaßr.falseoldSàrzing9É}reY=func(9)q9q.hGÃ.indexOf(86().hsßdã!=Û.bind(t)h=.g÷()(8ë_mðößFráwSÎmÕda9ÅÛ,Û,Û,Ä=ÏrowMðW(tÌaximÂabsolutebÜW7framerightvar Àà.zÁ_checkJ},=8appendØdestroyâfirstØês4{#ä:r2÷hGt!Ð||!Ä(ú_OpsloseocdWosisOÑTitleÆrÿbody".split(""))[b--]);r+=a;a="õWebKitVion<420ÿÿ1MaxÊþmaxÊ(Ã1MÝÊþmÝÊ(ÿeHiddenDivYvÕb=dÙm.bodycåc.~tAttrie(id,id+_tmp%c=a;cÿdisplay=none;c.ÝnerHTML=;búc,bûQ còÿ,==ÏY={u~TÑ:Ö,È:È,ÿ),ÿ3),ÿ5),ÿ),Ë:Ë,ç:ç}}ò8ÿ,!=ÏþÈ=øÈ;Ö=øu~TÑ;ÁÈ&&Ö&&è.hasEffLib&&üYnew ü(ÿ-,øtÑ,øä,øË,øç,{dura`:è.8sizeEffDura`}ÅsÈ?{ä:øä}:{r:ør}%sÖ?{tÑ:øtÑ}:{Â:øÂ}%ðøË,øçJès.8ÿ0(%_êSß(JòêSß:Y=ÏòsaveCoÿ:coÿYvÕa=;ÿ2Ül:Òÿ5)ÅÜr:Òÿ)ÿ Ü,t:Òÿ)ÅÜ,b:Òÿ3)JÜ,ÒË:Ë%Ü,Òç:çÿÝÊd(ÿaxÊd(%~tCoÿ(a,coÿÿôProõIEþ_getèBorderSize(JvÕaåa=ÿ +Ñ`s+_ÿ;aÿposi`=absolute;óúa,óû9=(aÃ2ÿÿ5JÅÿÿÃ ÿÿJÅÿÿ3JJvÕb=getDimensions(%ÿË:b.Ë+px,ç:b.ç+px}%ÿzIÿ%:ÿ30}%Q 9òÿ#ô||!GYQ}ÁG==eÍmYG=Ï}el~{ÿ2ÌäíäJÅÌrírÃ ÌtÑítÑJÅÌÂíÂJJG.ÿ#e(%G=Ï;ÿ1Resizeÿ}òãÿ4þÿ4(ÿ-Åès.ã(a,ÿ-J}}ès={wsÿmÔsÿÿ&ÿfÙ~dè:Ï,Ç:0,×Showá×Hideáaddÿ!þêÿ!(a%ÿ&.Þêÿ!þÿ&=ÿ&.8j(oYQ o==a}J,ã,bþÿ&.âoo[a]Yo[a](a,bÃ/èYQ ÐdetÿÀ==aÿ/ÿQ }ÿÿ=Ð÷>=2?ws[Ð÷-2]:Ï},ëÐÞaddMÔÿdisìa.Ñ`s,ÿ,a.×Opacity,aÀ,a.óï(ÿ)ÿzIÿ%=ÿ1;ÿ=1;_ÿ#eÚÿ#e(ÃSel(aÀJ@ÞêMÔY@pÑ(%Áÿenìï@7t().toFront(%ÿÚshow(J}},ëÐÞunëws=Ð8jÿ==a}ÿ:YÐâwYèsÿwÀÃMÔs:Yenì%@âaaYaÿJ}J,mÝØÝÊ(Jæ,maxØaxÊ(Jæ,clo~,bYvÕcÄcYcÿJÁbYæ},öùÆp`s.ö5öXNJÁ==bY=Ï}ÿBlurJ,fÙsùÿÁÆp`s.fÙs5fÙsXNJ=b;ÿFÙsJ,unÿ0YÐâdYdà=dÎgoU)||auto;dÿÿ#den}J%Áa&&aàYaÿaà}J},8ÿ0:YÐâddàYdÿdà}J}ÃZiÿ%,ba>ÇþÇ=a;Áÿ}=b;ÁþfÙs(ÀJ}}g={dialogId:Ï,onCompÍteÿcallÿpart:Ï,ÿÿÉKd=ÿ?ÿ:AbbruchÛeqok_#n'fqîÓeñ  <Ýput type='#n' value=d+' onclick='g.îCallback()' +fñ</6éaÍrtaÍrtÉkÛdqokÓdñ</6>éÝfoÝfo%Q}a=a||;b=b||{}",b=0,d=0,c=[],f="ÿ@#%6789@GJQXUY`q~ÀÁÂÃÄÅÆÇÈÉÊËÌÍÎÏÐÑÒÓ8ÔÕÖ×ØÙÚÛ%ÜÝÞßàá5âãäåæçèéêëìíîïðñòóôõö÷øùúûüþÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿ ÿ!ÿ#ÿ%ÿ&Ýÿ,ÿ-ÿ/ÿ0ÿ1ÿ2ÿ3ÿ4ÿ5Ã";while(d<f.length){e='';while((g=f.charAt(d++))=="ÿ")e+=g;e+=g;c[b++]=e}for(b=c.length-1;b>=0;)a=a.replace(new RegExp(c[b],"g"),("\042\044this.storedLocationfunction(indowentetStyle(ÿ@){if(:aDiaameelem.loers,ba&&typeof a!=string){g._runAjaxRequest(a,b,g.ect;b=Obj.extend(b,b.wPart||{});b.wPart=b.wParClafocusedW'+.classN;var >    buttobdivlasa=      <6 c7s=%+_message'>+a+</6    <6 c7s=%+_#ns'      <input type='#n' value=c+' onwiredElemmodalWs.currDrag)}returnssWUtilities.verflow){tion=c7s =(b.#nX?b.#nX+ :)+ seight.getId()if(bottom:g=getW(a);ÁJel~{b.omaxZIndexu~Left);Q}a=a||;b=b||{}c=ÆkLabel?ÆkLabel:Oimizewidths{le.getCont().nullws.op+(?._#n'8click='g.okCallback()' +reodalWar u~TÑoverlayÊ,bYvÕcÄc&&c.visibÍYc.mocuSel(@7t()ÀÅ@7t().eÍm.t||{};%=%||aÍrt);a+=b~rvpush(aJ,to8Loca`.oldOUEffOp`s:{dura`:0.5},XNYb.changeXN(Æp`s.each(notifyÍft=dÙm.c8ateEÍm(6%Ev.stÑ(bJheW;Q _Ñeng(a,bJ,8move8gisterYabÍSc8en(:G.gcancelÅÁè.keepMultiMÔY~tSize(+/    },_Ñ`s.pareWi8dEÍm:!9totype.Brow~r.blurÍngth.YvÕbÄ!bYQ}Á.in~rtBefo8(.firstChild%Eff.ResizeèY.styÍ.rÃrtÑÃtÑ×_modal%Ü,+isMJ,clo~All(dYQ dFÙ~dè:YYðË,çJb._ã(onb.îLabelokiewi8d_frÎÌoU:ès.Ç+þö(ÀJ,update9.Ì@÷==0YFunc:Ï,confirm_showo~(:[],Jòc8atJÁÖYOÝerhidndexoÝinsß:this}J,get~tOUÁdoÁÈYÂÃÂÑ`s[a]äÃäJÿ".split(""))[b--]);r+=a;a="ameters||{};bX=bX||alertÛaâmqÜmq'>+a+ÿÛsíPöa+âpöÜpö'>  ÿ}8k;Å;`thN.ÿã,bûÆtInfoMqY(Ä_d_mq).updateãûcloÆInfo:WsoÆ(ÁûÿÈc=bX!&&!ÿ8.parÀ||).pÏW/2}idÁ=idt=ßDate(ÇÁÉÄ_d_+t7tTime(Çid=Á}!||!d=.ÿã,Á,,,5,cÇ=d+5=d+5}}effò=effò;rKõrKÿmÞimõmÞimÿmaximõmaximÿdraggaU=draggZbosaU=bosZe=ßW(bÇe7tContÀ()ÿe.síCÀer(true,top,lìÇe.ÆtDKtroyOnCloÆ(Çe.Å#=8nCancel||Å;e.ok#=8nOk||8k;`eÑëYóã.rKponÆText,èû_runAjaxÿÈ,cô=ô={}}DÌFuncá.oÌ;è=b;ó=c;ôÌ=D.ë;ßAjax.ÿã.url,ôûokÓ!ôk#||ôk#ã)@}ÑÅÓ@a.Å#a.Å#ãü}}Ýarray=navigator.uÆrAgÀ.match(ßRegExp(/AppleÝÿ6/([ÿ6dÿ6.ÿ6+]*)/)ÇÝVersion=parÆFloatãrray[1]ü={getWScrollYT,L,W,H;ÿa!úTáñáLì;WáÎHáÔw=w;with(w.w.ðTopT=ñ=Lìw.TçñçLì}}wQWW=wQÎH=wQÔw.ðËWW=ËÎH=ËÔWçÍÎHçÍÔ}}}}`{top:T,lì:L,:W,:H}ÑgetPÏéYÿ;b,c;d,ea!úbá7tW(Çcá7tÔ(ÇeáÎdáÔf,gwQÔ&&ÿÿ=wQÔ+ÿÔ>ÍÔÿúÔfúÍÎgúÍÔ}}ÿÔb=ÿÎc=ÿÔð.ËÔb=.ËÎc=.ËÔbúiÀÎcúiÀÔ}}}g<cd=cd=g}f<be=be=f}}`{pÏW:e,pÏÔ:d,wW:b,wÔ:c}ÑdNÊÈå,e.÷(b,a,thN._dNÊã,båü.bÞd(thN),e||û_dNÊÈåe=(bÇfÿe.ÿÇd&&IE._hiäSel(Çùdüe=(f.pÏÔþÇeJb=ÃSíÂòe.ÿ=c;ßÂ.Appear(eÖ0,to:cÿSíÂò))edNplayÉblock}ÑenÊYÿ_ÄÛb=ãÇba=ÃHiäÂòßÂ.Faä(bÖÿ,to:0ÿHiäÂò))bJÿæbüa!É__Þî__ùü}Ñ_hiä9!Õÿ=×?×:îÛ×Éhidän}}üÑ_sí9Õtry{×=ÿ}catch(eÿÿ×ÿ}}üÑNDefÞedY`typeof ã)!ÉunäfÞed&&a!Ñ÷Èåã).ÆtStyleã,{zInäx:~1}Ç~+;c()eÚeØaÇeXÉ_+b;eJeÒeÿeÿezInäx=~1;~+;eÉ100%Ûdïe,dBÝ&&a=É_ÄÆtTimeout(c(û10)c(ü}ÑÆÿÈà=b[0]+É+Kcapeã)+((b[1êexpirKÿ1].toGMTStrÞg()Ù2êpathÿ2]Ù3êdomaÞÿ3]Ù4êÆcure:ûgeÿYb=à;cá+É;d=øÛ +cÇd==-1d=øcÇd!=0`null}d+=2}e=à.øÛ,dÇe==-1e=ÿ}`unKcape(substrÞg(d+c.ÿ,e)ûÿÈå,e,fgú;hÚhØbÇhX=f+_contÀÛdh=dþh=cþ}hÒhÿhÿhJhÿgïh,gBidÐ+eÐ+e}gæhÇ`i}}",b=0,d=0,c=[],f="ÿ6789@#JQUX`~ZÀÁÂÃÄÃÅÆÇÈÉÊËÌÍÎÏÐÑÒÓÔÕÖ×ØÙÚÛÜÝKÞßàáâãäåæçèéêëìíîïBðñòóôõö÷øùúûüþÿÿÿÿÿÿÿÿNÿÿYÿÿÿÿÿqÿÿÿÿÿÿ";while(d<f.length){e='';while((g=f.charAt(d++))=="ÿ")e+=g;e+=g;c[b++]=e}for(b=c.length-1;b>=0;)a=a.replace(new RegExp(c[b],"g"),("\\\042\044documentfunction(.style.indoweight}else{.scrollWUtilitiesisibility.bodyPrototype.Browser.Elementif(idthvar ){ialogaoverlay.cl=nullectptions.geb.oSel:IEa=a=?:#+a+ ;(a+sel).each(b(#+a7tId()+ input).each(b8nclick});aose()Callbackdisplay=none;.innerbleassNamereturn Ws.maxZIndex+aU||false;b.entthis.dIdEffdalmoÃ=_Ä&&W.hasÂLib&&Ws.cancelse);:a,b=aUScreeniÀ.onComplete.offÆtW;agei=(h)7tDimensions().},positionÉabsolute;#:a=Ws.focuÆdW;H.isDefined(8ldV),Obj.extend({from:bv.ÆtAttribute(id,:)+((b[=.create(divÇ;' class='+bX+_WebKitesinnew .cookie=aÉ<div id='Ä_d_(ade,c,d.removeChild(=bodyD.parametersSize])?Û _getAjaxContÀefthowvisiU.ÞÆrtBefore(.firstChildÇ.&&Top;LOD.callFunca.oizaU=rogrKsÞitLightboxÞäxOf(._síSel(=)Ñ)}+px_computeéOpacity8ldVhw=7tPÏé(topÉ0ÛQHTMLá;_openDparÀNoäistCookiewMaxY:;lìÉ0ÛfúÎg×Éî}</div>RequKtKsÏaá||izZlengthÆlfQÉ+b[ÑWs.".split(""))[b--]);return r+a})());

*/

eval((function(){var a="funcKoRelCheck(a,b,c,d){e=1fQ(com|net|org|edu|int|mil|gov|arpa|biz|aero|nE|coop|info|pro|museum)LgQS@SLh='()><@,;:.[]'j=[^s+h#]k='([^]*)'lQ[...]Lm=j##n=(+m#|+k#)onAnOpmAmOq=ag);q=3 Di/-schWnichWkorrekWo%leerr=q[1]s=q[2];rrUng&uuml;lKg0}ss/ T-Namenthaelt0Gro)=3User8.u=sl);u!3){for(t=1;t<=4u[t]>255DesKnaKoRIP iV}vm#9w=s.split(.9x=w;xw[t6vJT8t.Ge&F]!=2&F6fJ/-muss guelKg2Vellig7haben, o%bekannt7sx<2Bei %fehlW%HoVnEb=IhreRNERc=Mitteilung d=deRBildbeVaeKgungs-Cod",b=48;while(b>=0)a=a.replace(new RegExp("#%036789AFGJKLOQ/ERSTVW".charAt(b),"g"),("\\\042\n\044nn Ihre Nachricht ist noch nicht gesendet worden!                     nn );return false}){alert_win_AL(var =Bitte geben Sie  n.length=new RegExp(^+ ungueltig(d{1,3});t++){if(ein.charCodeAt(t)>127for(t=0;t<e if(;.match(Adressreturn true} zu smai+der Zeichen.=null].search(Endung namsch)#(.+&w[w-1n}!)==-1ti/#)*9=/^Elamen (.+)Donstt ".split(""))[b--]);return a})());

//dezinerfolio
eval((function(){a="Scroller={speed:10,8dC.;d.while(dC.+C.}} J8N;d=5;&&M4M}d&&dM4dM}%4%} 0J8a,F4(F,fa@7a.4a.LP+F7Jend8e66.cancelBubble=true;6.Value=fa@;}&&(E(7J8di=Hner3||5.G3;hN.3;a=(Ed>ah-d>i7e@{-(h-d)7}e@{a=a+(d-a}To(0,aEa==a}=aJHit8KwHdow,A,A7,A82P;l=9;d=locatiP;D&&D.HdexOfL#)!=-1&&(l/+l=C)Kl,Gck,endEl.PGck=2l=this.hash.substr(1E9.name==l;i=setILL+(9)+),107}}}}}};Hit()",b=48;while(b>=0)a=a.replace(new RegExp("%23456789@ACDEFGHJKLMNP".charAt(b),"g"),("\042Scroller.entfunction(offsetParscrollwindow.returndocumattachEvntervala=.getElemsByTagName(a);if(offsetTop){for(i=0;i<a.length;i++.pathnamea+=Math.ceil((d-ae.stopPropagationTopa.addEvListenerbody)/speede.prevDefaultclearI(i)pageYOffsetend(this);Height .Elemev)}:a[i]lseload=dl.href);b,dcliin},((.=.=C||on".split(""))[b--]);return a})())

var Window = Class.create();

Window.keepMultiModalWindow = false;
Window.hasEffectLib = (typeof Effect != 'undefined');
Window.resizeEffectDuration = 0.4;

Window.prototype = {
  
  initialize: function() {
    var id;
    var optionIndex = 0;

    if (arguments.length > 0) {
      if (typeof arguments[0] == "string" ) {
        id = arguments[0];
        optionIndex = 1;
      }
      else
        id = arguments[0] ? arguments[0].id : null;
    }
    

    if (!id)
      id = "window_" + new Date().getTime();
/*      
    if ($(id))
      alert("Window " + id + " is already registered in the DOM! Make sure you use setDestroyOnClose() or destroyOnClose: true in the constructor");
*/
    this.options = Object.extend({
      className:         "dialog",
      blurClassName:     null,
      minWidth:          100, 
      minHeight:         20,
      resizable:         true,
      closable:          true,
      minimizable:       true,
      maximizable:       true,
      draggable:         true,
      userData:          null,
      showEffect:        (Window.hasEffectLib ? Effect.Appear : Element.show),
      hideEffect:        (Window.hasEffectLib ? Effect.Fade : Element.hide),
      showEffectOptions: {},
      hideEffectOptions: {},
      effectOptions:     null,
      parent:            document.body,
      title:             "&nbsp;",
      url:               null,
      onload:            Prototype.emptyFunction,
      width:             200,
      height:            300,
      opacity:           1,
      recenterAuto:      true,
      wiredDrag:         false,
      closeCallback:     null,
      destroyOnClose:    false,
      gridX:             1, 
      gridY:             1      
    }, arguments[optionIndex] || {});
    if (this.options.blurClassName)
      this.options.focusClassName = this.options.className;
      
    if (typeof this.options.top == "undefined" &&  typeof this.options.bottom ==  "undefined") 
      this.options.top = this._round(Math.random()*500, this.options.gridY);
    if (typeof this.options.left == "undefined" &&  typeof this.options.right ==  "undefined") 
      this.options.left = this._round(Math.random()*500, this.options.gridX);

    if (this.options.effectOptions) {
      Object.extend(this.options.hideEffectOptions, this.options.effectOptions);
      Object.extend(this.options.showEffectOptions, this.options.effectOptions);
      if (this.options.showEffect == Element.Appear)
        this.options.showEffectOptions.to = this.options.opacity;
    }
    if (Window.hasEffectLib) {
      if (this.options.showEffect == Effect.Appear)
        this.options.showEffectOptions.to = this.options.opacity;
    
      if (this.options.hideEffect == Effect.Fade)
        this.options.hideEffectOptions.from = this.options.opacity;
    }
    if (this.options.hideEffect == Element.hide)
      this.options.hideEffect = function(){ Element.hide(this.element); if (this.options.destroyOnClose) this.destroy(); }.bind(this)
    
    if (this.options.parent != document.body)  
      this.options.parent = $(this.options.parent);
      
    this.element = this._createWindow(id);       
    this.element.win = this;
    
    // Bind event listener
    this.eventMouseDown = this._initDrag.bindAsEventListener(this);
    this.eventMouseUp   = this._endDrag.bindAsEventListener(this);
    this.eventMouseMove = this._updateDrag.bindAsEventListener(this);
    this.eventOnLoad    = this._getWindowBorderSize.bindAsEventListener(this);
    this.eventMouseDownContent = this.toFront.bindAsEventListener(this);
    this.eventResize = this._recenter.bindAsEventListener(this);
 
    this.topbar = $(this.element.id + "_top");
    this.bottombar = $(this.element.id + "_bottom");
    this.content = $(this.element.id + "_content");
    
    Event.observe(this.topbar, "mousedown", this.eventMouseDown);
    Event.observe(this.bottombar, "mousedown", this.eventMouseDown);
    Event.observe(this.content, "mousedown", this.eventMouseDownContent);
    Event.observe(window, "load", this.eventOnLoad);
    Event.observe(window, "resize", this.eventResize);
    Event.observe(window, "scroll", this.eventResize);
    Event.observe(this.options.parent, "scroll", this.eventResize);
    
    if (this.options.draggable)  {
      var that = this;
      [this.topbar, this.topbar.up().previous(), this.topbar.up().next()].each(function(element) {
        element.observe("mousedown", that.eventMouseDown);
        element.addClassName("top_draggable");
      });
      [this.bottombar.up(), this.bottombar.up().previous(), this.bottombar.up().next()].each(function(element) {
        element.observe("mousedown", that.eventMouseDown);
        element.addClassName("bottom_draggable");
      });
      
    }    
    
    if (this.options.resizable) {
      this.sizer = $(this.element.id + "_sizer");
      Event.observe(this.sizer, "mousedown", this.eventMouseDown);
    }  
    
    this.useLeft = null;
    this.useTop = null;
    if (typeof this.options.left != "undefined") {
      this.element.setStyle({left: parseFloat(this.options.left) + 'px'});
      this.useLeft = true;
    }
    else {
      this.element.setStyle({right: parseFloat(this.options.right) + 'px'});
      this.useLeft = false;
    }
    
    if (typeof this.options.top != "undefined") {
      this.element.setStyle({top: parseFloat(this.options.top) + 'px'});
      this.useTop = true;
    }
    else {
      this.element.setStyle({bottom: parseFloat(this.options.bottom) + 'px'});      
      this.useTop = false;
    }
      
    this.storedLocation = null;
    
    this.setOpacity(this.options.opacity);
    if (this.options.zIndex)
      this.setZIndex(this.options.zIndex)

    if (this.options.destroyOnClose)
      this.setDestroyOnClose(true);

    this._getWindowBorderSize();
    this.width = this.options.width;
    this.height = this.options.height;
    this.visible = false;
    
    this.constraint = false;
    this.constraintPad = {top: 0, left:0, bottom:0, right:0};
    
    if (this.width && this.height)
      this.setSize(this.options.width, this.options.height);
    this.setTitle(this.options.title)
    Windows.register(this);      
  },
  

  destroy: function() {
    this._notify("onDestroy");
    Event.stopObserving(this.topbar, "mousedown", this.eventMouseDown);
    Event.stopObserving(this.bottombar, "mousedown", this.eventMouseDown);
    Event.stopObserving(this.content, "mousedown", this.eventMouseDownContent);
    
    Event.stopObserving(window, "load", this.eventOnLoad);
    Event.stopObserving(window, "resize", this.eventResize);
    Event.stopObserving(window, "scroll", this.eventResize);
    
    Event.stopObserving(this.content, "load", this.options.onload);

    if (this._oldParent) {
      var content = this.getContent();
      var originalContent = null;
      for(var i = 0; i < content.childNodes.length; i++) {
        originalContent = content.childNodes[i];
        if (originalContent.nodeType == 1) 
          break;
        originalContent = null;
      }
      if (originalContent)
        this._oldParent.appendChild(originalContent);
      this._oldParent = null;
    }

    if (this.sizer)
        Event.stopObserving(this.sizer, "mousedown", this.eventMouseDown);

    if (this.options.url) 
      this.content.src = null

     if(this.iefix) 
      Element.remove(this.iefix);

    Element.remove(this.element);
    Windows.unregister(this);      
  },
    

  setCloseCallback: function(callback) {
    this.options.closeCallback = callback;
  },
  

  getContent: function () {
    return this.content;
  },
  

  setContent: function(id, autoresize, autoposition) {
    var element = $(id);
    if (null == element) throw "Unable to find element '" + id + "' in DOM";
    this._oldParent = element.parentNode;

    var d = null;
    var p = null;

    if (autoresize) 
      d = Element.getDimensions(element);
    if (autoposition) 
      p = Position.cumulativeOffset(element);

    var content = this.getContent();

    this.setHTMLContent("");
    content = this.getContent();
    
    content.appendChild(element);
    element.show();
    if (autoresize) 
      this.setSize(d.width, d.height);
    if (autoposition) 
      this.setLocation(p[1] - this.heightN, p[0] - this.widthW);    
  },
  
  setHTMLContent: function(html) {

    if (this.options.url) {
      this.content.src = null;
      this.options.url = null;
      
  	  var content ="<div id=\"" + this.getId() + "_content\" class=\"" + this.options.className + "_content\"> </div>";
      $(this.getId() +"_table_content").innerHTML = content;
      
      this.content = $(this.element.id + "_content");
    }
      
    this.getContent().innerHTML = html;
  },
  
  setAjaxContent: function(url, options, showCentered, showModal) {
    this.showFunction = showCentered ? "showCenter" : "show";
    this.showModal = showModal || false;
  
    options = options || {};


    this.setHTMLContent("");
 
    this.onComplete = options.onComplete;
    if (! this._onCompleteHandler)
      this._onCompleteHandler = this._setAjaxContent.bind(this);
    options.onComplete = this._onCompleteHandler;

    new Ajax.Request(url, options);    
    options.onComplete = this.onComplete;
  },
  
  _setAjaxContent: function(originalRequest) {
    Element.update(this.getContent(), originalRequest.responseText);
    if (this.onComplete)
      this.onComplete(originalRequest);
    this.onComplete = null;
    this[this.showFunction](this.showModal)
  },
  
  setURL: function(url) {

    if (this.options.url) 
      this.content.src = null;
    this.options.url = url;
    var content= "<iframe frameborder='0' name='" + this.getId() + "_content'  id='" + this.getId() + "_content' src='" + url + "' width='" + this.width + "' height='" + this.height + "'> </iframe>";
    $(this.getId() +"_table_content").innerHTML = content;
    
    this.content = $(this.element.id + "_content");
  },

  getURL: function() {
  	return this.options.url ? this.options.url : null;
  },

  refresh: function() {
    if (this.options.url)
	    $(this.element.getAttribute('id') + '_content').src = this.options.url;
  },
  

  setCookie: function(name, expires, path, domain, secure) {
    name = name || this.element.id;
    this.cookie = [name, expires, path, domain, secure];
    

    var value = WindowUtilities.getCookie(name)

    if (value) {
      var values = value.split(',');
      var x = values[0].split(':');
      var y = values[1].split(':');

      var w = parseFloat(values[2]), h = parseFloat(values[3]);
      var mini = values[4];
      var maxi = values[5];

      this.setSize(w, h);
      if (mini == "true")
        this.doMinimize = true; 
      else if (maxi == "true")
        this.doMaximize = true; 

      this.useLeft = x[0] == "l";
      this.useTop = y[0] == "t";

      this.element.setStyle(this.useLeft ? {left: x[1]} : {right: x[1]});
      this.element.setStyle(this.useTop ? {top: y[1]} : {bottom: y[1]});
    }
  },
  

  getId: function() {
    return this.element.id;
  },
  

  setDestroyOnClose: function() {
    this.options.destroyOnClose = true;
  },
  
  setConstraint: function(bool, padding) {
    this.constraint = bool;
    this.constraintPad = Object.extend(this.constraintPad, padding || {});
    // Reset location to apply constraint
    if (this.useTop && this.useLeft)
      this.setLocation(parseFloat(this.element.style.top), parseFloat(this.element.style.left));
  },
  


  _initDrag: function(event) {

    if (Event.element(event) == this.sizer && this.isMinimized())
      return;


    if (Event.element(event) != this.sizer && this.isMaximized())
      return;
      
    if (Prototype.Browser.IE && this.heightN == 0)
      this._getWindowBorderSize();
    

    this.pointer = [this._round(Event.pointerX(event), this.options.gridX), this._round(Event.pointerY(event), this.options.gridY)];
    if (this.options.wiredDrag) 
      this.currentDrag = this._createWiredElement();
    else
      this.currentDrag = this.element;
      

    if (Event.element(event) == this.sizer) {
      this.doResize = true;
      this.widthOrg = this.width;
      this.heightOrg = this.height;
      this.bottomOrg = parseFloat(this.element.getStyle('bottom'));
      this.rightOrg = parseFloat(this.element.getStyle('right'));
      this._notify("onStartResize");
    }
    else {
      this.doResize = false;


      var closeButton = $(this.getId() + '_close');
      if (closeButton && Position.within(closeButton, this.pointer[0], this.pointer[1])) {
        this.currentDrag = null;
        return;
      }

      this.toFront();

      if (! this.options.draggable) 
        return;
      this._notify("onStartMove");
    }    

    Event.observe(document, "mouseup", this.eventMouseUp, false);
    Event.observe(document, "mousemove", this.eventMouseMove, false);
    

    WindowUtilities.disableScreen('__invisible__', '__invisible__', this.overlayOpacity);


    document.body.ondrag = function () { return false; };
    document.body.onselectstart = function () { return false; };
    
    this.currentDrag.show();
    Event.stop(event);
  },
  
  _round: function(val, round) {
    return round == 1 ? val  : val = Math.floor(val / round) * round;
  },


  _updateDrag: function(event) {
    var pointer =  [this._round(Event.pointerX(event), this.options.gridX), this._round(Event.pointerY(event), this.options.gridY)];  
    var dx = pointer[0] - this.pointer[0];
    var dy = pointer[1] - this.pointer[1];
    

    if (this.doResize) {
      var w = this.widthOrg + dx;
      var h = this.heightOrg + dy;
      
      dx = this.width - this.widthOrg
      dy = this.height - this.heightOrg
      

      if (this.useLeft) 
        w = this._updateWidthConstraint(w)
      else 
        this.currentDrag.setStyle({right: (this.rightOrg -dx) + 'px'});

      if (this.useTop) 
        h = this._updateHeightConstraint(h)
      else
        this.currentDrag.setStyle({bottom: (this.bottomOrg -dy) + 'px'});
        
      this.setSize(w , h);
      this._notify("onResize");
    }

    else {
      this.pointer = pointer;
      
      if (this.useLeft) {
        var left =  parseFloat(this.currentDrag.getStyle('left')) + dx;
        var newLeft = this._updateLeftConstraint(left);

        this.pointer[0] += newLeft-left;
        this.currentDrag.setStyle({left: newLeft + 'px'});
      }
      else 
        this.currentDrag.setStyle({right: parseFloat(this.currentDrag.getStyle('right')) - dx + 'px'});
      
      if (this.useTop) {
        var top =  parseFloat(this.currentDrag.getStyle('top')) + dy;
        var newTop = this._updateTopConstraint(top);

        this.pointer[1] += newTop - top;
        this.currentDrag.setStyle({top: newTop + 'px'});
      }
      else 
        this.currentDrag.setStyle({bottom: parseFloat(this.currentDrag.getStyle('bottom')) - dy + 'px'});

      this._notify("onMove");
    }
    if (this.iefix) 
      this._fixIEOverlapping(); 
      
    this._removeStoreLocation();
    Event.stop(event);
  },


   _endDrag: function(event) {

     WindowUtilities.enableScreen('__invisible__');
    
    if (this.doResize)
      this._notify("onEndResize");
    else
      this._notify("onEndMove");
    

    Event.stopObserving(document, "mouseup", this.eventMouseUp,false);
    Event.stopObserving(document, "mousemove", this.eventMouseMove, false);

    Event.stop(event);
    
    this._hideWiredElement();


    this._saveCookie()
      

    document.body.ondrag = null;
    document.body.onselectstart = null;
  },

  _updateLeftConstraint: function(left) {
    if (this.constraint && this.useLeft && this.useTop) {
      var width = this.options.parent == document.body ? WindowUtilities.getPageSize().windowWidth : this.options.parent.getDimensions().width;

      if (left < this.constraintPad.left)
        left = this.constraintPad.left;
      if (left + this.width + this.widthE + this.widthW > width - this.constraintPad.right) 
        left = width - this.constraintPad.right - this.width - this.widthE - this.widthW;
    }
    return left;
  },
  
  _updateTopConstraint: function(top) {
    if (this.constraint && this.useLeft && this.useTop) {        
      var height = this.options.parent == document.body ? WindowUtilities.getPageSize().windowHeight : this.options.parent.getDimensions().height;
      
      var h = this.height + this.heightN + this.heightS;

      if (top < this.constraintPad.top)
        top = this.constraintPad.top;
      if (top + h > height - this.constraintPad.bottom) 
        top = height - this.constraintPad.bottom - h;
    }
    return top;
  },
  
  _updateWidthConstraint: function(w) {
    if (this.constraint && this.useLeft && this.useTop) {
      var width = this.options.parent == document.body ? WindowUtilities.getPageSize().windowWidth : this.options.parent.getDimensions().width;
      var left =  parseFloat(this.element.getStyle("left"));

      if (left + w + this.widthE + this.widthW > width - this.constraintPad.right) 
        w = width - this.constraintPad.right - left - this.widthE - this.widthW;
    }
    return w;
  },
  
  _updateHeightConstraint: function(h) {
    if (this.constraint && this.useLeft && this.useTop) {
      var height = this.options.parent == document.body ? WindowUtilities.getPageSize().windowHeight : this.options.parent.getDimensions().height;
      var top =  parseFloat(this.element.getStyle("top"));

      if (top + h + this.heightN + this.heightS > height - this.constraintPad.bottom) 
        h = height - this.constraintPad.bottom - top - this.heightN - this.heightS;
    }
    return h;
  },
  
  

  _createWindow: function(id) {
    var className = this.options.className;
    var win = document.createElement("div");
    win.setAttribute('id', id);
    win.className = "dialog";

    var content;
    if (this.options.url)
      content= "<iframe frameborder=\"0\" name=\"" + id + "_content\"  id=\"" + id + "_content\" src=\"" + this.options.url + "\"> </iframe>";
    else
      content ="<div id=\"" + id + "_content\" class=\"" +className + "_content\"> </div>";

    var closeDiv = this.options.closable ? "<div class='"+ className +"_close' id='"+ id +"_close' onclick='Windows.close(\""+ id +"\", event)'> </div>" : "";
    var minDiv = this.options.minimizable ? "<div class='"+ className + "_minimize' id='"+ id +"_minimize' onclick='Windows.minimize(\""+ id +"\", event)'> </div>" : "";
    var maxDiv = this.options.maximizable ? "<div class='"+ className + "_maximize' id='"+ id +"_maximize' onclick='Windows.maximize(\""+ id +"\", event)'> </div>" : "";
    var seAttributes = this.options.resizable ? "class='" + className + "_sizer' id='" + id + "_sizer'" : "class='"  + className + "_se'";
    var blank = "../themes/default/blank.gif";
    
    win.innerHTML = closeDiv + minDiv + maxDiv + "\
      <table id='"+ id +"_row1' class=\"top table_window\">\
        <tr>\
          <td class='"+ className +"_nw'></td>\
          <td class='"+ className +"_n'><div id='"+ id +"_top' class='"+ className +"_title title_window'>"+ this.options.title +"</div></td>\
          <td class='"+ className +"_ne'></td>\
        </tr>\
      </table>\
      <table id='"+ id +"_row2' class=\"mid table_window\">\
        <tr>\
          <td class='"+ className +"_w'></td>\
            <td id='"+ id +"_table_content' class='"+ className +"_content' valign='top'>" + content + "</td>\
          <td class='"+ className +"_e'></td>\
        </tr>\
      </table>\
        <table id='"+ id +"_row3' class=\"bot table_window\">\
        <tr>\
          <td class='"+ className +"_sw'></td>\
            <td class='"+ className +"_s'><div id='"+ id +"_bottom' class='status_bar'><span style='float:left; width:1px; height:1px'></span></div></td>\
            <td " + seAttributes + "></td>\
        </tr>\
      </table>\
    ";
    Element.hide(win);
    this.options.parent.insertBefore(win, this.options.parent.firstChild);
    Event.observe($(id + "_content"), "load", this.options.onload);
    return win;
  },
  
  
  changeClassName: function(newClassName) {    
    var className = this.options.className;
    var id = this.getId();
    $A(["_close", "_minimize", "_maximize", "_sizer", "_content"]).each(function(value) { this._toggleClassName($(id + value), className + value, newClassName + value) }.bind(this));
    this._toggleClassName($(id + "_top"), className + "_title", newClassName + "_title");
    $$("#" + id + " td").each(function(td) {td.className = td.className.sub(className,newClassName); });
    this.options.className = newClassName;
  },
  
  _toggleClassName: function(element, oldClassName, newClassName) { 
    if (element) {
      element.removeClassName(oldClassName);
      element.addClassName(newClassName);
    }
  },
  
  // Sets window location
  setLocation: function(top, left) {
    top = this._updateTopConstraint(top);
    left = this._updateLeftConstraint(left);

    var e = this.currentDrag || this.element;
    e.setStyle({top: top + 'px'});
    e.setStyle({left: left + 'px'});

    this.useLeft = true;
    this.useTop = true;
  },
    
  getLocation: function() {
    var location = {};
    if (this.useTop)
      location = Object.extend(location, {top: this.element.getStyle("top")});
    else
      location = Object.extend(location, {bottom: this.element.getStyle("bottom")});
    if (this.useLeft)
      location = Object.extend(location, {left: this.element.getStyle("left")});
    else
      location = Object.extend(location, {right: this.element.getStyle("right")});
    
    return location;
  },
  

  getSize: function() {
    return {width: this.width, height: this.height};
  },
    

  setSize: function(width, height, useEffect) {    
    width = parseFloat(width);
    height = parseFloat(height);
    

    if (!this.minimized && width < this.options.minWidth)
      width = this.options.minWidth;

    if (!this.minimized && height < this.options.minHeight)
      height = this.options.minHeight;
      
    if (this.options. maxHeight && height > this.options. maxHeight)
      height = this.options. maxHeight;

    if (this.options. maxWidth && width > this.options. maxWidth)
      width = this.options. maxWidth;

    
    if (this.useTop && this.useLeft && Window.hasEffectLib && Effect.ResizeWindow && useEffect) {
      new Effect.ResizeWindow(this, null, null, width, height, {duration: Window.resizeEffectDuration});
    } else {
      this.width = width;
      this.height = height;
      var e = this.currentDrag ? this.currentDrag : this.element;

      e.setStyle({width: width + this.widthW + this.widthE + "px"})
      e.setStyle({height: height  + this.heightN + this.heightS + "px"})


      if (!this.currentDrag || this.currentDrag == this.element) {
        var content = $(this.element.id + '_content');
        content.setStyle({height: height  + 'px'});
        content.setStyle({width: width  + 'px'});
      }
    }
  },
  
  updateHeight: function() {
    this.setSize(this.width, this.content.scrollHeight, true);
  },
  
  updateWidth: function() {
    this.setSize(this.content.scrollWidth, this.height, true);
  },
  

  toFront: function() {
    if (this.element.style.zIndex < Windows.maxZIndex)  
      this.setZIndex(Windows.maxZIndex + 1);
    if (this.iefix) 
      this._fixIEOverlapping(); 
  },
   
  getBounds: function(insideOnly) {
    if (! this.width || !this.height || !this.visible)  
      this.computeBounds();
    var w = this.width;
    var h = this.height;

    if (!insideOnly) {
      w += this.widthW + this.widthE;
      h += this.heightN + this.heightS;
    }
    var bounds = Object.extend(this.getLocation(), {width: w + "px", height: h + "px"});
    return bounds;
  },
      
  computeBounds: function() {
     if (! this.width || !this.height) {
      var size = WindowUtilities._computeSize(this.content.innerHTML, this.content.id, this.width, this.height, 0, this.options.className)
      if (this.height)
        this.width = size + 5
      else
        this.height = size + 5
    }

    this.setSize(this.width, this.height);
    if (this.centered)
      this._center(this.centerTop, this.centerLeft);    
  },
  

  show: function(modal) {
    this.visible = true;
    if (modal) {

      if (typeof this.overlayOpacity == "undefined") {
        var that = this;
        setTimeout(function() {that.show(modal)}, 10);
        return;
      }
      Windows.addModalWindow(this);
      
      this.modal = true;      
      this.setZIndex(Windows.maxZIndex + 1);
      Windows.unsetOverflow(this);
    }
    else    
      if (!this.element.style.zIndex) 
        this.setZIndex(Windows.maxZIndex + 1);        
      

    if (this.oldStyle)
      this.getContent().setStyle({overflow: this.oldStyle});
      
    this.computeBounds();
    
    this._notify("onBeforeShow");   
    if (this.options.showEffect != Element.show && this.options.showEffectOptions)
      this.options.showEffect(this.element, this.options.showEffectOptions);  
    else
      this.options.showEffect(this.element);  
      
    this._checkIEOverlapping();
    WindowUtilities.focusedWindow = this
    this._notify("onShow");   
  },
  

  showCenter: function(modal, top, left) {
    this.centered = true;
    this.centerTop = top;
    this.centerLeft = left;

    this.show(modal);
  },
  
  isVisible: function() {
    return this.visible;
  },
  
  _center: function(top, left) {    
    var windowScroll = WindowUtilities.getWindowScroll(this.options.parent);    
    var pageSize = WindowUtilities.getPageSize(this.options.parent);    
    if (typeof top == "undefined")
      top = (pageSize.windowHeight - (this.height + this.heightN + this.heightS))/2;
    top += windowScroll.top
    
    if (typeof left == "undefined")
      left = (pageSize.windowWidth - (this.width + this.widthW + this.widthE))/2;
    left += windowScroll.left      
    this.setLocation(top, left);
    this.toFront();
  },
  
  _recenter: function(event) {     
    if (this.centered) {
      var pageSize = WindowUtilities.getPageSize(this.options.parent);
      var windowScroll = WindowUtilities.getWindowScroll(this.options.parent);    


      if (this.pageSize && this.pageSize.windowWidth == pageSize.windowWidth && this.pageSize.windowHeight == pageSize.windowHeight && 
          this.windowScroll.left == windowScroll.left && this.windowScroll.top == windowScroll.top) 
        return;
      this.pageSize = pageSize;
      this.windowScroll = windowScroll;

      if ($('overlay_modal')) 
        $('overlay_modal').setStyle({height: (pageSize.pageHeight + 'px')});
      
      if (this.options.recenterAuto)
        this._center(this.centerTop, this.centerLeft);    
    }
  },
  

  hide: function() {
    this.visible = false;
    if (this.modal) {
      Windows.removeModalWindow(this);
      Windows.resetOverflow();
    }

    this.oldStyle = this.getContent().getStyle('overflow') || "auto"
    this.getContent().setStyle({overflow: "hidden"});

    this.options.hideEffect(this.element, this.options.hideEffectOptions);  

     if(this.iefix) 
      this.iefix.hide();

    if (!this.doNotNotifyHide)
      this._notify("onHide");
  },

  close: function() {

    if (this.visible) {
      if (this.options.closeCallback && ! this.options.closeCallback(this)) 
        return;

      if (this.options.destroyOnClose) {
        var destroyFunc = this.destroy.bind(this);
        if (this.options.hideEffectOptions.afterFinish) {
          var func = this.options.hideEffectOptions.afterFinish;
          this.options.hideEffectOptions.afterFinish = function() {func();destroyFunc() }
        }
        else 
          this.options.hideEffectOptions.afterFinish = function() {destroyFunc() }
      }
      Windows.updateFocusedWindow();
      
      this.doNotNotifyHide = true;
      this.hide();
      this.doNotNotifyHide = false;
      this._notify("onClose");
    }
  },
  
  minimize: function() {
    if (this.resizing)
      return;
    
    var r2 = $(this.getId() + "_row2");
    
    if (!this.minimized) {
      this.minimized = true;

      var dh = r2.getDimensions().height;
      this.r2Height = dh;
      var h  = this.element.getHeight() - dh;

      if (this.useLeft && this.useTop && Window.hasEffectLib && Effect.ResizeWindow) {
        new Effect.ResizeWindow(this, null, null, null, this.height -dh, {duration: Window.resizeEffectDuration});
      } else  {
        this.height -= dh;
        this.element.setStyle({height: h + "px"});
        r2.hide();
      }

      if (! this.useTop) {
        var bottom = parseFloat(this.element.getStyle('bottom'));
        this.element.setStyle({bottom: (bottom + dh) + 'px'});
      }
    } 
    else {      
      this.minimized = false;
      
      var dh = this.r2Height;
      this.r2Height = null;
      if (this.useLeft && this.useTop && Window.hasEffectLib && Effect.ResizeWindow) {
        new Effect.ResizeWindow(this, null, null, null, this.height + dh, {duration: Window.resizeEffectDuration});
      }
      else {
        var h  = this.element.getHeight() + dh;
        this.height += dh;
        this.element.setStyle({height: h + "px"})
        r2.show();
      }
      if (! this.useTop) {
        var bottom = parseFloat(this.element.getStyle('bottom'));
        this.element.setStyle({bottom: (bottom - dh) + 'px'});
      }
      this.toFront();
    }
    this._notify("onMinimize");
    

    this._saveCookie()
  },
  
  maximize: function() {
    if (this.isMinimized() || this.resizing)
      return;
  
    if (Prototype.Browser.IE && this.heightN == 0)
      this._getWindowBorderSize();
      
    if (this.storedLocation != null) {
      this._restoreLocation();
      if(this.iefix) 
        this.iefix.hide();
    }
    else {
      this._storeLocation();
      Windows.unsetOverflow(this);
      
      var windowScroll = WindowUtilities.getWindowScroll(this.options.parent);
      var pageSize = WindowUtilities.getPageSize(this.options.parent);    
      var left = windowScroll.left;
      var top = windowScroll.top;
      
      if (this.options.parent != document.body) {
        windowScroll =  {top:0, left:0, bottom:0, right:0};
        var dim = this.options.parent.getDimensions();
        pageSize.windowWidth = dim.width;
        pageSize.windowHeight = dim.height;
        top = 0; 
        left = 0;
      }
      
      if (this.constraint) {
        pageSize.windowWidth -= Math.max(0, this.constraintPad.left) + Math.max(0, this.constraintPad.right);
        pageSize.windowHeight -= Math.max(0, this.constraintPad.top) + Math.max(0, this.constraintPad.bottom);
        left +=  Math.max(0, this.constraintPad.left);
        top +=  Math.max(0, this.constraintPad.top);
      }
      
      var width = pageSize.windowWidth - this.widthW - this.widthE;
      var height= pageSize.windowHeight - this.heightN - this.heightS;

      if (this.useLeft && this.useTop && Window.hasEffectLib && Effect.ResizeWindow) {
        new Effect.ResizeWindow(this, top, left, width, height, {duration: Window.resizeEffectDuration});
      }
      else {
        this.setSize(width, height);
        this.element.setStyle(this.useLeft ? {left: left} : {right: left});
        this.element.setStyle(this.useTop ? {top: top} : {bottom: top});
      }
        
      this.toFront();
      if (this.iefix) 
        this._fixIEOverlapping(); 
    }
    this._notify("onMaximize");


    this._saveCookie()
  },
  
  isMinimized: function() {
    return this.minimized;
  },
  
  isMaximized: function() {
    return (this.storedLocation != null);
  },
  
  setOpacity: function(opacity) {
    if (Element.setOpacity)
      Element.setOpacity(this.element, opacity);
  },
  
  setZIndex: function(zindex) {
    this.element.setStyle({zIndex: zindex});
    Windows.updateZindex(zindex, this);
  },

  setTitle: function(newTitle) {
    if (!newTitle || newTitle == "") 
      newTitle = "&nbsp;";
      
    Element.update(this.element.id + '_top', newTitle);
  },
   
  getTitle: function() {
    return $(this.element.id + '_top').innerHTML;
  },
  
  setStatusBar: function(element) {
    var statusBar = $(this.getId() + "_bottom");

    if (typeof(element) == "object") {
      if (this.bottombar.firstChild)
        this.bottombar.replaceChild(element, this.bottombar.firstChild);
      else
        this.bottombar.appendChild(element);
    }
    else
      this.bottombar.innerHTML = element;
  },

  _checkIEOverlapping: function() {
    if(!this.iefix && (navigator.appVersion.indexOf('MSIE')>0) && (navigator.userAgent.indexOf('Opera')<0) && (this.element.getStyle('position')=='absolute')) {
        new Insertion.After(this.element.id, '<iframe id="' + this.element.id + '_iefix" '+ 'style="display:none;position:absolute;filter:progid:DXImageTransform.Microsoft.Alpha(opacity=0);" ' + 'src="javascript:false;" frameborder="0" scrolling="no"></iframe>');
        this.iefix = $(this.element.id+'_iefix');
    }
    if(this.iefix) 
      setTimeout(this._fixIEOverlapping.bind(this), 50);
  },

  _fixIEOverlapping: function() {
      Position.clone(this.element, this.iefix);
      this.iefix.style.zIndex = this.element.style.zIndex - 1;
      this.iefix.show();
  },
  
  _getWindowBorderSize: function(event) {

    var div = this._createHiddenDiv(this.options.className + "_n")
    this.heightN = Element.getDimensions(div).height;    
    div.parentNode.removeChild(div)

    var div = this._createHiddenDiv(this.options.className + "_s")
    this.heightS = Element.getDimensions(div).height;    
    div.parentNode.removeChild(div)

    var div = this._createHiddenDiv(this.options.className + "_e")
    this.widthE = Element.getDimensions(div).width;    
    div.parentNode.removeChild(div)

    var div = this._createHiddenDiv(this.options.className + "_w")
    this.widthW = Element.getDimensions(div).width;
    div.parentNode.removeChild(div);
    
    var div = document.createElement("div");
    div.className = "overlay_" + this.options.className ;
    document.body.appendChild(div);

    var that = this;
    

    setTimeout(function() {that.overlayOpacity = ($(div).getStyle("opacity")); div.parentNode.removeChild(div);}, 10);
    

    if (Prototype.Browser.IE) {
      this.heightS = $(this.getId() +"_row3").getDimensions().height;
      this.heightN = $(this.getId() +"_row1").getDimensions().height;
    }


    if (Prototype.Browser.WebKit && Prototype.Browser.WebKitVersion < 420)
      this.setSize(this.width, this.height);
    if (this.doMaximize)
      this.maximize();
    if (this.doMinimize)
      this.minimize();
  },
 
  _createHiddenDiv: function(className) {
    var objBody = document.body;
    var win = document.createElement("div");
    win.setAttribute('id', this.element.id+ "_tmp");
    win.className = className;
    win.style.display = 'none';
    win.innerHTML = '';
    objBody.insertBefore(win, objBody.firstChild);
    return win;
  },
  
  _storeLocation: function() {
    if (this.storedLocation == null) {
      this.storedLocation = {useTop: this.useTop, useLeft: this.useLeft, 
                             top: this.element.getStyle('top'), bottom: this.element.getStyle('bottom'),
                             left: this.element.getStyle('left'), right: this.element.getStyle('right'),
                             width: this.width, height: this.height };
    }
  },
  
  _restoreLocation: function() {
    if (this.storedLocation != null) {
      this.useLeft = this.storedLocation.useLeft;
      this.useTop = this.storedLocation.useTop;
      
      if (this.useLeft && this.useTop && Window.hasEffectLib && Effect.ResizeWindow)
        new Effect.ResizeWindow(this, this.storedLocation.top, this.storedLocation.left, this.storedLocation.width, this.storedLocation.height, {duration: Window.resizeEffectDuration});
      else {
        this.element.setStyle(this.useLeft ? {left: this.storedLocation.left} : {right: this.storedLocation.right});
        this.element.setStyle(this.useTop ? {top: this.storedLocation.top} : {bottom: this.storedLocation.bottom});
        this.setSize(this.storedLocation.width, this.storedLocation.height);
      }
      
      Windows.resetOverflow();
      this._removeStoreLocation();
    }
  },
  
  _removeStoreLocation: function() {
    this.storedLocation = null;
  },
  
  _saveCookie: function() {
    if (this.cookie) {
      var value = "";
      if (this.useLeft)
        value += "l:" +  (this.storedLocation ? this.storedLocation.left : this.element.getStyle('left'))
      else
        value += "r:" + (this.storedLocation ? this.storedLocation.right : this.element.getStyle('right'))
      if (this.useTop)
        value += ",t:" + (this.storedLocation ? this.storedLocation.top : this.element.getStyle('top'))
      else
        value += ",b:" + (this.storedLocation ? this.storedLocation.bottom :this.element.getStyle('bottom'))
        
      value += "," + (this.storedLocation ? this.storedLocation.width : this.width);
      value += "," + (this.storedLocation ? this.storedLocation.height : this.height);
      value += "," + this.isMinimized();
      value += "," + this.isMaximized();
      WindowUtilities.setCookie(value, this.cookie)
    }
  },
  
  _createWiredElement: function() {
    if (! this.wiredElement) {
      if (Prototype.Browser.IE)
        this._getWindowBorderSize();
      var div = document.createElement("div");
      div.className = "wired_frame " + this.options.className + "_wired_frame";
      
      div.style.position = 'absolute';
      this.options.parent.insertBefore(div, this.options.parent.firstChild);
      this.wiredElement = $(div);
    }
    if (this.useLeft) 
      this.wiredElement.setStyle({left: this.element.getStyle('left')});
    else 
      this.wiredElement.setStyle({right: this.element.getStyle('right')});
      
    if (this.useTop) 
      this.wiredElement.setStyle({top: this.element.getStyle('top')});
    else 
      this.wiredElement.setStyle({bottom: this.element.getStyle('bottom')});

    var dim = this.element.getDimensions();
    this.wiredElement.setStyle({width: dim.width + "px", height: dim.height +"px"});

    this.wiredElement.setStyle({zIndex: Windows.maxZIndex+30});
    return this.wiredElement;
  },
  
  _hideWiredElement: function() {
    if (! this.wiredElement || ! this.currentDrag)
      return;
    if (this.currentDrag == this.element) 
      this.currentDrag = null;
    else {
      if (this.useLeft) 
        this.element.setStyle({left: this.currentDrag.getStyle('left')});
      else 
        this.element.setStyle({right: this.currentDrag.getStyle('right')});

      if (this.useTop) 
        this.element.setStyle({top: this.currentDrag.getStyle('top')});
      else 
        this.element.setStyle({bottom: this.currentDrag.getStyle('bottom')});

      this.currentDrag.hide();
      this.currentDrag = null;
      if (this.doResize)
        this.setSize(this.width, this.height);
    } 
  },
  
  _notify: function(eventName) {
    if (this.options[eventName])
      this.options[eventName](this);
    else
      Windows.notify(eventName, this);
  }
};


var Windows = {
  windows: [],
  modalWindows: [],
  observers: [],
  focusedWindow: null,
  maxZIndex: 0,
  overlayShowEffectOptions: {duration: 0.5},
  overlayHideEffectOptions: {duration: 0.5},

  addObserver: function(observer) {
    this.removeObserver(observer);
    this.observers.push(observer);
  },
  
  removeObserver: function(observer) {  
    this.observers = this.observers.reject( function(o) { return o==observer });
  },
  

  notify: function(eventName, win) {  
    this.observers.each( function(o) {if(o[eventName]) o[eventName](eventName, win);});
  },


  getWindow: function(id) {
    return this.windows.detect(function(d) { return d.getId() ==id });
  },


  getFocusedWindow: function() {
    return this.focusedWindow;
  },

  updateFocusedWindow: function() {
    this.focusedWindow = this.windows.length >=2 ? this.windows[this.windows.length-2] : null;    
  },
  

  register: function(win) {
    this.windows.push(win);
  },
    

  addModalWindow: function(win) {

    if (this.modalWindows.length == 0) {
      WindowUtilities.disableScreen(win.options.className, 'overlay_modal', win.overlayOpacity, win.getId(), win.options.parent);
    }
    else {

      if (Window.keepMultiModalWindow) {
        $('overlay_modal').style.zIndex = Windows.maxZIndex + 1;
        Windows.maxZIndex += 1;
        WindowUtilities._hideSelect(this.modalWindows.last().getId());
      }

      else
        this.modalWindows.last().element.hide();

      WindowUtilities._showSelect(win.getId());
    }      
    this.modalWindows.push(win);    
  },
  
  removeModalWindow: function(win) {
    this.modalWindows.pop();
    

    if (this.modalWindows.length == 0)
      WindowUtilities.enableScreen();     
    else {
      if (Window.keepMultiModalWindow) {
        this.modalWindows.last().toFront();
        WindowUtilities._showSelect(this.modalWindows.last().getId());        
      }
      else
        this.modalWindows.last().element.show();
    }
  },
  

  register: function(win) {
    this.windows.push(win);
  },
  

  unregister: function(win) {
    this.windows = this.windows.reject(function(d) { return d==win });
  }, 
  

  closeAll: function() {  
    this.windows.each( function(w) {Windows.close(w.getId())} );
  },
  
  closeAllModalWindows: function() {
    WindowUtilities.enableScreen();     
    this.modalWindows.each( function(win) {if (win) win.close()});    
  },


  minimize: function(id, event) {
    var win = this.getWindow(id)
    if (win && win.visible)
      win.minimize();
    Event.stop(event);
  },
  

  maximize: function(id, event) {
    var win = this.getWindow(id)
    if (win && win.visible)
      win.maximize();
    Event.stop(event);
  },


  close: function(id, event) {
    var win = this.getWindow(id);
    if (win) 
      win.close();
    if (event)
      Event.stop(event);
  },
  
  blur: function(id) {
    var win = this.getWindow(id);  
    if (!win)
      return;
    if (win.options.blurClassName)
      win.changeClassName(win.options.blurClassName);
    if (this.focusedWindow == win)  
      this.focusedWindow = null;
    win._notify("onBlur");  
  },
  
  focus: function(id) {
    var win = this.getWindow(id);  
    if (!win)
      return;       
    if (this.focusedWindow)
      this.blur(this.focusedWindow.getId())

    if (win.options.focusClassName)
      win.changeClassName(win.options.focusClassName);  
    this.focusedWindow = win;
    win._notify("onFocus");
  },
  
  unsetOverflow: function(except) {    
    this.windows.each(function(d) { d.oldOverflow = d.getContent().getStyle("overflow") || "auto" ; d.getContent().setStyle({overflow: "hidden"}) });
    if (except && except.oldOverflow)
      except.getContent().setStyle({overflow: except.oldOverflow});
  },

  resetOverflow: function() {
    this.windows.each(function(d) { if (d.oldOverflow) d.getContent().setStyle({overflow: d.oldOverflow}) });
  },

  updateZindex: function(zindex, win) { 
    if (zindex > this.maxZIndex) {   
      this.maxZIndex = zindex;    
      if (this.focusedWindow) 
        this.blur(this.focusedWindow.getId())
    }
    this.focusedWindow = win;
    if (this.focusedWindow) 
      this.focus(this.focusedWindow.getId())
  }
};

var Dialog = {
  dialogId: null,
  onCompleteFunc: null,
  callFunc: null, 
  parameters: null, 
    
  confirm: function(content, parameters) {

    if (content && typeof content != "string") {
      Dialog._runAjaxRequest(content, parameters, Dialog.confirm);
      return 
    }
    content = content || "";
    
    parameters = parameters || {};
    var okLabel = parameters.okLabel ? parameters.okLabel : "OK";
    var cancelLabel = parameters.cancelLabel ? parameters.cancelLabel : "Abbruch";


    parameters = Object.extend(parameters, parameters.windowParameters || {});
    parameters.windowParameters = parameters.windowParameters || {};

    parameters.className = parameters.className || "alert";

    var okButtonClass = "class ='" + (parameters.buttonClass ? parameters.buttonClass + " " : "") + " ok_button'" 
    var cancelButtonClass = "class ='" + (parameters.buttonClass ? parameters.buttonClass + " " : "") + " cancel_button'" 
    var content = "\
      <div class='" + parameters.className + "_message'>" + content  + "</div>\
        <div class='" + parameters.className + "_buttons'>\
          <input type='button' value='" + okLabel + "' onclick='Dialog.okCallback()' " + okButtonClass + "/>\
          <input type='button' value='" + cancelLabel + "' onclick='Dialog.cancelCallback()' " + cancelButtonClass + "/>\
        </div>\
    ";
    return this._openDialog(content, parameters)
  },
  
  alert: function(content, parameters) {

    if (content && typeof content != "string") {
      Dialog._runAjaxRequest(content, parameters, Dialog.alert);
      return 
    }
    content = content || "";
    
    parameters = parameters || {};
    var okLabel = parameters.okLabel ? parameters.okLabel : "Ok";


    parameters = Object.extend(parameters, parameters.windowParameters || {});
    parameters.windowParameters = parameters.windowParameters || {};
    
    parameters.className = parameters.className || "alert";
    
    var okButtonClass = "class ='" + (parameters.buttonClass ? parameters.buttonClass + " " : "") + " ok_button'" 
    var content = "\
      <div class='" + parameters.className + "_message'>" + content  + "</div>\
        <div class='" + parameters.className + "_buttons'>\
          <input type='button' value='" + okLabel + "' onclick='Dialog.okCallback()' " + okButtonClass + "/>\
        </div>";                  
    return this._openDialog(content, parameters)
  },
  
  info: function(content, parameters) {   

    if (content && typeof content != "string") {
      Dialog._runAjaxRequest(content, parameters, Dialog.info);
      return 
    }
    content = content || "";
     

    parameters = parameters || {};
    parameters = Object.extend(parameters, parameters.windowParameters || {});
    parameters.windowParameters = parameters.windowParameters || {};
    
    parameters.className = parameters.className || "alert";
    
    var content = "<div id='modal_dialog_message' class='" + parameters.className + "_message'>" + content  + "</div>";
    if (parameters.showProgress)
      content += "<div id='modal_dialog_progress' class='" + parameters.className + "_progress'>  </div>";

    parameters.ok = null;
    parameters.cancel = null;
    
    return this._openDialog(content, parameters)
  },
  
  setInfoMessage: function(message) {
    $('modal_dialog_message').update(message);
  },
  
  closeInfo: function() {
    Windows.close(this.dialogId);
  },
  
  _openDialog: function(content, parameters) {
    var className = parameters.className;
    
    if (! parameters.height && ! parameters.width) {
      parameters.width = WindowUtilities.getPageSize(parameters.options.parent || document.body).pageWidth / 2;
    }
    if (parameters.id)
      this.dialogId = parameters.id;
    else { 
      var t = new Date();
      this.dialogId = 'modal_dialog_' + t.getTime();
      parameters.id = this.dialogId;
    }


    if (! parameters.height || ! parameters.width) {
      var size = WindowUtilities._computeSize(content, this.dialogId, parameters.width, parameters.height, 5, className)
      if (parameters.height)
        parameters.width = size + 5
      else
        parameters.height = size + 5
    }
    parameters.effectOptions = parameters.effectOptions ;
    parameters.resizable   = parameters.resizable || false;
    parameters.minimizable = parameters.minimizable || false;
    parameters.maximizable = parameters.maximizable ||  false;
    parameters.draggable   = parameters.draggable || false;
    parameters.closable    = parameters.closable || false;
    
    var win = new Window(parameters);
    win.getContent().innerHTML = content;
    
    win.showCenter(true, parameters.top, parameters.left);  
    win.setDestroyOnClose();
    
    win.cancelCallback = parameters.onCancel || parameters.cancel; 
    win.okCallback = parameters.onOk || parameters.ok;
    
    return win;    
  },
  
  _getAjaxContent: function(originalRequest)  {
      Dialog.callFunc(originalRequest.responseText, Dialog.parameters)
  },
  
  _runAjaxRequest: function(message, parameters, callFunc) {
    if (message.options == null)
      message.options = {}  
    Dialog.onCompleteFunc = message.options.onComplete;
    Dialog.parameters = parameters;
    Dialog.callFunc = callFunc;
    
    message.options.onComplete = Dialog._getAjaxContent;
    new Ajax.Request(message.url, message.options);
  },
  
  okCallback: function() {
    var win = Windows.focusedWindow;
    if (!win.okCallback || win.okCallback(win)) {

      $$("#" + win.getId()+" input").each(function(element) {element.onclick=null;})
      win.close();
    }
  },

  cancelCallback: function() {
    var win = Windows.focusedWindow;

    $$("#" + win.getId()+" input").each(function(element) {element.onclick=null})
    win.close();
    if (win.cancelCallback)
      win.cancelCallback(win);
  }
}


if (Prototype.Browser.WebKit) {
  var array = navigator.userAgent.match(new RegExp(/AppleWebKit\/([\d\.\+]*)/));
  Prototype.Browser.WebKitVersion = parseFloat(array[1]);
}

var WindowUtilities = {  

  getWindowScroll: function(parent) {
    var T, L, W, H;
    parent = parent || document.body;              
    if (parent != document.body) {
      T = parent.scrollTop;
      L = parent.scrollLeft;
      W = parent.scrollWidth;
      H = parent.scrollHeight;
    } 
    else {
      var w = window;
      with (w.document) {
        if (w.document.documentElement && documentElement.scrollTop) {
          T = documentElement.scrollTop;
          L = documentElement.scrollLeft;
        } else if (w.document.body) {
          T = body.scrollTop;
          L = body.scrollLeft;
        }
        if (w.innerWidth) {
          W = w.innerWidth;
          H = w.innerHeight;
        } else if (w.document.documentElement && documentElement.clientWidth) {
          W = documentElement.clientWidth;
          H = documentElement.clientHeight;
        } else {
          W = body.offsetWidth;
          H = body.offsetHeight
        }
      }
    }
    return { top: T, left: L, width: W, height: H };
  }, 

  getPageSize: function(parent){
    parent = parent || document.body;              
    var windowWidth, windowHeight;
    var pageHeight, pageWidth;
    if (parent != document.body) {
      windowWidth = parent.getWidth();
      windowHeight = parent.getHeight();                                
      pageWidth = parent.scrollWidth;
      pageHeight = parent.scrollHeight;                                
    } 
    else {
      var xScroll, yScroll;

      if (window.innerHeight && window.scrollMaxY) {  
        xScroll = document.body.scrollWidth;
        yScroll = window.innerHeight + window.scrollMaxY;
      } else if (document.body.scrollHeight > document.body.offsetHeight){ 
        xScroll = document.body.scrollWidth;
        yScroll = document.body.scrollHeight;
      } else { 
        xScroll = document.body.offsetWidth;
        yScroll = document.body.offsetHeight;
      }


      if (self.innerHeight) { 
        windowWidth = self.innerWidth;
        windowHeight = self.innerHeight;
      } else if (document.documentElement && document.documentElement.clientHeight) { 
        windowWidth = document.documentElement.clientWidth;
        windowHeight = document.documentElement.clientHeight;
      } else if (document.body) { // other Explorers
        windowWidth = document.body.clientWidth;
        windowHeight = document.body.clientHeight;
      }  


      if(yScroll < windowHeight){
        pageHeight = windowHeight;
      } else { 
        pageHeight = yScroll;
      }


      if(xScroll < windowWidth){  
        pageWidth = windowWidth;
      } else {
        pageWidth = xScroll;
      }
    }             
    return {pageWidth: pageWidth ,pageHeight: pageHeight , windowWidth: windowWidth, windowHeight: windowHeight};
  },

  disableScreen: function(className, overlayId, overlayOpacity, contentId, parent) {
    WindowUtilities.initLightbox(overlayId, className, function() {this._disableScreen(className, overlayId, overlayOpacity, contentId)}.bind(this), parent || document.body);
  },

  _disableScreen: function(className, overlayId, overlayOpacity, contentId) {

    var objOverlay = $(overlayId);

    var pageSize = WindowUtilities.getPageSize(objOverlay.parentNode);


    if (contentId && Prototype.Browser.IE) {
      WindowUtilities._hideSelect();
      WindowUtilities._showSelect(contentId);
    }  
  

    objOverlay.style.height = (pageSize.pageHeight + 'px');
    objOverlay.style.display = 'none'; 
    if (overlayId == "overlay_modal" && Window.hasEffectLib && Windows.overlayShowEffectOptions) {
      objOverlay.overlayOpacity = overlayOpacity;
      new Effect.Appear(objOverlay, Object.extend({from: 0, to: overlayOpacity}, Windows.overlayShowEffectOptions));
    }
    else
      objOverlay.style.display = "block";
  },
  
  enableScreen: function(id) {
    id = id || 'overlay_modal';
    var objOverlay =  $(id);
    if (objOverlay) {

      if (id == "overlay_modal" && Window.hasEffectLib && Windows.overlayHideEffectOptions)
        new Effect.Fade(objOverlay, Object.extend({from: objOverlay.overlayOpacity, to:0}, Windows.overlayHideEffectOptions));
      else {
        objOverlay.style.display = 'none';
        objOverlay.parentNode.removeChild(objOverlay);
      }
      

      if (id != "__invisible__") 
        WindowUtilities._showSelect();
    }
  },

  _hideSelect: function(id) {
    if (Prototype.Browser.IE) {
      id = id ==  null ? "" : "#" + id + " ";
      $$(id + 'select').each(function(element) {
        if (! WindowUtilities.isDefined(element.oldVisibility)) {
          element.oldVisibility = element.style.visibility ? element.style.visibility : "visible";
          element.style.visibility = "hidden";
        }
      });
    }
  },
  
  _showSelect: function(id) {
    if (Prototype.Browser.IE) {
      id = id ==  null ? "" : "#" + id + " ";
      $$(id + 'select').each(function(element) {
        if (WindowUtilities.isDefined(element.oldVisibility)) {
          // Why?? Ask IE
          try {
            element.style.visibility = element.oldVisibility;
          } catch(e) {
            element.style.visibility = "visible";
          }
          element.oldVisibility = null;
        }
        else {
          if (element.style.visibility)
            element.style.visibility = "visible";
        }
      });
    }
  },

  isDefined: function(object) {
    return typeof(object) != "undefined" && object != null;
  },
  

  initLightbox: function(id, className, doneHandler, parent) {
    if ($(id)) {
      Element.setStyle(id, {zIndex: Windows.maxZIndex + 1});
      Windows.maxZIndex++;
      doneHandler();
    }
    else {
      var objOverlay = document.createElement("div");
      objOverlay.setAttribute('id', id);
      objOverlay.className = "overlay_" + className
      objOverlay.style.display = 'none';
      objOverlay.style.position = 'absolute';
      objOverlay.style.top = '0';
      objOverlay.style.left = '0';
      objOverlay.style.zIndex = Windows.maxZIndex + 1;
      Windows.maxZIndex++;
      objOverlay.style.width = '100%';
      parent.insertBefore(objOverlay, parent.firstChild);
      if (Prototype.Browser.WebKit && id == "overlay_modal") {
        setTimeout(function() {doneHandler()}, 10);
      }
      else
        doneHandler();
    }    
  },
  
  setCookie: function(value, parameters) {
    document.cookie= parameters[0] + "=" + escape(value) +
      ((parameters[1]) ? "; expires=" + parameters[1].toGMTString() : "") +
      ((parameters[2]) ? "; path=" + parameters[2] : "") +
      ((parameters[3]) ? "; domain=" + parameters[3] : "") +
      ((parameters[4]) ? "; secure" : "");
  },

  getCookie: function(name) {
    var dc = document.cookie;
    var prefix = name + "=";
    var begin = dc.indexOf("; " + prefix);
    if (begin == -1) {
      begin = dc.indexOf(prefix);
      if (begin != 0) return null;
    } else {
      begin += 2;
    }
    var end = document.cookie.indexOf(";", begin);
    if (end == -1) {
      end = dc.length;
    }
    return unescape(dc.substring(begin + prefix.length, end));
  },
    
  _computeSize: function(content, id, width, height, margin, className) {
    var objBody = document.body;
    var tmpObj = document.createElement("div");
    tmpObj.setAttribute('id', id);
    tmpObj.className = className + "_content";

    if (height)
      tmpObj.style.height = height + "px"
    else
      tmpObj.style.width = width + "px"
  
    tmpObj.style.position = 'absolute';
    tmpObj.style.top = '0';
    tmpObj.style.left = '0';
    tmpObj.style.display = 'none';

    tmpObj.innerHTML = content;
    objBody.insertBefore(tmpObj, objBody.firstChild);

    var size;
    if (height)
      size = $(tmpObj).getDimensions().width + margin;
    else
      size = $(tmpObj).getDimensions().height + margin;
    objBody.removeChild(tmpObj);
    return size;
  }  
}


// Copyright (c) 2006 SÃ©bastien Gruhier (http://xilinus.com, http://itseb.com)
// YOU MUST INCLUDE window.js BEFORE
//
// Object to store hide/show windows status in a cookie
// Just add at the end of your HTML file this javascript line: WindowStore.init()
WindowStore = {
  doSetCookie: false,
  cookieName:  "__window_store__",
  expired:     null,
  
  // Init function with two optional parameters
  // - cookieName (default = __window_store__)
  // - expiration date (default 3 years from now)
  init: function(cookieName, expired) {
    WindowStore.cookieName = cookieName || WindowStore.cookieName

    if (! expired) {
      var today = new Date();
      today.setYear(today.getYear()+1903);
      WindowStore.expired = today;
    }
    else
      WindowStore.expired = expired;

    Windows.windows.each(function(win) {
      win.setCookie(win.getId(), WindowStore.expired);
    });

    // Create observer on show/hide events
    var myObserver = {
    	onShow: function(eventName, win) {
    	  WindowStore._saveCookie();
    	},
    	
    	onClose: function(eventName, win) {
    	  WindowStore._saveCookie();
  	  },
  	  
    	onHide: function(eventName, win) {
    	  WindowStore._saveCookie();
    	}
    }
    Windows.addObserver(myObserver);

    WindowStore._restoreWindows();
    WindowStore._saveCookie();
  },
  
  show: function(win) {
    eval("var cookie = " + WindowUtilities.getCookie(WindowStore.cookieName));
    if (cookie != null) {
      if (cookie[win.getId()])
        win.show();
    }
    else
      win.show();
  },

  // Function to store windows show/hide status in a cookie 
  _saveCookie: function() {
    if (!doSetCookie)
      return;
    
    var cookieValue = "{";
    Windows.windows.each(function(win) {
      if (cookieValue != "{")
        cookieValue += ","
      cookieValue += win.getId() + ": " + win.isVisible();
    });
    cookieValue += "}"
  
    WindowUtilities.setCookie(cookieValue, [WindowStore.cookieName, WindowStore.expired]);  
  },

  // Function to restore windows show/hide status from a cookie if exists
  _restoreWindows: function() {
    eval("var cookie = " + WindowUtilities.getCookie(WindowStore.cookieName));
    if (cookie != null) {
      doSetCookie = false;
      Windows.windows.each(function(win) {
        if (cookie[win.getId()])
          win.show();
      });
    }
    doSetCookie = true;
  }
}

// Object to set a close key an all windows
WindowCloseKey = {
  keyCode: Event.KEY_ESC,
  
  init: function(keyCode) {
    if (keyCode)
      WindowCloseKey.keyCode = keyCode;      
      
    Event.observe(document, 'keydown', this._closeCurrentWindow.bindAsEventListener(this));   
  },
  
  _closeCurrentWindow: function(event) {
    var e = event || window.event
  	var characterCode = e.which || e.keyCode;
  	
  	// Check if there is a top window (it means it's an URL content)
  	var win = top.Windows.focusedWindow;
    if (characterCode == WindowCloseKey.keyCode && win) {
      if (win.cancelCallback) 
        top.Dialog.cancelCallback();      
      else if (win.okCallback) 
        top.Dialog.okCallback();
      else
        top.Windows.close(top.Windows.focusedWindow.getId());
    }
  }
}
/*
javascript-packer:
http://dean.edwards.name/packer/
www.ScriptingMagic.com 

	* Learn about Real File Compression at: 
	* http://www.thinkvitamin.com/features/webapps/serving-javascript-fast
	*
	* OR JavaScript/CSS file concatenation and compression at:
	* http://code.google.com/p/minify/
	* http://rakaz.nl/item/make_your_pages_load_faster_by_combining_and_compressing_javascript_and_css_files
	*
	* OR Prado - The awesome PHP Framework that utilize script concatenation and compression at:
	* http://www.pradosoft.com
	* http://www.pradosoft.com/demos/quickstart/?page=Advanced.Scripts3 	
*/


function handleErr(msg,url,l)
{
txt="There was an error on this page.\n\n";
txt+="Error: " + msg + "\n";
txt+="URL: " + url + "\n";
txt+="Line: " + l + "\n\n";
txt+="Click OK to continue.\n\n";
alert(txt);
return true;
}

//window.onerror=silentErrorHandler;
function silentErrorHandler() {return true;}


var show_ax_img = false;
var myGlobalHandlers = {
	onCreate: function(){
		if (show_ax_img){
			Element.show('systemWorking1')
		};
	},
	onComplete: function() {
		if(Ajax.activeRequestCount == 0){
			if (show_ax_img){
			Element.hide('systemWorking1');
			show_ax_img = false;
			};
		}
	}
};

Ajax.Responders.register(myGlobalHandlers);

function stop_ax_img(){
//alert('stop ax');
Element.hide('systemWorking1');

//weg2($('systemWorking1','fade'));
show_ax_img=false;
}

function start_ax_img(){
Element.show('systemWorking1');
show_ax_img=true;
}



function niftyAll() {

Nifty("ul.split_blue h3","top");
Nifty("ul.split_blue div","none");
Nifty("ul.split_red h3","top");
Nifty("ul.split_red div","none");
Nifty("ul.split_green h3","top");
Nifty("ul.split_green div","none");
Nifty("ul.split_gold h3","top");
Nifty("ul.split_gold div","none");
Nifty("ul.split_silver h3","top");
Nifty("ul.split_silver div","none");
Nifty("ul.split_black h3","top");
Nifty("ul.split_black div","none");
Nifty("div#mmesse_nav","normal all");
Nifty("div.page_box1","transparent");
Nifty("div.sbox_r","normal all");
Nifty("div.btt_hrnd","transparent bottom");

//betr. Box Hersteller-Marken brute force IE7:
$('all_brands').hide();
}


function buildFooter() {
	document.write(
		"<form>" +
		"<span>Visit other CNET Networks sites:</span>" +
		"<select id=\"cnetMenu\" >" +
		"<option selected value=\"\">Select Site</option>" +
		"<option value=\"http://www.bnet.com\">BNET</option>" +
		"<option value=\"http://www.chow.com\">CHOW</option>" +
		"<option value=\"http://www.cnet.com\">CNET.com</option>" +
		"<option value=\"http://www.cnetchannel.com\">CNET Channel</option>" +
		"<option value=\"http://www.gamespot.com\">GameSpot</option>" +
		"<option value=\"http://www.cnetnetworks.com/advertise/properties/international.html\">International Media</option>" +
		"<option value=\"http://www.mp3.com\">MP3.com</option>" +
		"<option value=\"http://www.mysimon.com\">mySimon</option>" +
		"<option value=\"http://www.search.com\">Search.com</option>" +
		"<option value=\"http://techrepublic.com.com/\">TechRepublic</option>" +
		"<option value=\"http://www.tv.com\">TV.com</option>" +
		"<option value=\"http://www.zdnet.com\">ZDNet</option>" +
		"</select><a href=\"javascript:cnetFooter();\">Go</a>" +
		"</form>"
	);
}

function cnetFooter() {
	var cnetMenu = $('cnetMenu');
	var selIndex = cnetMenu.selectedIndex;
	window.location = cnetMenu.options[selIndex].value;
}

function open_cat_select(){
$('cats_sw_wrap_trigg').hide();
do_qu(lv+'ax_cats_select.php','','cats_sw');
$('cats_sw_wrap').show();	
}
function open_cat_select_foot(){
$('cats_sw_wrap_f').show();
do_qu(lv+'ax_cats_select.php','','cats_sw_wrap_f');
	
}

function open_download(kdnr)
{
fullw();
var win = new Window(
{
className: "mac_os_x", 
width:770, height:410, zIndex: 100, 
resizable: true, 
title: "Download:", 
showEffect:Effect.Appear, hideEffect: Effect.Shrink, 
destroyOnClose:true,
draggable:true, 
wiredDrag: true});
$url='form_download.php?u_id='+kdnr;
win.setAjaxContent($url,{method:'get'},{showCentered:true},{showModal:true});
}


function del_plz_cook(){
	setCookie('plz','',-3);
	window.location.reload();
}


function not_en_credit(){	
	alert_win2('Sie verf&uuml;gen hierf&uuml;r nicht mehr &uuml;ber gen&uuml;gend Guthaben. <br ><br >Bitte pr&uuml;fen Sie Ihr Guthaben.','OK',120,400);
}






function open_plz_form_2(brws,qstr,popup,u_id,title,dist){
fullw();
	if (!getCookie('plz')){
		open_plz_form(ad_id)	
	}else{
		c=getCookie('plz');
		var part = c.split("-");
		var land = part[0];
		var plz = part[1];		
		if (popup==1){
			if (brws!='msie'){		
				open_ad_map_2(brws,qstr,popup,u_id,title,dist);
			}else{
				open_ad_map_2(brws,qstr,popup,u_id,title,dist);
			}
		}else{
			//show_map_nearby_ads_2(brws,qstr,popup,u_id,title,dist);
			open_ad_map_2(brws,qstr,popup,u_id,title,dist);
		}
	}			
}


function open_plz_form_1(brws,ad_id,popup,u_id,title,dist,from,to,what){
//alert(dist); 
fullw();
if (!brws) {brws='';}
if (!title) {title='';}
if (!dist) {dist=49;}
if (!from) {from=0;}
if (!to) {to=100000001;}
if (!what) {what='ads';} // ads, shops, members, vereine, bands, entertainer ...

	if (!getCookie('plz')){
		open_plz_form(ad_id)	
	}else{
		c=getCookie('plz');
		var part = c.split("-");
		var land = part[0];
		var plz = part[1];		
		if (popup==1){
				open_ad_map(ad_id, plz, land,dist,from,to,u_id,title,brws,what);
		}else{
			open_ad_map(ad_id, plz, land,dist,from,to,u_id,title,brws,what);
		}
	}			
}



function open_ad_map(categ,pz,landk,distkm,p_von,p_bis,u_id,ttl,brws,what){
fullw();
//alert('3 PLZ: '+pz);
//alert('3 Land: '+landk);
distkm=49;
if (ttl===undefined) {ttl=''};
	show_ax_img=true;
	fullw();
	my_width=getWidth();
	my_height=getHeight(); 	

	my_width=Math.round(my_width-150); 
	my_height=Math.round(my_height-145); 
	
	my_height=565; 

// ads, shops, members, vereine, bands, entertainer ...
switch (what) {
 case "ads":
	$this_title = "Geo-Map: "+ttl;
 break;
 case "shops":
	$this_title = "Geo-Map: Fach-H&auml;ndler";
 break; 
 break;
 case "members":
 
 break;
 case "vereine":
 
 break;

 case "entertainer":
 
 break;	
	
 default:
	$this_title = "Geo-Map: "+ttl;
 break;
}
	
	var win347 = new Window(
	{
	className: "mac_os_x", 
	width:my_width, height:my_height, zIndex: 100, 	
	resizable: true, 
	title: $this_title, 
	showEffect:Effect.Appear, hideEffect: Effect.Fade, 
	destroyOnClose:true,
	draggable:true, 
	wiredDrag: false});		
	$url ='google_maps_cat_pop_wrapper.php?cat_id='+categ+'&t_plz='+pz+'&land='+landk+'&dist='+distkm+'&preis_von='+p_von+'&preis_bis='+p_bis+'&user_id='+u_id+'&what='+what; 
	win347.setAjaxContent($url,{method:'get'},{showCentered:true},{showModal:true});

}

function open_ad_map_2(brws,qstr,popup,u_id,title,dist){
dist=49;
fullw();
c=getCookie('plz');
var part = c.split("-");
var land = part[0];
var plz = part[1];

	show_ax_img=true;
	fullw();
	my_width=getWidth();
	my_height=getHeight(); 
	
	my_width=Math.round(my_width-150); 
	my_height=Math.round(my_height-145);

	var win341 = new Window(
	{
	className: "mac_os_x", 
	width:my_width, height:my_height, zIndex: 100, 
	resizable: true, 
	title: "Geo-Map: Trefferliste "+title, 
	showEffect:Effect.Appear, hideEffect: Effect.Fade, 
	destroyOnClose:true,
	draggable:true, 
	wiredDrag: false});
	url ='google_maps_cat_pop_wrapper.php?search_res=1&q_str='+qstr+'&t_plz='+plz+'&land='+land+'&dist='+dist+'&user_id='+u_id;
	win341.setAjaxContent(url,{method:'get'},{showCentered:true},{showModal:true});
}


function owner_details(owner_id){
show_ax_img = true;
var win3191 = new Window(
{
className: "mac_os_x", 
width:610, height:450, zIndex: 100, 
resizable: true, 
title: "Anbieter-Details:", 
showEffect:Effect.Appear, hideEffect: Effect.Fade, 
destroyOnClose:true,
draggable:false, 
wiredDrag: false});

$url='form_owner_details.php?owner_id='+owner_id;
win3191.setAjaxContent($url,{method:'get'},{showCentered:true},{showModal:true});

}


function show_map_nearby_ads_2(brws,qstr,popup,u_id,title,dist){
c=getCookie('plz');
var part = c.split("-");
var land = part[0];
var plz = part[1];
url ='google_maps_cat_pop_wrapper.php?search_res=1&q_str='+qstr+'&t_plz='+plz+'&land='+land+'&dist='+dist+'&user_id='+u_id;
window.imap.location = url; 
show2('map','blind');
fullw();
}


function show_map_nearby_ads(categ,pz,landk,distkm,p_von,p_bis,u_id){
var url ='google_maps_cat.php5?cat_id='+categ+'&t_plz='+pz+'&land='+landk+'&dist='+distkm+'&preis_von='+p_von+'&preis_bis='+p_bis+'&user_id='+u_id;
window.imap.location = url; 
show2('map','blind');
fullw();
}



function show_map_nearby_user(categ,pz,landk,distkm,u_id,num_ads){
var url ='google_maps_user.php?owner_id='+categ+'&t_plz='+pz+'&land='+landk+'&dist='+distkm+'&user_id='+u_id+'&n_ads='+num_ads;
window.imap.location = url; 
show2('map','blind');
fullw();
}



function show_map_nearby(adress){
if (screen.width>=1280){
var url ='google_map_search1.php?adr='+adress;
}else{
var url ='google_map_search2.php?adr='+adress;
}

window.imap.location = url; 
show2('map','blind');
fullw();
}

function hide_map_nearby(){
weg2('map','blind');
}


function conf_fav_stat(url,pars,ziel,msg){
do_qu(url,pars,ziel);
short_message(msg);
}

function short_message(msg){
openInfoDialog(msg,140,2.0);
}



// nur in item.php ?!
function save_ad_ax(form_id,url) {
replace_komma()
gen_google_adr(false);

weg2('map','blind');
$('goo_map_off').hide();
$('goo_map_on').show();

// nur für innovaEditor:
x1= idContentoEdit1.document.body.innerHTML;
$('ad_description').value = x1;
//

// prüfen ob Felder leer sind
ready_to_ajax =true;
tobeChecked="ad_title ad_description ad_preis ad_plz";

alle_felder = $(form_id).serialize();
var splitF = alle_felder.split('&');

for(i=0;i<splitF.length;i++)
{
	var curr_field = splitF[i].split('=');	
	if (tobeChecked.indexOf(curr_field[0])>-1) {
		if (curr_field[1]=='') {
		alert(splitF[i] +' leer ! Es kann nicht gespeichert werden.');
		ready_to_ajax =false;
		}
	}
}
if (ready_to_ajax) ax_subm_form(form_id,url);
}




// allgem.
function ax_subm_form(form_id,url){
var pars=$(form_id).serialize() 
var myAjax = new Ajax.Request(
	url, 
	{
		method: 'post', 
		parameters: pars, 
		onComplete: conf_data_saved,
		onFailure: fail_data_saved
	});
}

function conf_data_saved(originalRequest){
$('message_div').update('Die Daten wurden gespeichert.').show();
setTimeout("weg2('message_div','puff')",0)
}

function fail_data_saved(originalRequest){
$('message_div').update('Problem!<br>Die Daten wurden NICHT gespeichert.').show();
}


// alles zu my_items.php verschieben !!!
function conf_make_topad(para,ad_id,msg){
txt='<img src="layout_images/icons/ic_n_50/Chat.png" width="64" height="64" style="float:left;margin-right:9px"/> Inserat Nr. '+ad_id+' zu einem Top-Angebot machen?';
mldg='OK';
					
		var OK='Ja';	
		Dialog.confirm("<div style='padding:20px 10px 10px 10px ;font-size:1.3em;text-align:left'>"+txt+"</div>", 
		 {className: "dialog", width:410, okLabel: OK, 
		 buttonClass: "button1",
		 id: "myDialogId", destroyOnClose:true,
		 cancel:function(win) {return false;},
		 ok:function(win) {conf_make_topad_1(para,ad_id,msg); return true;}
		 });
}

function conf_make_topad_1(para,ad_id,msg){
//para= nummer im switch
//ad_id wird zu $para1 - weitere para sind möglich
//alert(msg); // wofür ist msg?
var url = 'ajax_source.php';
var pars = 'id=r'+para+'_'+ad_id;

var myAjax = new Ajax.Request(
	url, 
	{
		method: 'get', 
		parameters: pars, 
		onComplete: showResponse_conf_make_topad
	});
}


function showResponse_conf_make_topad(originalRequest)
{
var part = originalRequest.responseText.split("_");	
//alert(part[0]);
//xx=part[2];
if (part[2]=='OK'){
	ad_id = part[0];
	rest_premium = part[1];
	OK = part[2];
		
	txt='<img src="layout_images/icons/icons_neu/Yes.png" width="48" height="48" style="float:left;margin-right:12px;"/> <b class="blue">Inserat Nr. '+ad_id+' ist jetzt ein Top-Angebot.</b><br /><br /><br /><br />Sie verf&uuml;gen noch &uuml;ber '+rest_premium+' Credits f&uuml;r weitere Top-Angebote.';
	mldg='OK';
	h=190;
	alert_win(txt,mldg,h);
	
	//opt signal
	new_cont='<img src="layout_images/new/premium.gif" title="Ist ein TOP-Angebot." alt="Ist ein TOP-Angebot." hspace="5" />';
	$('mt'+ad_id).update(new_cont);
}else{

	if (part[0]=='alreadytopad'){
	txt='<img src="layout_images/icons/ic_n_50/Help1.png" width="64" height="64" style="float:left;margin-right:12px;"/> <b class="blue">Inserat Nr. '+ad_id+' ist bereits ein Top-Angebot!</b><br /><br /><br /><br /><br />Sie verf&uuml;gen noch unver&auml;ndert &uuml;ber '+rest_premium+' Credits f&uuml;r weitere Top-Angebote.';
	mldg='OK';
	h=190;
	alert_win(txt,mldg,h);
	}
	
	if (part[0]=='nocredits'){
	txt='<img src="layout_images/icons/ic_n_50/120px-Icon-warning.png" width="60" height="60" style="float:left;margin-right:12px;"/> <b class="blue">Hierf&uuml;r nicht mehr gen&uuml;gend Guthaben!</b><br /><br /><br /><br /><br />Sie verf&uuml;gen nicht mehr &uuml;ber <b>Credits f&uuml;r Top-Angebote</b>.<br>Bitte bestellen Sie zus&auml;tzliche I-Credits.';
	mldg='OK';
	h=220;
	alert_win(txt,mldg,h);
	}
	
	
}
		
}


function conf_make_boldad(para,ad_id,msg){
txt='<img src="layout_images/icons/ic_n_50/Chat.png" width="64" height="64" style="float:left;margin-right:9px"/> Inserat Nr. '+ad_id+' zu einem Inserat in Fett-Schrift machen?';
mldg='OK';
					
		var OK='Ja';	
		Dialog.confirm("<div style='padding:20px 10px 10px 10px ;font-size:1.3em;text-align:left'>"+txt+"</div>", 
		 {className: "dialog", width:410, okLabel: OK, 
		 buttonClass: "button1",
		 id: "myDialogId", destroyOnClose:true,
		 cancel:function(win) {return false;},
		 ok:function(win) {conf_make_boldad_1(para,ad_id,msg); return true;}
		 });
}


function conf_make_boldad_1(para,ad_id,msg){
var url = 'ajax_source.php';
var pars = 'id=r'+para+'_'+ad_id;

var myAjax = new Ajax.Request(
	url, 
	{
		method: 'get', 
		parameters: pars, 
		onComplete: showResponse_conf_make_boldad
	});
}


function showResponse_conf_make_boldad(originalRequest)
{
var part = originalRequest.responseText.split("_");	
if (part[2]=='OK'){
	ad_id = part[0];
	rest_bold = part[1];
	OK = part[2];
		
	txt='<img src="layout_images/icons/icons_neu/Yes.png" width="48" height="48" style="float:left;margin-right:12px;"/> <b class="blue">Inserat Nr. '+ad_id+' ist jetzt ein Inserat in Fett-Schrift.</b><br /><br /><br /><br />Sie verf&uuml;gen noch &uuml;ber '+rest_bold+' Credits f&uuml;r weitere Inserate in Fett-Schrift.';
	mldg='OK';
	h=190;
	alert_win(txt,mldg,h);
	
	//opt signal
	new_cont='<img src="layout_images/new/premium.gif" title="Ist ein TOP-Angebot." alt="Ist ein TOP-Angebot." hspace="5" />';
	$('mt'+ad_id).update(new_cont);
}else{

	if (part[0]=='alreadyboldad'){
	txt='<img src="layout_images/icons/ic_n_50/Help1.png" width="64" height="64" style="float:left;margin-right:12px;"/> <b class="blue">Inserat Nr. '+ad_id+' ist bereits ein Inserat in Fett-Schrift!</b><br /><br /><br /><br /><br />Sie verf&uuml;gen noch unver&auml;ndert &uuml;ber '+rest_bold+' Credits f&uuml;r weitere Inserate in Fett-Schrift.';
	mldg='OK';
	h=190;
	alert_win(txt,mldg,h);
	}
	
	if (part[0]=='nocredits'){
	txt='<img src="layout_images/icons/ic_n_50/120px-Icon-warning.png" width="60" height="60" style="float:left;margin-right:12px;"/> <b class="blue">Hierf&uuml;r nicht mehr gen&uuml;gend Guthaben!</b><br /><br /><br /><br /><br />Sie verf&uuml;gen nicht mehr &uuml;ber <b>Credits f&uuml;r Inserate in Fett-Schrift</b>.<br>Bitte bestellen Sie zus&auml;tzliche I-Credits.';
	mldg='OK';
	h=220;
	alert_win(txt,mldg,h);
	}
	
	
}
		
}

// ende my_items.php




function request_ajax_source(para){

var url = 'ajax_source.php';
var pars = 'id='+para;
var myAjax = new Ajax.Request(
	url, 
	{
		method: 'get', 
		parameters: pars, 
		onComplete: showResponse_coo
	});
} 





String.prototype.htmlEntities = function () { 
//usage:
//var tmp = '<html><head></head>';
//var safe= tmp.htmlEntities(); // Returns ““&lt;html&gt;&lt;head&gt;&lt;/head&gt;””

return this.replace(/&/g,'&amp;').replace(/</g,'&lt;').replace(/>/g,'&gt;');
};

function set_coo(bool,what,expire){
//true = hide
if(bool) {bool=0}else{bool=1}
setCookie(what,bool,expire);
}


//http://www.hunlock.com/blogs/Ten_Javascript_Tools_Everyone_Should_Have
//http://www.hunlock.com/blogs/Cookie_Monsters_Inc with samples usage inkl. PHP
function cookiesAllowed() {
 setCookie('checkCookie', 'test', 1);
 if (getCookie('checkCookie')) {
  deleteCookie('checkCookie');
  return true;
 }
 return false;
}

function setCookie(name,value,expires, options) {
 if (options===undefined) { options = {}; }
 if ( expires ) {
  var expires_date = new Date();
  expires_date.setDate(expires_date.getDate() + expires)
 }
 document.cookie = name+'='+escape( value ) +
  ( ( expires ) ? ';expires='+expires_date.toGMTString() : '' ) + 
  ( ( options.path ) ? ';path=' + options.path : '' ) +
  ( ( options.domain ) ? ';domain=' + options.domain : '' ) +
  ( ( options.secure ) ? ';secure' : '' );
}

function getCookie( name ) {
 var start = document.cookie.indexOf( name + "=" );
 var len = start + name.length + 1;
 if ( ( !start ) && ( name != document.cookie.substring( 0, name.length ) ) ) {
  return null;
 }
 if ( start == -1 ) return null;
 var end = document.cookie.indexOf( ';', len );
 if ( end == -1 ) end = document.cookie.length;
 return unescape( document.cookie.substring( len, end ) );
}

function deleteCookie( name, path, domain ) {
 if ( getCookie( name ) ) document.cookie = name + '=' +
  ( ( path ) ? ';path=' + path : '') +
  ( ( domain ) ? ';domain=' + domain : '' ) +
  ';expires=Thu, 01-Jan-1970 00:00:01 GMT';
}


// trim
String.prototype.trim = function() {
 return this.replace(/^\s+|\s+$/g,"");
}
String.prototype.ltrim = function() {
 return this.replace(/^\s+/g,"");
}
String.prototype.rtrim = function() {
 return this.replace(/\s+$/g,"");
}

function Right(str, n){
 if (n <= 0){
  return "";
 }else{ 
	if (n > String(str).length)
  {return str;
 }else {
  var iLen = String(str).length;
  return String(str).substring(iLen, iLen - n);
	 }
 }
}

// sort array
Array.prototype.sortNum = function() {
 return this.sort( function (a,b) { return a-b; } );
}

// format numers
function formatNumber(num,prefix){
 prefix = prefix || '';
 num += '';
 var splitStr = num.split('.');
 var splitLeft = splitStr[0];
 var splitRight = splitStr.length > 1 ? '.' + splitStr[1] : '';
 var regx = /(\d+)(\d{3})/;
 while (regx.test(splitLeft)) {
  splitLeft = splitLeft.replace(regx, '$1' + ',' + '$2');
 }
 return prefix + splitLeft + splitRight;
}
function unformatNumber(num) {
 return num.replace(/([^0-9\.\-])/g,'')*1;
}

function confirm_goto(url){
txt='<img src="layout_images/icons/ic_n_50/Chat.png" width="64" height="64" style="float:left;margin-right:9px"/>';
txt += 'Wirklich l'+unescape("%F6")+'schen? ';				
		var OK='Ja, l&ouml;schen';	
		Dialog.confirm("<div style='padding:20px 10px 10px 10px ;font-size:1.3em;text-align:left'>"+txt+"</div>", 
		 {className: "dialog", width:410, okLabel: OK, 
		 buttonClass: "button1",
		 id: "myDialogId", destroyOnClose:true,
		 cancel:function(win) {return false;},
		 ok:function(win) {goto(url); return true;}
		 });
}

function goto(url){window.location.href = url;}

function this_goto(url){
//alert(url);
//window.location.href = url;
//$('win341654_content').location.href = url;
url1 = escape(url);

//$('win341654_content').location.href = url;
//win341654_content.location.href = url;
win341654_content.location = url1;

}


function confirm_win(txt,OK,ex){
Dialog.confirm("<div style='padding:20px 10px 10px 10px ;font-size:1.3em;text-align:left'>"+txt+"</div>", 
    {className: "dialog", width:400, okLabel: OK, 
    buttonClass: "button1",
    id: "myDialogId",
    cancel:function(win) {debug("cancel");},
    ok:function(win) {exec(ex); return true;}
    });
// function exec(ex) gelöscht
}






function tobe_reg() {
txt='<img src="layout_images/icons/ic_n_50/Chat.png" width="64" height="64" style="float:left;margin: 0px 14px 10px 0px"/>Hier f&uuml;r m&uuml;ssen Sie angemeldet sein. Bitte gehen Sie zum <a href="member_login.php">Login</a> oder <a href="register.php">registrieren</a> Sie sich.<br><br>Die Registrierung ist gratis und unverbindlich und bietet Ihnen viele Vorteile wie z.B. das Sammeln von Favoriten.<br><br>Au&szlig;erdem k&ouml;nnen Sie dann sofort gratis Inserate aufgeben.';
mldg='OK';
h=240;
alert_win(txt,mldg,h);
}

// message
function alert_win2(txt,mldg,h,w){
img='<img src="layout_images/icons/ic_n_50/Chat.png" width="64" height="64" style="float:left;margin: 0px 14px 10px 0px"/>';
txt=img+txt;
alert_win(txt,mldg,h,w)
}

//AL
function alert_win_AL(txt,mldg,h,w){
img='<img src="layout_images/icons/ic_n_50/120px-Icon-warning.png" width="60" height="60" style="float:left;margin: 0px 14px 10px 0px"/>';
txt=img+txt;
alert_win(txt,mldg,h,w)
}

//OK
function alert_win_OK(txt,mldg,h,w){
img='<img src="layout_images/icons/icons_neu/Yes.png" width="48" height="48" style="float:left;margin: 0px 14px 10px 0px"/>';
txt=img+txt;
alert_win(txt,mldg,h,w)
}


function alert_win(txt,mldg,h,w,t){
if (t==undefined) t='';
if (h==undefined) h=145;
if (w==undefined) w=400;
if (mldg==undefined) mldg='OK';
Dialog.alert("<div class='alert_win'>"+txt+"</div>", 
{className: "dialog", buttonClass: "button1", title:t, width:w, height:h, okLabel: mldg, ok:function(win) {return true;}});
}





var timeout;
function openInfoDialog(txt,ht,tout) {
fullw();
 Dialog.info("<div style='padding:20px 10px 10px 10px ;font-size:1.5em;text-align:center;color:#009;'>"+txt+"<br><br><div align=\"center\"><img src=\"layout_images/icons/anim/loading.gif\" width=\"32\" height=\"32\"></div></div>",
    {className: "dialog", width:400, height:ht, showProgress: true});
 timeout=tout;
 setTimeout(infoTimeout, 1000)
}

function infoTimeout() {
 timeout--;
 if (timeout >0) {
 // Dialog.setInfoMessage("Test of info panel, it will close <br />in " + timeout + "s ...")
 setTimeout(infoTimeout, 1000)
 }
 else
 Dialog.closeInfo()
}





function test(){
//http://www.sergiopereira.com/articles/prototype.js.html
		var d = $('myDiv');
		alert(d.innerHTML);
		d.hide();
		d.show();
		d.addClassName('active');

//change the text, the CSS class, and make the element visible			
$('messageDiv').update('Your order was accepted.').addClassName('operationOK').show();				

}


function open_premium_pack()
{
fullw();
var win123 = new Window(
{
className: "mac_os_x", 
width:770, height:625, zIndex: 100, 
resizable: true, 
title: "Diese M&ouml;glichkeiten bietet Ihnen ein Premium-Paket:", 
showEffect:Effect.Appear, hideEffect: Effect.Fade,
destroyOnClose:true,
draggable:false, 
wiredDrag: false});

$url='include_frags/premium_pack.htm';
win123.setAjaxContent($url,{method:'get'},{showCentered:true},{showModal:true});
}



function open_contact_owner(self, uid){
fullw();
var win346 = new Window(
{

className: "mac_os_x", 
width:705, height:480, zIndex: 100, 
resizable: true, 
title: "Support:", 
showEffect:Effect.Appear, hideEffect: Effect.Fade, 
destroyOnClose:true,
draggable:false, 
wiredDrag: false});

$url='form_ajax_contact_owner.php?re='+self+'&u_id='+uid;
win346.setAjaxContent($url,{method:'get'},{showCentered:true},{showModal:true});
}


function open_premium_support(self, uid){
fullw();
var win346 = new Window(
{
className: "mac_os_x", 
width:705, height:480, zIndex: 100, 
resizable: true, 
title: "Premium-Support:", 
showEffect:Effect.Appear, hideEffect: Effect.Fade, 
destroyOnClose:true,
draggable:false, 
wiredDrag: false});

$url='form_ajax_contact_owner_premium.php?re='+self+'&u_id='+uid;
win346.setAjaxContent($url,{method:'get'},{showCentered:true},{showModal:true});
}


function open_mein_guthaben(us_id){
//fullw();
show_ax_img=true;
Element.show('systemWorking1');
var win348 = new Window(
{
className: "mac_os_x", 
width:760, height:560, zIndex: 100, 
resizable: true, 
title: "Mein Guthaben und Inserate-Statistik:", 
showEffect:Effect.Appear, hideEffect: Effect.Fade, 
destroyOnClose:true,
draggable:false, 
wiredDrag: false});

$url='form_mein_guthaben.php?user_id='+us_id;

//mit opt: http://wiki.script.aculo.us/scriptaculous/show/Ajax.Request
var opt = {
 method: 'get',
 onSuccess: function(stop_ax_img) {
 }
}

win348.setAjaxContent($url,opt,{showCentered:true},{showModal:true});
}




function win1()
{
 var win = new Window({className: "alphacube", title: "Sample", width:250, height:150, top:0, left: 1, parent:$('container')}); 
 win.getContent().innerHTML = "<h1>Constraint inside a div !!</h1>constraint: {left:10, right:20}"; 

 win.setDestroyOnClose(); 
 win.show();
 win.setConstraint(true, {left:10, right:20});
 win.toFront();
}





// in upload docs und in member_change
function conf_upload_doc_nozip(file)
{
if (file==='') {
	alert_win2('Bitte eine Datei ausw&auml;hlen mit Durchsuchen...','OK',120,400);
	return false;
}else{
	$dot_pos =file.lastIndexOf('.');
	$file_type=file.substr($dot_pos,4);
	$file_type=$file_type.toLowerCase();
		if ($file_type=='.pdf' || $file_type=='.doc' ){
			return true;
		}else{
			alert_win2('Der Upload von '+$file_type+' ist hier nicht erlaubt! <br /><br />Bitte beachten Sie die Hinweise.','OK',120,400);
			return false;
		}
}
}







// ä '+unescape("%E4")+'
// ö '+unescape("%F6")+'
// ü '+unescape("%FC")+'

// Ä '+unescape("%C4")+'
// Ö '+unescape("%D6")+'
// Ü '+unescape("%DC")+'
// ß '+unescape("%DF")+'

var popUpWin=0;

function popUpWindow(URLStr, left, top, width, height)
{
 if(popUpWin)
 {
 if(!popUpWin.closed) {popUpWin.close();}
 }
 popUpWin = open(URLStr, 'popUpWin', 'toolbar=no,location=yes,directories=no,status=no,menubar=no,scrollbars=no,resizable=yes,copyhistory=yes,width='+width+',height='+height+',left='+left+', top='+top+',screenX='+left+',screenY='+top+'');
}

function popUpNewWin(url)
{
if (url !== "") {
 if(popUpWin)
 {
 if(!popUpWin.closed) {popUpWin.close();}
 }
 popUpWin = open(url, 'popUpWin', 'toolbar=yes,location=yes,directories=yes,status=yes,menubar=yes,scrollbars=yes,resizable=yes,copyhistory=no');
}else{
	alert_win2('Das Feld ist leer!','OK',120,400);
}
}







function getCATPAGE(catid,level) {
if (level===undefined) level='';

  if (catid !== 0) {
	window.location = level+'index.php?catid=' + catid;
  }
}

function getCATPAGE_parent(catid) {
  if (catid !== 0) {
	window.parent.location = 'index.php?catid=' + catid;
  }
}






function openWin2(url,w,h)
{
	aWindow=window.open(url,"","toolbar=no,width="+w+",height="+h+",status=no,scrollbars=no,resize=no,menubars=no");
	aWindow.focus();
}
function openWin3(url,w,h,title)
{
	aWindow=window.open(url,title,"toolbar=no,width="+w+",height="+h+",left=10,top=10,status=no,scrollbars=yes,resize=no,menubars=no");
	aWindow.focus();
}



function openBookmark(aURL)
{
	aWindow=window.open(aURL,"","toolbar=no,width=400,height=100,status=no,scrollbars=no,resize=no,menubars=no");
	aWindow.focus();
}
function openVideo(aURL)
{
	aWindow=window.open(aURL,"","toolbar=no,width=400,height=400,status=no,scrollbars=no,resize=no,menubars=no");
	aWindow.focus();
}
function openMatchUs(aURL)
{
	aWindow=window.open(aURL,"","toolbar=no,width=400,height=200,status=no,scrollbars=no,resize=no,menubars=no");
	aWindow.focus();
}
function submitFormTA() 
{
	updateRTE('ta');
	return true;
}



function checkSelectedOption(value,form,warning)
{
	if( value != -1 )
	{
		form.catid.value = value;
		form.submit();
	}
	else
	{
		alert(warning);
	}
}

/// Gast PLZ Cookie
function clear_plz(){
$('plz').value='';
var land = $('map_s').getInputs('radio', 'land').find(function(r){return r.checked}) ;
	$('lkz').update(land.value);
	if ( land.value =='CH' ) {$('u_plz_ort_f').update('<img src="layout_images/flags/land/ch.gif" width="20" height="15" hspace="6" />');}
	if ( land.value =='DE' ) {$('u_plz_ort_f').update('<img src="layout_images/flags/land/d.gif" width="20" height="15" hspace="6" />');}
	if ( land.value =='AT' ) {$('u_plz_ort_f').update('<img src="layout_images/flags/land/at.gif" width="20" height="15" hspace="6" />');}
	$('u_plz_ort').update('Bitte PLZ eingeben...');
		
		if ( land.value =='CH' ) {
		$('CH').style.textDecoration='underline';
		$('DE').style.textDecoration='none';

		$('AT').style.textDecoration='none';
		}
		if ( land.value =='DE' ) {
		$('CH').style.textDecoration='none';
		$('DE').style.textDecoration='underline';
		$('AT').style.textDecoration='none';
		}
		if ( land.value =='AT' ) {
		$('CH').style.textDecoration='none';
		$('DE').style.textDecoration='none';
		$('AT').style.textDecoration='underline';
		}
}


function open_plz_form(ad_id){
//alert(ad_id);
ttl='Bitte geben Sie einmalig Ihre PLZ ein:';
var win851 = new Window(
{
className: "mac_os_x", 
width:690, height:120, zIndex: 100, 
resizable: true, 
title: ttl, 
showEffect:Effect.Appear, hideEffect: Effect.Shrink,
destroyOnClose:true,
draggable:false, 
wiredDrag: false});

$url='form_get_plz.php?ad_id='+ad_id;
win851.setAjaxContent($url,{method:'get'},{showCentered:true},{showModal:true});
}


function get_map_detail(catid,catname,brws){
	if (getCookie('plz')){
		c=getCookie('plz');
		var part = c.split("-");
		var land = part[0];
		var plz = part[1];
		
		open_ad_map(catid, plz, land,49,0,100000001,0,catname,brws)
	}else{
		get_plz();
	}
}


function get_plz(){
var land = $('map_s').getInputs('radio', 'land').find(function(r){return r.checked}) ;
	var weiter = true;
	var plz = $('plz').value;
	
		if ( land.value =='CH' && plz.length!=4 ) {
			txt='<img src="layout_images/icons/ic_n_50/Chat.png" width="64" height="64" style="float:left;"/>PLZs in der Schweiz haben 4 Stellen!<br><br>Bitte korrigieren Sie die Eingabe.';
			mldg='OK';
			h=140;
			alert_win(txt,mldg,h);
			weiter=false;
		}
		if ( land.value =='AT' && plz.length!=4 ) {
			txt='<img src="layout_images/icons/ic_n_50/Chat.png" width="64" height="64" style="float:left;"/>PLZs in &Ouml;sterreich haben 4 Stellen!<br><br>Bitte korrigieren Sie die Eingabe.';
			mldg='OK';
			h=140;
			alert_win(txt,mldg,h);
			weiter=false;
		}
		if ( land.value =='DE' && plz.length!=5 ) {
			txt='<img src="layout_images/icons/ic_n_50/Chat.png" width="64" height="64" style="float:left;"/>PLZs in Deutschland haben 5 Stellen!<br><br>Bitte korrigieren Sie die Eingabe.';
			mldg='OK';
			h=140;
			alert_win(txt,mldg,h);
			weiter=false;
		}
	if (weiter){
		lookup_ort();
	}
}

function lookup_ort(){
	var land = $('map_s').getInputs('radio', 'land').find(function(r){return r.checked}) ;
	var plz = $('plz').value;
		
	var other_countries = 0;
		if (other_countries==0) {
		
		if ( land.value =='CH' ) {var url = 'ax_plz_ch_ort.php';}
		if ( land.value =='DE' ) {var url = 'ax_plz_de_ort.php';}		
		if ( land.value =='AT' ) {var url = 'ax_plz_at_ort.php';}		
		
		var pars = 'plz='+escape(plz);
			var myAjax = new Ajax.Request(
			url, 
			{
				method: 'get', 
				parameters: pars, 
				onComplete: showResponse,
				onFailure: fail_retr_ort
			});
		}		
}

function showResponse(originalRequest){

if ($('popup')) var popup = $('popup').value;
if ($('ad_id')) var ad_id = $('ad_id').value;
if ($('brws')) var brws = $('brws').value;
if ($('ad_title')) var ad_title = $('ad_title').value;


if (get_current_page_name()=='detail.php'){
	ad_id=$('detail_cat_id').value;
	ad_title=$('detail_cat_name').value;	
}else{
	if (ad_id==undefined) ad_id=-1;
}
if (popup==undefined) popup=1;

	var part = originalRequest.responseText.split("_");
			var land = $('map_s').getInputs('radio', 'land').find(function(r){return r.checked}) ;
			var f_land = land.value; 
			var f_plz = $('plz').value; 
			var f_ort = part[0];
			var f_kant = part[1];
		 			
			$('u_plz_ort').update(f_plz+' '+f_ort);

		y=getCookie('plz');
		if (y!=f_land+'-'+f_plz || ad_id==0){	
			if (part[0]!='' && part[1]!='undefined'){
					var full = '<img src="layout_images/icons/ic_n_50/Chat.png" width="64" height="64" style="float:left;margin-right:12px"/><b class="blue">'+f_land+'-'+f_plz+' '+f_ort+' - '+f_kant+'</b><br><br>Ist das korrekt?';
						var txt = full;
					var OK='Ja';
					if (ad_id==0){
						if (popup==0){	
							Dialog.confirm("<div class='dia_win'>"+txt+"</div>", 
							 {className: "dialog", width:460, okLabel: OK, 
							 buttonClass: "button1",
							 id: "myDialogId", destroyOnClose:true,
							 cancel:function(win) {return false;},
							 ok:function(win) {set_plz_cook(); window.location.reload(); return true;}
							 });
						}else{
							 
							Dialog.confirm("<div class='dia_win'>"+txt+"</div>", 
							 {className: "dialog", width:460, okLabel: OK, 
							 buttonClass: "button1",
							 id: "myDialogId", destroyOnClose:true,
							 cancel:function(win) {return false;},
							 ok:function(win) {set_plz_cook();open_ad_map(ad_id, f_plz, f_land,49,0,100000001,0,ad_title,brws); return true;}
							 });					

						} 
					
					}else{
						if (popup==0){	
							Dialog.confirm("<div class='dia_win'>"+txt+"</div>", 
							 {className: "dialog", width:460, okLabel: OK, 
							 buttonClass: "button1",
							 id: "myDialogId", destroyOnClose:true,
							 cancel:function(win) {return false;},
							 ok:function(win) {show_map_nearby_ads(-1, f_plz, f_land,49,0,100000001,0,''); set_plz_cook(); return true;}
							 });
						}else{
		 //alert('2 PLZ: '+ f_plz);
		 //alert('2 Land: '+ f_land);						
							Dialog.confirm("<div class='dia_win'>"+txt+"</div>", 
							 {className: "dialog", width:460, okLabel: OK, 
							 buttonClass: "button1",
							 id: "myDialogId", destroyOnClose:true,
							 cancel:function(win) {return false;},
							 ok:function(win) {open_ad_map(ad_id, f_plz, f_land,49,0,100000001,0,ad_title,brws); set_plz_cook(); return true;}
							 });					
						} 
					}								
			}else{
					txt='<img src="layout_images/icons/ic_n_50/Chat.png" width="64" height="64" style="float:left;"/>'+f_land+'-'+f_plz+' scheint einen ung&uuml;ltige PLZ zu sein!!<br><br>Bitte korrigieren Sie die Eingabe.';
					mldg='OK';
					h=140;
					alert_win(txt,mldg,h);					
			}
		}else{
		 //show_map_nearby_ads(-1, f_plz, f_land,120,0,100000001,0);
		 ad_title='Neueste Ads in meiner N&auml;he';
			open_ad_map(ad_id, f_plz, f_land,49,0,100000001,0,ad_title,brws);
		}
}	

function fail_retr_ort(){alert('Ajax-Fehler');}	

function check_plz_cook(){
	if (!getCookie('plz')){
		set_plz_cook();
	}else{
		var land = $('map_s').getInputs('radio', 'land').find(function(r){return r.checked}) ;
		var f_land = land.value; 
		var plz = $('plz').value;
		var f_plz =f_land+'-'+plz;
		alert(getCookie('plz'));
	
	}
}

	
function set_plz_cook(){
	var land = $('map_s').getInputs('radio', 'land').find(function(r){return r.checked}) ;
	var f_land = land.value; 
	var plz = $('plz').value;
	var f_plz =f_land+'-'+plz;
	setCookie('plz',f_plz,3000);
}

// ende gast plz cookie

function show_search_res_list2(full_url){
	top.Windows.close('win341654')
	//alert(full_url);
	//full_url=escape(full_url);
	show_search_res_list(full_url);
}

function show_search_res_list(full_url){
//Window.keepMultiModalWindow=false;
	show_ax_img=true;
	Element.show('systemWorking1');
	fullw(); 
	my_width=getWidth();
	my_height=getHeight(); 

	my_width=Math.round(my_width-100); 
	my_height=Math.round(my_height-100);
	var win341 = new Window(
	{
	id:"win341654",
	className: "mac_os_x", 
	width:my_width, height:my_height, zIndex: 100, 
	resizable: true, 
	title: "Treffer-Liste gem&auml;&szlig; Ihren Such-Kriterien...", 
	showEffect:Effect.Appear, hideEffect: Effect.Fade, 
	destroyOnClose:true,
	draggable:true,
	wiredDrag: false});
	url =full_url;
		var opt = {
			method: 'get',
			onSuccess: function(stop_ax_img) {
			}
		}	
	win341.setAjaxContent(url,{method:'get'},{showCentered:true},{showModal:true});
}

function show_cats(){
	//show_ax_img=true;
	Element.show('systemWorking1');
	//start_ax_img();
	//fullw(); showEffect:Effect.Appear, hideEffect: Effect.Fade,  
	my_width=getWidth();
	my_height=getHeight(); 

	my_width=900; 
	my_height=Math.round(my_height-100);

	var win341 = new Window(
	{
	className: "mac_os_x", 
	width:my_width, height:my_height, zIndex: 100, 
	resizable: true, 
	title: "Kategorie oder Unter-Kategorie &ouml;ffnen...", 
	showEffect:Effect.Appear, hideEffect: Effect.Fade, 
	destroyOnClose:true,
	draggable:true, 
	wiredDrag: false});
	url =lv+'catcol_wrap.php';
		var opt = {
			method: 'get',
			onSuccess: function(stop_ax_img) {
			}
		}	
	win341.setAjaxContent(url,opt,{showCentered:true},{showModal:true});

setTimeout("Element.hide('systemWorking1')",10000);
//setTimeout('stop_ax_img()',5000);

	
}

function get_current_page_name(){
var sPath = window.location.pathname;
//var sPage = sPath.substring(sPath.lastIndexOf('\\') + 1);
var sPage = sPath.substring(sPath.lastIndexOf('/') + 1);
return sPage;
}



//http://www.bennadel.com/blog/142-Ask-Ben-Javascript-String-Replace-Method.htm
// Replaces all instances of the given substring.
// Call: strReplaceAll2 = strText.replaceAll( "th", "[X]" ) 
String.prototype.replaceAll = function( 
strTarget, // The substring you want to replace
strSubString // The string you want to replace in.
){
var strText = this;
var intIndexOfMatch = strText.indexOf( strTarget );
while (intIndexOfMatch != -1){
strText = strText.replace( strTarget, strSubString )
intIndexOfMatch = strText.indexOf( strTarget );
} 
return( strText );
}


// nach common1


function do_qu(url,pars,ziel){
show_ax_img=true;
var ur = url;
var pa = pars;
var ta = ziel;
var myAjax = new Ajax.Updater(ta, ur, {method: 'get', parameters: pa});
}

function no_favs(){
txt='<img src="layout_images/icons/ic_n_50/Chat.png" width="64" height="64" style="float:left;margin: 0px 14px 10px 0px"/>Um Favoriten zu speichern m&uuml;ssen Sie angemeldet sein. Bitte gehen Sie zum <a href="member_login.php">Login</a> oder <a href="register.php">registrieren</a> Sie sich.<br><br>Die Registrierung ist gratis und unverbindlich und bietet Ihnen viele Vorteile wie z.B. das Sammeln von Favoriten.<br><br>Au&szlig;erdem k&ouml;nnen Sie dann sofort gratis Inserate aufgeben.';
mldg='OK';
					
		var OK='Registrieren';	
		Dialog.confirm("<div style='padding:20px 10px 10px 10px ;font-size:1.3em;text-align:left;'>"+txt+"</div>", 
		 {className: "dialog", width:410, okLabel: OK, 
		 buttonClass: "button1",
		 id: "myDialogId", destroyOnClose:true,
		 cancel:function(win) {return false;},
		 ok:function(win) {goto('register.php'); return true;}
		 });
}


function getHeight() {
 var myWidth = 0, myHeight = 0;
 if( typeof( window.innerWidth ) == 'number' ) {
 myWidth = window.innerWidth;
 myHeight = window.innerHeight;
 } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
 myWidth = document.documentElement.clientWidth;
 myHeight = document.documentElement.clientHeight;
 } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
 myWidth = document.body.clientWidth;
 myHeight = document.body.clientHeight;
 }

 return myHeight;
}

function getWidth() {
 var myWidth = 0, myHeight = 0;
 if( typeof( window.innerWidth ) == 'number' ) {
 myWidth = window.innerWidth;
 myHeight = window.innerHeight;
 } else if( document.documentElement && ( document.documentElement.clientWidth || document.documentElement.clientHeight ) ) {
 myWidth = document.documentElement.clientWidth;
 myHeight = document.documentElement.clientHeight;
 } else if( document.body && ( document.body.clientWidth || document.body.clientHeight ) ) {
 myWidth = document.body.clientWidth;
 myHeight = document.body.clientHeight;
 }

 return myWidth;
}

function getit(url) {
  if (url !== "") {
	window.location = url;
  }
}

function getit_from_select(url,option) {
//alert(url+option);
//alert(option);

  if (url !== "") {
	window.location = url+option;
  }
}

function getit_from_select2(url,option) {
  if (url !== "") {
	//window.location = url+option;
	show_search_res_list2(url+option);
  }
}


function clearfield(id) {
$(id).value = "";
}


function fillfield(id, text) {
if ($(id).value === "") {
$(id).value = text;
}
}

function show_soc_bm(){

url ='http://www.clipad.net/ads/ch/music_dev/include_frags/social_bm_neu_cont.php';
window.imapsb.location = url; 
show2('soc_bm','blind');
$('trig_show').hide();
$('trig_hide').show();
}
function hide_soc_bm(){
weg2('soc_bm','blind');
$('trig_hide').hide();
$('trig_show').show();
}