var Prototip={Version:"2.0.5"};var Tips={options:{images:"../images/prototip/",zIndex:6000}};Prototip.Styles={"default":{border:6,borderColor:"#c7c7c7",className:"default",closeButton:false,hideAfter:false,hideOn:"mouseleave",hook:false,radius:6,showOn:"mousemove",stem:{height:12,width:15}},protoblue:{className:"protoblue",border:6,borderColor:"#116497",radius:6,stem:{height:12,width:15}},darkgrey:{className:"darkgrey",border:6,borderColor:"#363636",radius:6,stem:{height:12,width:15}},creamy:{className:"creamy",border:6,borderColor:"#ebe4b4",radius:6,stem:{height:12,width:15}},protogrey:{className:"protogrey",border:6,borderColor:"#606060",radius:6,stem:{height:12,width:15}}};eval(function(h,b,l,d,g,f){g=function(a){return(a<b?"":g(parseInt(a/b)))+((a=a%b)>35?String.fromCharCode(a+29):a.toString(36))};if(!"".replace(/^/,String)){while(l--){f[g(l)]=d[l]||g(l)}d=[function(a){return f[a]}];g=function(){return"\\w+"};l=1}while(l--){if(d[l]){h=h.replace(new RegExp("\\b"+g(l)+"\\b","g"),d[l])}}return h}('P.11(X,{5V:"1.6.0.3",3U:c(){8.3C("25");b(/^(6x?:\\/\\/|\\/)/.6i(e.9.W)){e.W=e.9.W}13{h A=/1P(?:-[\\w\\d.]+)?\\.4G(.*)/;e.W=(($$("4C 4y[2b]").3t(c(B){O B.2b.2k(A)})||{}).2b||"").3j(A,"")+e.9.W}b(25.2r.3e&&!17.3X.v){17.3X.34("v","5L:5y-5r-5k:5d");17.1f("3G:32",c(){17.4P().4I("v\\\\:*","4H: 30(#2Z#4D);")})}e.2p();r.1f(2S,"2R",8.2R)},3C:c(A){b((4v 2S[A]=="4p")||(8.2P(2S[A].4l)<8.2P(8["4i"+A]))){4g("X 6p "+A+" >= "+8["4i"+A]);}},2P:c(A){h B=A.3j(/4c.*|\\./g,"");B=6h(B+"0".6e(4-B.3g));O A.66("4c")>-1?B-1:B},62:$w("43 60"),1U:c(A){b(25.2r.3e){O A}A=A.2s(c(E,D){h B=P.2A(8)?8:8.m,C=D.5J;5E(C&&C!=B){5x{C=C.5t}5q(F){C=B}}b(C==B){O}E(D)});O A},37:c(A){O(A>0)?(-1*A):(A).5g()},2R:c(){e.4j()}});P.11(e,{1D:[],1c:[],2p:c(){8.2G=8.1t},1p:(c(A){O{1k:(A?"29":"1k"),1a:(A?"1S":"1a"),29:(A?"29":"1k"),1S:(A?"1S":"1a")}})(25.2r.3e),3D:{1k:"1k",1a:"1a",29:"1k",1S:"1a"},2f:{k:"31",31:"k",i:"1s",1s:"i",1Y:"1Y",1e:"1h",1h:"1e"},3A:{q:"1e",p:"1h"},2U:c(A){O!!23[1]?8.2f[A]:A},1n:(c(B){h A=s 4x("4w ([\\\\d.]+)").4u(B);O A?(3u(A[1])<7):10})(4n.4m),2N:(25.2r.4k&&!17.6w),34:c(A){8.1D.2L(A)},1J:c(A){h B=8.1D.3t(c(C){O C.m==$(A)});b(B){B.4f();b(B.1b){B.o.1J();b(e.1n){B.1v.1J()}}8.1D=8.1D.4b(B)}A.1P=2a},4j:c(){8.1D.3m(c(A){8.1J(A.m)}.1j(8))},2J:c(C){b(C==8.49){O}b(8.1c.3g===0){8.2G=8.9.1t;3i(h B=0,A=8.1D.3g;B<A;B++){8.1D[B].o.f({1t:8.9.1t})}}C.o.f({1t:8.2G++});b(C.T){C.T.f({1t:8.2G})}8.49=C},47:c(A){8.3f(A);8.1c.2L(A)},3f:c(A){8.1c=8.1c.4b(A)},46:c(){e.1c.1Q("V")},Y:c(B,F){B=$(B),F=$(F);h K=P.11({1g:{x:0,y:0},R:10},23[2]||{});h D=K.1z||F.2t();D.k+=K.1g.x;D.i+=K.1g.y;h C=K.1z?[0,0]:F.3H(),A=17.1E.2D(),G=K.1z?"20":"15";D.k+=(-1*(C[0]-A[0]));D.i+=(-1*(C[1]-A[1]));b(K.1z){h E=[0,0];E.q=0;E.p=0}h I={m:B.21()},J={m:P.2c(D)};I[G]=K.1z?E:F.21();J[G]=P.2c(D);3i(h H 3Q J){3O(K[H]){U"5w":U"5u":J[H].k+=I[H].q;18;U"5s":J[H].k+=(I[H].q/2);18;U"5p":J[H].k+=I[H].q;J[H].i+=(I[H].p/2);18;U"5o":U"5m":J[H].i+=I[H].p;18;U"5l":U"5j":J[H].k+=I[H].q;J[H].i+=I[H].p;18;U"5h":J[H].k+=(I[H].q/2);J[H].i+=I[H].p;18;U"5f":J[H].i+=(I[H].p/2);18}}D.k+=-1*(J.m.k-J[G].k);D.i+=-1*(J.m.i-J[G].i);b(K.R){B.f({k:D.k+"j",i:D.i+"j"})}O D}});e.2p();h 5c=59.3J({2p:c(C,E){8.m=$(C);b(!8.m){4g("X: r 58 56, 55 3J a 1b.");O}e.1J(8.m);h A=(P.2F(E)||P.2A(E)),B=A?23[2]||[]:E;8.1u=A?E:2a;b(B.28){B=P.11(P.2c(X.33[B.28]),B)}8.9=P.11(P.11({1m:10,1i:0,3k:"#4R",1o:0,u:e.9.u,19:e.9.4L,1B:!(B.1d&&B.1d=="1Z")?0.14:10,1C:10,1x:"1S",3B:10,Y:B.Y,1g:B.Y?{x:0,y:0}:{x:16,y:16},1K:(B.Y&&!B.Y.1z)?1l:10,1d:"2q",n:10,28:"2Z",15:8.m,12:10,1E:(B.Y&&!B.Y.1z)?10:1l,q:10},X.33["2Z"]),B);8.15=$(8.9.15);8.1o=8.9.1o;8.1i=(8.1o>8.9.1i)?8.1o:8.9.1i;b(8.9.W){8.W=8.9.W.2Y("://")?8.9.W:e.W+8.9.W}13{8.W=e.W+"4F/"+(8.9.28||"")+"/"}b(!8.W.4E("/")){8.W+="/"}b(P.2F(8.9.n)){8.9.n={R:8.9.n}}b(8.9.n.R){8.9.n=P.11(P.2c(X.33[8.9.28].n)||{},8.9.n);8.9.n.R=[8.9.n.R.2k(/[a-z]+/)[0].2e(),8.9.n.R.2k(/[A-Z][a-z]+/)[0].2e()];8.9.n.1I=["k","31"].3z(8.9.n.R[0])?"1e":"1h";8.1r={1e:10,1h:10}}b(8.9.1m){8.9.1m.9=P.11({2V:25.4B},8.9.1m.9||{})}8.1p=$w("4A 43").3z(8.m.4z.2e())?e.3D:e.1p;b(8.9.Y.1z){h D=8.9.Y.1q.2k(/[a-z]+/)[0].2e();8.20=e.2f[D]+e.2f[8.9.Y.1q.2k(/[A-Z][a-z]+/)[0].2e()].2B()}8.3y=(e.2N&&8.1o);8.3x();e.34(8);8.3w();X.11(8)},3x:c(){8.o=s r("S",{u:"1P"}).f({1t:e.9.1t});b(8.3y){8.o.V=c(){8.f("k:-3v;i:-3v;1O:2o;");O 8};8.o.Q=c(){8.f("1O:1c");O 8};8.o.1c=c(){O(8.2Q("1O")=="1c"&&3u(8.2Q("i").3j("j",""))>-4t)}}8.o.V();b(e.1n){8.1v=s r("4s",{u:"1v",2b:"4r:10;",4q:0}).f({2m:"2i",1t:e.9.1t-1,4o:0})}b(8.9.1m){8.24=8.24.2s(8.2O)}8.1q=s r("S",{u:"1u"});8.12=s r("S",{u:"12"}).V();b(8.9.19||(8.9.1x.m&&8.9.1x.m=="19")){8.19=s r("S",{u:"2j"}).26(8.W+"2j.2l")}},2H:c(){b(17.32){8.3r();8.3s=1l;O 1l}13{b(!8.3s){17.1f("3G:32",8.3r);O 10}}},3r:c(){$(17.2M).N(8.o);b(e.1n){$(17.2M).N(8.1v)}b(8.9.1m){$(17.2M).N(8.T=s r("S",{u:"6v"}).26(8.W+"T.6t").V())}h G="o";b(8.9.n.R){8.n=s r("S",{u:"6r"}).f({p:8.9.n[8.9.n.1I=="1h"?"p":"q"]+"j"});h B=8.9.n.1I=="1e";8[G].N(8.3p=s r("S",{u:"6q 2K"}).N(8.4e=s r("S",{u:"6o 2K"})));8.n.N(8.1T=s r("S",{u:"6n"}).f({p:8.9.n[B?"q":"p"]+"j",q:8.9.n[B?"p":"q"]+"j"}));b(e.1n&&!8.9.n.R[1].4d().2Y("6m")){8.1T.f({2m:"6l"})}G="4e"}b(8.1i){h D=8.1i,F;8[G].N(8.1W=s r("6j",{u:"1W"}).N(8.1V=s r("3n",{u:"1V 3l"}).f("p: "+D+"j").N(s r("S",{u:"2n 6g"}).N(s r("S",{u:"1X"}))).N(F=s r("S",{u:"6f"}).f({p:D+"j"}).N(s r("S",{u:"4a"}).f({1w:"0 "+D+"j",p:D+"j"}))).N(s r("S",{u:"2n 6d"}).N(s r("S",{u:"1X"})))).N(8.2W=s r("3n",{u:"2W 3l"}).N(8.2T=s r("S",{u:"2T"}).f("2I: 0 "+D+"j"))).N(8.48=s r("3n",{u:"48 3l"}).f("p: "+D+"j").N(s r("S",{u:"2n 6c"}).N(s r("S",{u:"1X"}))).N(F.6b(1l)).N(s r("S",{u:"2n 69"}).N(s r("S",{u:"1X"})))));G="2T";h C=8.1W.2X(".1X");$w("68 67 65 63").3m(c(I,H){b(8.1o>0){X.45(C[H],I,{1L:8.9.3k,1i:D,1o:8.9.1o})}13{C[H].2E("44")}C[H].f({q:D+"j",p:D+"j"}).2E("1X"+I.2B())}.1j(8));8.1W.2X(".4a",".2W",".44").1Q("f",{1L:8.9.3k})}8[G].N(8.1b=s r("S",{u:"1b "+8.9.u}).N(8.27=s r("S",{u:"27"}).N(8.12)));b(8.9.q){h E=8.9.q;b(P.61(E)){E+="j"}8.1b.f("q:"+E)}b(8.n){h A={};A[8.9.n.1I=="1e"?"i":"1s"]=8.n;8.o.N(A);8.2g()}8.1b.N(8.1q);b(!8.9.1m){8.3d({12:8.9.12,1u:8.1u})}},3d:c(E){h A=8.o.2Q("1O");8.o.f("p:1M;q:1M;1O:2o").Q();b(8.1i){8.1V.f("p:0");8.1V.f("p:0")}b(E.12){8.12.Q().42(E.12);8.27.Q()}13{b(!8.19){8.12.V();8.27.V()}}b(P.2A(E.1u)){E.1u.Q()}b(P.2F(E.1u)||P.2A(E.1u)){8.1q.42(E.1u)}8.1b.f({q:8.1b.41()+"j"});8.o.f("1O:1c").Q();8.1b.Q();h C=8.1b.21(),B={q:C.q+"j"},D=[8.o];b(e.1n){D.2L(8.1v)}b(8.19){8.12.Q().N({i:8.19});8.27.Q()}b(E.12||8.19){8.27.f("q: 3c%")}B.p=2a;8.o.f({1O:A});8.1q.2E("2K");b(E.12||8.19){8.12.2E("2K")}b(8.1i){8.1V.f("p:"+8.1i+"j");8.1V.f("p:"+8.1i+"j");B="q: "+(C.q+2*8.1i)+"j";D.2L(8.1W)}D.1Q("f",B);b(8.n){8.2g();b(8.9.n.1I=="1e"){8.o.f({q:8.o.41()+8.9.n.p+"j"})}}8.o.V()},3w:c(){8.3b=8.24.1y(8);8.40=8.V.1y(8);b(8.9.1K&&8.9.1d=="2q"){8.9.1d="1k"}b(8.9.1d==8.9.1x){8.1R=8.3Z.1y(8);8.m.1f(8.9.1d,8.1R)}b(8.19){8.19.1f("1k",c(E){E.26(8.W+"5Y.2l")}.1j(8,8.19)).1f("1a",c(E){E.26(8.W+"2j.2l")}.1j(8,8.19))}h C={m:8.1R?[]:[8.m],15:8.1R?[]:[8.15],1q:8.1R?[]:[8.o],19:[],2i:[]},A=8.9.1x.m;8.39=A||(!8.9.1x?"2i":"m");8.1N=C[8.39];b(!8.1N&&A&&P.2F(A)){8.1N=8.1q.2X(A)}h D={29:"1k",1S:"1a"};$w("Q V").3m(c(H){h G=H.2B(),F=(8.9[H+"3Y"].38||8.9[H+"3Y"]);8[H+"3W"]=F;b(["29","1S","1k","1a"].2Y(F)){8[H+"3W"]=(8.1p[F]||F);8["38"+G]=X.1U(8["38"+G])}}.1j(8));b(!8.1R){8.m.1f(8.9.1d,8.3b)}b(8.1N){8.1N.1Q("1f",8.5X,8.40)}b(!8.9.1K&&8.9.1d=="1Z"){8.2u=8.R.1y(8);8.m.1f("2q",8.2u)}8.3V=8.V.2s(c(G,F){h E=F.5P(".2j");b(E){E.5N();F.5M();G(F)}}).1y(8);b(8.19||(8.9.1x&&(8.9.1x.m==".2j"))){8.o.1f("1Z",8.3V)}b(8.9.1d!="1Z"&&(8.39!="m")){8.2C=X.1U(c(){8.1G("Q")}).1y(8);8.m.1f(8.1p.1a,8.2C)}h B=[8.m,8.o];8.36=X.1U(c(){e.2J(8);8.2v()}).1y(8);8.35=X.1U(8.1C).1y(8);B.1Q("1f",8.1p.1k,8.36).1Q("1f",8.1p.1a,8.35);b(8.9.1m&&8.9.1d!="1Z"){8.2z=X.1U(8.3T).1y(8);8.m.1f(8.1p.1a,8.2z)}},4f:c(){b(8.9.1d==8.9.1x){8.m.1A(8.9.1d,8.1R)}13{8.m.1A(8.9.1d,8.3b);b(8.1N){8.1N.1Q("1A")}}b(8.2u){8.m.1A("2q",8.2u)}b(8.2C){8.m.1A("1a",8.2C)}8.o.1A();8.m.1A(8.1p.1k,8.36).1A(8.1p.1a,8.35);b(8.2z){8.m.1A(8.1p.1a,8.2z)}},2O:c(C,B){b(!8.1b){b(!8.2H()){O}}8.R(B);b(8.2y){O}13{b(8.3S){C(B);O}}8.2y=1l;h D={2h:{1F:22.1F(B),1H:22.1H(B)}};h A=P.2c(8.9.1m.9);A.2V=A.2V.2s(c(F,E){8.3d({12:8.9.12,1u:E.5I});8.R(D);(c(){F(E);h G=(8.T&&8.T.1c());b(8.T){8.1G("T");8.T.1J();8.T=2a}b(G){8.Q()}8.3S=1l;8.2y=2a}.1j(8)).1B(0.6)}.1j(8));8.5H=r.Q.1B(8.9.1B,8.T);8.o.V();8.2y=1l;8.T.Q();8.5F=(c(){s 5B.5A(8.9.1m.30,A)}.1j(8)).1B(8.9.1B);O 10},3T:c(){8.1G("T")},24:c(A){b(!8.1b){b(!8.2H()){O}}8.R(A);b(8.o.1c()){O}8.1G("Q");8.5z=8.Q.1j(8).1B(8.9.1B)},1G:c(A){b(8[A+"3N"]){5v(8[A+"3N"])}},Q:c(){b(8.o.1c()){O}b(e.1n){8.1v.Q()}b(8.9.3B){e.46()}e.47(8);8.1b.Q();8.o.Q();b(8.n){8.n.Q()}8.m.3M("1P:5C")},1C:c(A){b(8.9.1m){b(8.T&&8.9.1d!="1Z"){8.T.V()}}b(!8.9.1C){O}8.2v();8.5D=8.V.1j(8).1B(8.9.1C)},2v:c(){b(8.9.1C){8.1G("1C")}},V:c(){8.1G("Q");8.1G("T");b(!8.o.1c()){O}8.3L()},3L:c(){b(e.1n){8.1v.V()}b(8.T){8.T.V()}8.o.V();(8.1W||8.1b).Q();e.3f(8);8.m.3M("1P:2o")},3Z:c(A){b(8.o&&8.o.1c()){8.V(A)}13{8.24(A)}},2g:c(){h C=8.9.n,B=23[0]||8.1r,D=e.2U(C.R[0],B[C.1I]),F=e.2U(C.R[1],B[e.2f[C.1I]]),A=8.1o||0;8.1T.26(8.W+D+F+".2l");b(C.1I=="1e"){h E=(D=="k")?C.p:0;8.3p.f("k: "+E+"j;");8.1T.f({"2w":D});8.n.f({k:0,i:(F=="1s"?"3c%":F=="1Y"?"50%":0),5G:(F=="1s"?-1*C.q:F=="1Y"?-0.5*C.q:0)+(F=="1s"?-1*A:F=="i"?A:0)+"j"})}13{8.3p.f(D=="i"?"1w: 0; 2I: "+C.p+"j 0 0 0;":"2I: 0; 1w: 0 0 "+C.p+"j 0;");8.n.f(D=="i"?"i: 0; 1s: 1M;":"i: 1M; 1s: 0;");8.1T.f({1w:0,"2w":F!="1Y"?F:"2i"});b(F=="1Y"){8.1T.f("1w: 0 1M;")}13{8.1T.f("1w-"+F+": "+A+"j;")}b(e.2N){b(D=="1s"){8.n.f({R:"3P",5n:"5K",i:"1M",1s:"1M","2w":"k",q:"3c%",1w:(-1*C.p)+"j 0 0 0"});8.n.28.2m="3K"}13{8.n.f({R:"3R","2w":"2i",1w:0})}}}8.1r=B},R:c(B){b(!8.1b){b(!8.2H()){O}}e.2J(8);b(e.1n){h A=8.o.21();b(!8.2x||8.2x.p!=A.p||8.2x.q!=A.q){8.1v.f({q:A.q+"j",p:A.p+"j"})}8.2x=A}b(8.9.Y){h J,H;b(8.20){h K=17.1E.2D(),C=B.2h||{};h G,I=2;3O(8.20.4d()){U"5O":U"5i":G={x:0-I,y:0-I};18;U"5Q":G={x:0,y:0-I};18;U"5R":U"5S":G={x:I,y:0-I};18;U"5T":G={x:I,y:0};18;U"5U":U"5e":G={x:I,y:I};18;U"5W":G={x:0,y:I};18;U"5b":U"5a":G={x:0-I,y:I};18;U"5Z":G={x:0-I,y:0};18}G.x+=8.9.1g.x;G.y+=8.9.1g.y;J=P.11({1g:G},{m:8.9.Y.1q,20:8.20,1z:{i:C.1H||22.1H(B)-K.i,k:C.1F||22.1F(B)-K.k}});H=e.Y(8.o,8.15,J);b(8.9.1E){h M=8.3a(H),L=M.1r;H=M.R;H.k+=L.1h?2*X.37(G.x-8.9.1g.x):0;H.i+=L.1h?2*X.37(G.y-8.9.1g.y):0;b(8.n&&(8.1r.1e!=L.1e||8.1r.1h!=L.1h)){8.2g(L)}}H={k:H.k+"j",i:H.i+"j"};8.o.f(H)}13{J=P.11({1g:8.9.1g},{m:8.9.Y.1q,15:8.9.Y.15});H=e.Y(8.o,8.15,P.11({R:1l},J));H={k:H.k+"j",i:H.i+"j"}}b(8.T){h E=e.Y(8.T,8.15,P.11({R:1l},J))}b(e.1n){8.1v.f(H)}}13{h F=8.15.2t(),C=B.2h||{},H={k:((8.9.1K)?F[0]:C.1F||22.1F(B))+8.9.1g.x,i:((8.9.1K)?F[1]:C.1H||22.1H(B))+8.9.1g.y};b(!8.9.1K&&8.m!==8.15){h D=8.m.2t();H.k+=-1*(D[0]-F[0]);H.i+=-1*(D[1]-F[1])}b(!8.9.1K&&8.9.1E){h M=8.3a(H),L=M.1r;H=M.R;b(8.n&&(8.1r.1e!=L.1e||8.1r.1h!=L.1h)){8.2g(L)}}H={k:H.k+"j",i:H.i+"j"};8.o.f(H);b(8.T){8.T.f(H)}b(e.1n){8.1v.f(H)}}},3a:c(C){h E={1e:10,1h:10},D=8.o.21(),B=17.1E.2D(),A=17.1E.21(),G={k:"q",i:"p"};3i(h F 3Q G){b((C[F]+D[G[F]]-B[F])>A[G[F]]){C[F]=C[F]-(D[G[F]]+(2*8.9.1g[F=="k"?"x":"y"]));b(8.n){E[e.3A[G[F]]]=1l}}}O{R:C,1r:E}}});P.11(X,{45:c(G,H){h F=23[2]||8.9,B=F.1o,E=F.1i,D=s r("57",{u:"64"+H.2B(),q:E+"j",p:E+"j"}),A={i:(H.3I(0)=="t"),k:(H.3I(1)=="l")};b(D&&D.3h&&D.3h("2d")){G.N(D);h C=D.3h("2d");C.54=F.1L;C.53((A.k?B:E-B),(A.i?B:E-B),B,0,6a.52*2,1l);C.51();C.3F((A.k?B:0),0,E-B,E);C.3F(0,(A.i?B:0),E,E-B)}13{G.N(s r("S").f({q:E+"j",p:E+"j",1w:0,2I:0,2m:"3K",R:"3P",4Z:"2o"}).N(s r("v:4Y",{4X:F.1L,4W:"4V",4U:F.1L,4T:(B/E*0.5).4S(2)}).f({q:2*E-1+"j",p:2*E-1+"j",R:"3R",k:(A.k?0:(-1*E))+"j",i:(A.i?0:(-1*E))+"j"})))}}});r.6k({26:c(C,B){C=$(C);h A=P.11({3E:"i k",3q:"4Q-3q",3o:"4O",1L:""},23[2]||{});C.f(e.1n?{4N:"4M:6s.4K.6u(2b=\'"+B+"\'\', 3o=\'"+A.3o+"\')"}:{4J:A.1L+" 30("+B+") "+A.3E+" "+A.3q});O C}});X.4h={Q:c(){e.2J(8);8.2v();h D={};b(8.9.Y){D.2h={1F:0,1H:0}}13{h A=8.15.2t(),C=8.15.3H(),B=17.1E.2D();A.k+=(-1*(C[0]-B[0]));A.i+=(-1*(C[1]-B[1]));D.2h={1F:A.k,1H:A.i}}b(8.9.1m){8.2O(D)}13{8.24(D)}8.1C()}};X.11=c(A){A.m.1P={};P.11(A.m.1P,{Q:X.4h.Q.1j(A),V:A.V.1j(A),1J:e.1J.1j(e,A.m)})};X.3U();',62,406,"||||||||this|options||if|function||Tips|setStyle||var|top|px|left||element|stem|wrapper|height|width|Element|new||className|||||||||||||||||||insert|return|Object|show|position|div|loader|case|hide|images|Prototip|hook||false|extend|title|else||target||document|break|closeButton|mouseout|tooltip|visible|showOn|horizontal|observe|offset|vertical|border|bind|mouseover|true|ajax|fixIE|radius|useEvent|tip|stemInverse|bottom|zIndex|content|iframeShim|margin|hideOn|bindAsEventListener|mouse|stopObserving|delay|hideAfter|tips|viewport|pointerX|clearTimer|pointerY|orientation|remove|fixed|backgroundColor|auto|hideTargets|visibility|prototip|invoke|eventToggle|mouseleave|stemImage|capture|borderTop|borderFrame|prototip_Corner|middle|click|mouseHook|getDimensions|Event|arguments|showDelayed|Prototype|setPngBackground|toolbar|style|mouseenter|null|src|clone||toLowerCase|_inverse|positionStem|fakePointer|none|close|match|png|display|prototip_CornerWrapper|hidden|initialize|mousemove|Browser|wrap|cumulativeOffset|eventPosition|cancelHideAfter|float|iframeShimDimensions|ajaxContentLoading|ajaxHideEvent|isElement|capitalize|eventCheckDelay|getScrollOffsets|addClassName|isString|zIndexTop|build|padding|raise|clearfix|push|body|WebKit419|ajaxShow|convertVersionString|getStyle|unload|window|borderCenter|inverseStem|onComplete|borderMiddle|select|include|default|url|right|loaded|Styles|add|activityLeave|activityEnter|toggleInt|event|hideElement|getPositionWithinViewport|eventShow|100|_update|IE|removeVisible|length|getContext|for|replace|borderColor|borderRow|each|li|sizingMethod|stemWrapper|repeat|_build|_isBuilding|find|parseFloat|9500px|activate|setup|fixSafari2|member|_stemTranslation|hideOthers|require|specialEvent|align|fillRect|dom|cumulativeScrollOffset|charAt|create|block|afterHide|fire|Timer|switch|relative|in|absolute|ajaxContentLoaded|ajaxHide|start|buttonEvent|Action|namespaces|On|toggle|eventHide|getWidth|update|input|prototip_Fill|createCorner|hideAll|addVisibile|borderBottom|_highest|prototip_Between|without|_|toUpperCase|stemBox|deactivate|throw|Methods|REQUIRED_|removeAll|WebKit|Version|userAgent|navigator|opacity|undefined|frameBorder|javascript|iframe|9500|exec|typeof|MSIE|RegExp|script|tagName|area|emptyFunction|head|VML|endsWith|styles|js|behavior|addRule|background|Microsoft|closeButtons|progid|filter|scale|createStyleSheet|no|000000|toFixed|arcSize|strokeColor|1px|strokeWeight|fillcolor|roundrect|overflow||fill|PI|arc|fillStyle|cannot|available|canvas|not|Class|LEFTBOTTOM|BOTTOMLEFT|Tip|vml|BOTTOMRIGHT|leftMiddle|abs|bottomMiddle|TOPLEFT|rightBottom|com|bottomRight|leftBottom|clear|bottomLeft|rightMiddle|catch|microsoft|topMiddle|parentNode|rightTop|clearTimeout|topRight|try|schemas|showTimer|Request|Ajax|shown|hideAfterTimer|while|ajaxTimer|marginTop|loaderTimer|responseText|relatedTarget|both|urn|stop|blur|LEFTTOP|findElement|TOPMIDDLE|TOPRIGHT|RIGHTTOP|RIGHTMIDDLE|RIGHTBOTTOM|REQUIRED_Prototype|BOTTOMMIDDLE|hideAction|close_hover|LEFTMIDDLE|textarea|isNumber|_captureTroubleElements|br|cornerCanvas|bl|indexOf|tr|tl|prototip_CornerWrapperBottomRight|Math|cloneNode|prototip_CornerWrapperBottomLeft|prototip_CornerWrapperTopRight|times|prototip_BetweenCorners|prototip_CornerWrapperTopLeft|parseInt|test|ul|addMethods|inline|MIDDLE|prototip_StemImage|prototip_StemBox|requires|prototip_StemWrapper|prototip_Stem|DXImageTransform|gif|AlphaImageLoader|prototipLoader|evaluate|https".split("|"),0,{}));var FLIR={version:"1.2",options:{path:"",classnameIgnore:false,findEmbededFonts:false,ignoredElements:"BR,HR,IMG,INPUT,SELECT"},onreplacing:null,onreplaced:null,onreplacingchild:null,onreplacedchild:null,flirElements:{},flirPlugins:[],isCraptastic:true,isIE:true,defaultStyle:null,classStyles:{},embededFonts:{},dpi:96,init:function(a,b){if(this.isFStyle(a)){this.defaultStyle=a}else{if(typeof a!="undefined"){this.loadOptions(a)}if(typeof b=="undefined"){this.defaultStyle=new FLIRStyle()}else{if(this.isFStyle(b)){this.defaultStyle=b}else{this.defaultStyle=new FLIRStyle(b)}}}this.calcDPI();if(this.options.findEmbededFonts){this.discoverEmbededFonts()}this.isIE=(navigator.userAgent.toLowerCase().indexOf("msie")>-1&&navigator.userAgent.toLowerCase().indexOf("opera")<0);this.isCraptastic=(typeof document.body.style.maxHeight=="undefined");if(this.isIE){this.flirIERepObj=[];this.flirIEHovEls=[];this.flirIEHovStyles=[]}FLIR._call_plugin("init",arguments)},loadOptions:function(a){for(var b in a){this.options[b]=a[b]}},installPlugin:function(a){this.flirPlugins.push(a)},_call_plugin:function(d,c){var a=c;for(var b=0;b<this.flirPlugins.length;b++){if(typeof this.flirPlugins[b][d]=="function"){var e=this.flirPlugins[b][d](a);if(typeof e=="undefined"){continue}if(typeof e=="boolean"&&e==false){return false}if(typeof e!="boolean"){a=c}}}var a=typeof a!="object"?[a]:a;if(a.length&&a[0]&&a[0].callee){return a[0]}else{return a}},auto:function(c){if(!(args=FLIR._call_plugin("auto",arguments))){return}c=args[0];var a=typeof c=="undefined"?["h1","h2","h3","h4","h5"]:(c.indexOf&&c.indexOf(",")>-1?c.split(","):c);var d;for(var b=0;b<a.length;b++){d=this.getElements(a[b]);if(d.length>0){this.replace(d)}}},hover:function(m){var b=FLIR.evsrc(m);var p=b;var s=b.flirHasHover;var k=b;var n=(m.type=="mouseover");while(b!=document.body&&!b.flirMainObj){b=FLIR.getParentNode(b);if(!s){s=b.flirHasHover;k=b}}if(b==document.body){return}var c=FLIR.getFStyle(b);if(n&&c!=c.hoverStyle){c=c.hoverStyle}if(!(args=FLIR._call_plugin("hover",[n,p,b,k]))){return}n=args[0];p=args[1];b=args[2];k=args[3];var l=FLIR.getChildren(k);if(l.length==0||(l.length==1&&(l[0].flirImage||l[0].flirHasHover))){l=[k]}else{if(l.length==1&&!FLIR.isIgnoredElement(l[0])){var f=FLIR.getChildren(l[0]);if(f.length>0){if((f.length==1&&!f[0].flirImage)||f.length>1){l=f}}}}var q;for(var h=0;h<l.length;h++){q=l[h];if(q.nodeName=="IMG"){continue}if(!q.innerHTML){continue}if(FLIR.isIE){var r=FLIR.flirIEHovEls.length;FLIR.flirIERepObj[r]=q;FLIR.flirIEHovStyles[r]=c;if(!FLIR.isCraptastic){if(c.useBackgroundMethod&&FLIR.getStyle(q,"display")=="block"){FLIR.flirIEHovEls[r]=q;setTimeout("FLIR.flirIERepObj["+r+'].style.background = "url("+('+n+" ? FLIR.flirIEHovStyles["+r+"].generateURL(FLIR.flirIERepObj["+r+"]) : FLIR.flirIERepObj["+r+'].flirOrig)+") no-repeat";',0)}else{FLIR.flirIEHovEls[r]=q.flirImage?q:FLIR.getChildren(q)[0];if(!FLIR.flirIEHovEls[r].flirOrigWidth){FLIR.flirIEHovEls[r].flirOrigWidth=FLIR.flirIEHovEls[r].width;FLIR.flirIEHovEls[r].flirOrigHeight=FLIR.flirIEHovEls[r].height}var d="FLIR.flirIEHovEls["+r+"].src = "+n+" ? FLIR.flirIEHovStyles["+r+"].generateURL(FLIR.flirIERepObj["+r+"], FLIR.flirIEHovEls["+r+"].alt) : FLIR.flirIERepObj["+r+"].flirOrig;";d+="FLIR.flirIEHovEls["+r+"].onload = function() { ";if(n&&!FLIR.flirIEHovEls[r].flirHoverWidth){d+="        FLIR.flirIEHovEls["+r+"].flirHoverWidth = this.width; ";d+="        FLIR.flirIEHovEls["+r+"].flirHoverHeight = this.height; "}d+="    this.style.width = FLIR.flirIEHovEls["+r+"]."+(n?"flirHoverWidth":"flirOrigWidth")+'+"px"; ';d+="    this.style.height = FLIR.flirIEHovEls["+r+"]."+(n?"flirHoverHeight":"flirOrigHeight")+'+"px"; ';d+="}; ";setTimeout(d,0)}}else{FLIR.flirIEHovEls[r]=q.flirImage?q:FLIR.getChildren(q)[0];setTimeout("  FLIR.flirIEHovEls["+r+"].style.filter = 'progid:DXImageTransform.Microsoft.AlphaImageLoader(src=\"'+FLIR.flirIEHovStyles["+r+"].generateURL(FLIR.flirIERepObj["+r+"], FLIR.flirIEHovEls["+r+'].alt)+\'", sizingMethod="image")\';  ',0)}}else{if(c.useBackgroundMethod&&FLIR.getStyle(q,"display")=="block"){var a=q.flirHoverURL?q.flirHoverURL:c.generateURL(q);q.style.background="url("+(n?a:q.flirOrig)+") no-repeat"}else{var g=q.flirImage?q:FLIR.getChildren(q)[0];var a=q.flirHoverURL?q.flirHoverURL:c.generateURL(q,g.alt);g.src=n?a:q.flirOrig}}}},addHover:function(a){if(!(args=FLIR._call_plugin("addHover",arguments))){return}a=args[0];a.flirHasHover=true;if(a.addEventListener){a.addEventListener("mouseover",FLIR.hover,false);a.addEventListener("mouseout",FLIR.hover,false)}else{if(a.attachEvent){a.attachEvent("onmouseover",function(){FLIR.hover(window.event)});a.attachEvent("onmouseout",function(){FLIR.hover(window.event)})}}},prepare:function(e){if(!(args=FLIR._call_plugin("prepare",arguments))){return}e=args[0];if(e&&e.hasChildNodes()&&e.childNodes.length>1){for(var b in e.childNodes){var d=e.childNodes[b];if(d&&d.nodeType==3){var c=document.createElement("SPAN");c.style.margin=c.style.padding=c.style.border="0px";c.className="flir-span";c.flirSpan=true;var a=d.nodeValue.replace(/[\t\n\r]/g," ").replace(/\s\s+/g," ");c.innerHTML=!FLIR.isIE?a:d.nodeValue.replace(/^\s+|\s+$/g,"&nbsp;");e.replaceChild(c,d)}}}},replace:function(c,b){if(!(args=FLIR._call_plugin("replace",arguments))){return}c=args[0];b=args[1];if(!c||c.flirReplaced){return}if(!this.isFStyle(b)){b=this.getFStyle(c)}if(typeof c=="string"){c=this.getElements(c)}if(typeof c.length!="undefined"){if(c.length==0){return}for(var a=0;a<c.length;a++){this.replace(c[a],b)}return}if(typeof FLIR.onreplacing=="function"){c=FLIR.onreplacing(c,b)}c.flirMainObj=true;this.setFStyle(c,b);this.saveObject(c);if(this.options.findEmbededFonts&&typeof this.embededFonts[b.getFont(c)]!="undefined"){return}FLIR.prepare(c);this._replace_tree(c,b);if(typeof FLIR.onreplaced=="function"){FLIR.onreplaced(c,b)}},_replace_tree:function(e,c){if(typeof __flir_replacetree_recurse=="undefined"){__flir_replacetree_recurse=1}else{__flir_replacetree_recurse++}var d=!e.hasChildNodes()||(e.hasChildNodes()&&e.childNodes.length==1&&e.childNodes[0].nodeType==3)?[e]:e.childNodes;var a;for(var b=0;b<d.length;b++){a=d[b];if(typeof FLIR.onreplacingchild=="function"){a=FLIR.onreplacingchild(a,c)}if(!a.innerHTML||a.nodeType!=1){continue}if(FLIR.isIgnoredElement(a)){continue}if(a.flirReplaced){continue}if(a.nodeName=="A"&&!a.flirHasHover){FLIR.addHover(a)}if(a.hasChildNodes()&&(a.childNodes.length>1||a.childNodes[0].nodeType!=3)){FLIR.prepare(a);FLIR._replace_tree(a,c);continue}if(a.innerHTML==""){continue}if(!FLIR.isCraptastic){if(c.useBackgroundMethod){FLIR.replaceMethodBackground(a,c)}else{FLIR.replaceMethodOverlay(a,c)}}else{FLIR.replaceMethodCraptastic(a,c)}a.className+=" flir-replaced";a.flirReplaced=true;if(typeof FLIR.onreplacedchild=="function"){FLIR.onreplacedchild(e,c)}}},replaceMethodBackground:function(e,d){if(!(args=FLIR._call_plugin("replaceMethodBackground",arguments))){return}e=args[0];d=args[1];var c=this.saveObject(e);var a=d.generateURL(e);if(FLIR.getStyle(e,"display")!="block"){e.style.display="block"}var b=new Image();b.onload=function(){FLIR.flirElements[c].style.width=this.width+"px";FLIR.flirElements[c].style.height=this.height+"px";if(d!=d.hoverStyle){var f=new Image();e.flirHoverURL=f.src=d.hoverStyle.generateURL(e)}};b.src=a;e.style.background='url("'+a.replace(/ /g,"%20")+'") no-repeat';e.flirOrig=a;e.oldTextIndent=e.style.textIndent;e.style.textIndent="-9999px"},replaceMethodOverlay:function(d,c){if(!(args=FLIR._call_plugin("replaceMethodOverlay",arguments))){return}d=args[0];c=args[1];var b=this.saveObject(d);var a=document.createElement("IMG");a.alt=this.sanitizeHTML(d.innerHTML);if(c!=c.hoverStyle){a.onload=function(){var e=new Image();d.flirHoverURL=e.src=c.hoverStyle.generateURL(d,a.alt)}}if(a.onerror){a.onerror=function(){var e=document.createElement("SPAN");e.innerHTML=a.alt;try{d.replaceChild(e,a)}catch(f){}}}a.flirImage=true;a.className="flir-image";a.src=c.generateURL(d);a.style.border="none";d.flirOrig=a.src;d.innerHTML="";d.appendChild(a)},replaceMethodCraptastic:function(e,d){if(!(args=FLIR._call_plugin("replaceMethodCraptastic",arguments))){return}e=args[0];d=args[1];var c=this.saveObject(e);var b=d.generateURL(e);var a=document.createElement("IMG");a.alt=this.sanitizeHTML(e.innerHTML);if(d!=d.hoverStyle){a.onload=function(){var f=new Image();e.flirHoverURL=f.src=d.hoverStyle.generateURL(e,a.alt)}}a.flirImage=true;a.className="flir-image";a.src=this.options.path+"spacer.png";a.style.width=e.offsetWidth+"px";a.style.height=e.offsetHeight+"px";a.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+b+'", sizingMethod="image")';e.flirOrig=b;e.innerHTML="";e.appendChild(a)},saveObject:function(a){if(typeof a.flirId=="undefined"){a.flirId=this.getUID();this.flirElements[a.flirId]=a}return a.flirId},getUID:function(){var b="flir-";var c=b+Math.random().toString().split(".")[1];var a=0;while(typeof this.flirElements[c]!="undefined"){if(a>100000){console.error("Facelift: Unable to generate unique id.")}c=b+Math.random().toString().split(".")[1];a++}return c},getElements:function(t){if(!(args=FLIR._call_plugin("getElements",arguments))){return}switch(args.length){case 1:t=args[0];break;case 2:return args[0];break}var s=[];if(document.querySelectorAll){var e=false;try{s=document.querySelectorAll(t);e=true}catch(f){e=false}if(e){return s}}var k,q,n,l,t,d,h,r,m;d=t;r=false;if(d.indexOf(" ")>-1){var g=d.split(" ");d=g[0];r=g[1]}else{if(d[0]=="#"){return document.getElementById(d.substr(1))}}var c=false;if(d.indexOf("#")>-1){c=d.split("#")[1];t=d.split("#")[0]}var o=false;if(d.indexOf(".")>-1){o=d.split(".")[1];t=d.split(".")[0]}k=document.getElementsByTagName(t);for(var a=0;a<k.length;a++){if(k[a].nodeType!=1){continue}h=false;n=k[a].className?k[a].className:"";if(c&&k[a].id&&k[a].id==c){h=true}if(o&&FLIR.hasClass(k[a],o)){h=true}if(!c&&!o){h=true}if(!h){continue}if(this.options.classnameIgnore&&n.indexOf(this.options.classnameIgnore)>-1){continue}q=false!=r?k[a].getElementsByTagName(r):[k[a]];for(var b=0;b<q.length;b++){m=q[b];if(this.options.classnameIgnore&&m.className&&m.className.indexOf(this.options.classnameIgnore)>-1){continue}s.push(m)}}return s},discoverEmbededFonts:function(){this.embededFonts={};for(var c in document.styleSheets){if(!document.styleSheets[c].cssRules){continue}for(var d in document.styleSheets[c].cssRules){if(!document.styleSheets[0].cssRules[d]){continue}var e=document.styleSheets[0].cssRules[d];if(e.type&&e.type==e.FONT_FACE_RULE){var a=e.style.getPropertyValue("src").match(/url\("?([^"\)]+\.[ot]tf)"?\)/i)[1];var b=e.style.getPropertyValue("font-family");if(b.indexOf(",")){b=b.split(",")[0]}b=b.replace(/['"]/g,"").toLowerCase();if(b!=""&&a!=""){this.embededFonts[b]=a}}}}},getStyle:function(a,c){if(a.currentStyle){if(c.indexOf("-")>-1){c=c.split("-")[0]+c.split("-")[1].substr(0,1).toUpperCase()+c.split("-")[1].substr(1)}var b=a.currentStyle[c]}else{if(window.getComputedStyle){var b=document.defaultView.getComputedStyle(a,"").getPropertyValue(c)}}return b},getChildren:function(c){var b=[];if(c&&c.hasChildNodes()){for(var a in c.childNodes){if(c.childNodes[a]&&c.childNodes[a].nodeType==1){b[b.length]=c.childNodes[a]}}}return b},getParentNode:function(b){var a=b.parentNode;while(a!=document&&a.nodeType!=1){a=a.parentNode}return a},hasClass:function(a,b){return(a&&a.className&&a.className.indexOf(b)>-1)},evsrc:function(a){var b;if(a.target){b=a.target}else{if(a.srcElement){b=a.srcElement}}if(b.nodeType==3){b=b.parentNode}return b},calcDPI:function(){if(screen.logicalXDPI){var a=screen.logicalXDPI}else{var c="flir-dpi-div-test";if(document.getElementById(c)){var b=document.getElementById(c)}else{var b=document.createElement("DIV");b.id=c;b.style.position="absolute";b.style.visibility="hidden";b.style.border=b.style.padding=b.style.margin="0";b.style.left=b.style.top="-1000px";b.style.height=b.style.width="1in";document.body.appendChild(b)}var a=b.offsetHeight}this.dpi=parseInt(a)},isIgnoredElement:function(b,a){return((","+this.options.ignoredElements).indexOf(","+b.nodeName)>-1)},sanitizeHTML:function(a){return a.replace(/<[^>]+>/g,"")},getFStyle:function(c,b){var a=this.getClassStyle(c);if(this.isFStyle(a)){b=a}if(this.isFStyle(b)){return b}else{if(this.isFStyle(c.flirStyle)){return c.flirStyle}else{return this.defaultStyle}}},setFStyle:function(b,a){b.flirStyle=a},isFStyle:function(a){if(!a){return false}return(a.toString()=="[FLIRStyle Object]")},addClassStyle:function(b,a){if(this.isFStyle(a)){this.classStyles[b]=a}},getClassStyle:function(d){if(!(args=FLIR._call_plugin("getClassStyle",arguments))){return}switch(args.length){case 1:d=args[0];break;case 2:return args[0];break}var e=d.className;if(this.classStyles.length==0||typeof e=="undefined"||e==""){return false}var b=e.split(" ");for(var a in this.classStyles){for(var c=0;c<b.length;c++){if(b[c]==a){return this.classStyles[a]}}}return false}};function FLIRStyle(a){this.useBackgroundMethod=false;this.inheritStyle=true;this.useExtendedStyles=false;this.hoverStyle=(arguments[1]&&FLIR.isFStyle(arguments[1]))?arguments[1]:this;this.options={mode:"wrap",output:"auto",cSize:null,cColor:null,cFont:null,realFontHeight:false,dpi:96};this.cssStyles={"background-color":"Background",color:"Color","font-family":"Font","font-size":"Size","letter-spacing":"Spacing","line-height":"Line","text-align":"Align","text-transform":"Transform"};this.extendedStyles={"font-stretch":"Stretch","font-style":"FontStyle","font-variant":"Variant","font-weight":"Weight",opacity:"Opacity","text-decoration":"Decoration"};for(var b in a){if(b.indexOf("css")==0){b="c"+b.substr(3)}if(typeof this[b]!="undefined"){this[b]=a[b]}else{this.options[b]=a[b]}}this.options.dpi=FLIR.dpi;if(this.useExtendedStyles){for(var b in this.extendedStyles){this.cssStyles[b]=this.extendedStyles[b]}}for(var b=0;b<FLIR.flirPlugins.length;b++){if(FLIR.flirPlugins[b].FLIRStyleExtend&&typeof FLIR.flirPlugins[b].FLIRStyleExtend.init){FLIR.flirPlugins[b].FLIRStyleExtend.init.call(this)}}}FLIRStyle.prototype.generateURL=function(c){var b=(arguments[1]?arguments[1]:c.innerHTML);var a=this.options.cTransform;if(a==null){a=FLIR.getStyle(c,"text-transform")}switch(a){case"capitalize":b=b.replace(/\w+/g,function(d){return d.charAt(0).toUpperCase()+d.substr(1).toLowerCase()});break;case"lowercase":b=b.toLowerCase();break;case"uppercase":b=b.toUpperCase().replace(/&[a-z0-9]+;/gi,function(d){return d.toLowerCase()});break}b=encodeURIComponent(b.replace(/&/g,"{amp}").replace(/\+/g,"{plus}"));return FLIR.options.path+"generate.php?text="+b+"&h="+c.offsetHeight+"&w="+c.offsetWidth+"&fstyle="+this.serialize(c)+"&ok=ok"};FLIRStyle.prototype.buildURL=function(e,d,a,c){var b=encodeURIComponent(e.replace(/&/g,"{amp}").replace(/\+/g,"{plus}"));return FLIR.options.path+"generate.php?text="+b+"&h="+(c?c:"200")+"&w="+(a?a:"800")+"&fstyle="+(d?this.serialize(d):this.serialize())};FLIRStyle.prototype.serialize=function(e){var d="";var b=this.copyObject(this.options);if(e&&this.inheritStyle){for(var c in this.cssStyles){if(this.cssStyles[c].length>0){var a=this.cssStyles[c]}if(this.options["c"+a]==null||a=="Size"){this.options["c"+a]=this.get(e,c,a)}}}for(var c in this.options){if(this.options[c]==null||typeof this.options[c]=="undefined"||this.options[c]=="NaN"){continue}if(c!="toJSONString"){d+=',"'+c+'":"'+this.options[c].toString().replace(/"/g,"'")+'"'}}d="{"+d.substr(1)+"}";this.options=b;return escape(d)};FLIRStyle.prototype.removeFunction=function(a){removeF="";removeF+=a.replace(/cfunction ()/g,"");removeF+=a.replace(/return toJSONString(this);/g,"");removeF+=a.replace(/toJSONString/g,"");removeF+=a.replace(/ /g,"");return removeF};FLIRStyle.prototype.get=function(d,a,c){var b="get"+c;while(d.flirSpan&&d!=document.body){d=FLIR.getParentNode(d)}return typeof this[b]=="function"?this[b](d):FLIR.getStyle(d,a)};FLIRStyle.prototype.getFontStyle=function(a){return a.nodeName=="EM"||FLIR.getParentNode(a).nodeName=="EM"?"italic":FLIR.getStyle(a,"font-style")};FLIRStyle.prototype.getWeight=function(b){var a=b.nodeName=="STRONG"||FLIR.getParentNode(b).nodeName=="STRONG"?"bold":FLIR.getStyle(b,"font-weight");switch(a.toString()){case"100":case"200":case"300":case"lighter":return"lighter";case"400":case"normal":return"";case"500":case"600":case"700":case"bold":return"bold";case"800":case"900":case"bolder":return"bolder"}};FLIRStyle.prototype.getFont=function(b){var a=FLIR.getStyle(b,"font-family");if(a.indexOf(",")){a=a.split(",")[0]}return a.replace(/['"]/g,"").toLowerCase()};FLIRStyle.prototype.getColor=function(b){var a=FLIR.getStyle(b,"color");if(a.substr(0,1)=="#"){a=a.substr(1)}return a.replace(/['"]/g,"").toLowerCase()};FLIRStyle.prototype.getSize=function(o){if(this.options.cSize!=null&&"*/+-".indexOf(this.options.cSize[0])<0){return this.options.cSize}var raw=FLIR.getStyle(o,"font-size");var pix;if(raw.indexOf("px")>-1){pix=Math.round(parseFloat(raw))}else{if(raw.indexOf("pt")>-1){var pts=parseFloat(raw);pix=pts/(72/this.options.dpi)}else{if(raw.indexOf("em")>-1||raw.indexOf("%")>-1){pix=this.calcFontSize(o)}}}if(this.options.cSize&&"*/+-".indexOf(this.options.cSize[0])>-1){try{pix=this.roundFloat(parseFloat(eval(pix.toString().concat(this.options.cSize))))}catch(err){}}o.flirFontSize=pix;return pix};FLIRStyle.prototype.getSpacing=function(c){var e=FLIR.getStyle(c,"letter-spacing");var a;if(e!="normal"){if(e.indexOf("em")>-1){var d=c.flirFontSize?c.flirFontSize:this.getSize(c);a=(parseFloat(e)*d)}else{if(e.indexOf("px")>-1){a=parseFloat(e)}else{if(e.indexOf("pt")>-1){var b=parseFloat(e);a=b/(72/this.options.dpi)}}}return this.roundFloat(a)}return""};FLIRStyle.prototype.getLine=function(c){var e=FLIR.getStyle(c,"line-height");var b=parseFloat(e);var d=c.flirFontSize?c.flirFontSize:this.getSize(c);if(e.indexOf("em")>-1){ret=(b*d)/d}else{if(e.indexOf("px")>-1){ret=b/d}else{if(e.indexOf("pt")>-1){var a=b;ret=(a/(72/this.options.dpi))/d}else{if(e.indexOf("%")>-1){return 1}else{ret=b}}}}return this.roundFloat(ret)};FLIRStyle.prototype.roundFloat=function(a){return Math.round(a*10000)/10000};FLIRStyle.prototype.calcFontSize=function(b){var c=document.createElement("DIV");c.style.border="0";c.style.padding="0";c.style.position="absolute";c.style.visibility="hidden";c.style.left=c.style.top="-1000px";c.style.left=c.style.top="10px";c.style.lineHeight="100%";c.innerHTML="Flir_Test";b.appendChild(c);var a=c.offsetHeight;b.removeChild(c);return a};FLIRStyle.prototype.copyObject=function(b){var c={};for(var a in b){c[a]=b[a]}return c};FLIRStyle.prototype.toString=function(){return"[FLIRStyle Object]"};var FLIR_RefreshImages={version:"1.0",watch_element:null,is_safari:false,safari_poll:null,init:function(){this.watch_element=document.createElement("SPAN");this.watch_element.id="flir-refreshimages-test";this.watch_element.style.fontSize="1em";this.watch_element.style.visibility="hidden";this.watch_element.style.left=this.watch_element.style.top="-1000px";this.watch_element.innerHTML="Test";document.body.appendChild(this.watch_element);this.watch_element.previousFontSize=FLIR.getStyle(this.watch_element,"font-size");var a=window.onresize;window.onresize=function(){FLIR_RefreshImages.refreshReplacedImages();if(typeof a=="function"){a(window.event)}};this.is_safari=(navigator.userAgent.search(/safari|chrome/i)>-1);if(this.is_safari){this._init_safari()}},_init_safari:function(){this.safari_poll=setInterval("FLIR_RefreshImages._textsize_watch();",1000)},_textsize_watch:function(){var a=FLIR.getStyle(this.watch_element,"font-size");if(this.watch_element.previousFontSize!=a){this.refreshReplacedImages();this.watch_element.previousFontSize=a}},refreshReplacedImages:function(){for(var a in FLIR.flirElements){var b=FLIR.flirElements[a];if(b.flirMainObj){this.refreshReplacedElement(b,FLIR.getFStyle(b))}}},refreshReplacedElement:function(f,e,a){if(typeof a=="undefined"){a=f}if(e.useBackgroundMethod){return false}if(f&&f.hasChildNodes()){for(var c in f.childNodes){var d=f.childNodes[c];if(d&&d.nodeType==1){if(d.flirImage){var b=e.buildURL(d.alt,d,a.offsetWidth);f.flirOrig=b;if(!FLIR.isCraptastic){d.src=b}else{d.style.filter='progid:DXImageTransform.Microsoft.AlphaImageLoader(src="'+b+'", sizingMethod="image")'}}else{this.refreshReplacedElement(d,e,a)}}}}},toString:function(){return"[RefreshImages FLIRPlugin]"}};FLIR.installPlugin(FLIR_RefreshImages);var Window=Class.create();Window.keepMultiModalWindow=false;Window.hasEffectLib=String.prototype.parseColor!=null;Window.resizeEffectDuration=0.4;Window.prototype={initialize:function(){var c;var b=0;if(arguments.length>0){if(typeof arguments[0]=="string"){c=arguments[0];b=1}else{c=arguments[0]?arguments[0].id:null}}if(!c){c="window_"+new Date().getTime()}if($(c)){alert("Window "+c+" is already registered in the DOM! Make sure you use setDestroyOnClose() or destroyOnClose: true in the constructor")}this.options=Object.extend({className:"dialog",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,eshat:null},arguments[b]||{});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(c);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);if(this.options.draggable){var a=this;[this.topbar,this.topbar.up().previous(),this.topbar.up().next()].each(function(d){d.observe("mousedown",a.eventMouseDown);d.addClassName("top_draggable")});[this.bottombar.up(),this.bottombar.up().previous(),this.bottombar.up().next()].each(function(d){d.observe("mousedown",a.eventMouseDown);d.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 c=this.getContent();var a=null;for(var b=0;b<c.childNodes.length;b++){a=c.childNodes[b];if(a.nodeType==1){break}a=null}if(a){this._oldParent.appendChild(a)}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(a){this.options.closeCallback=a},getContent:function(){return this.content},setContent:function(h,g,b){var a=$(h);if(null==a){throw"Unable to find element '"+h+"' in DOM"}this._oldParent=a.parentNode;var f=null;var e=null;if(g){f=Element.getDimensions(a)}if(b){e=Position.cumulativeOffset(a)}var c=this.getContent();this.setHTMLContent("");c=this.getContent();c.appendChild(a);a.show();if(g){this.setSize(f.width,f.height)}if(b){this.setLocation(e[1]-this.heightN,e[0]-this.widthW)}},setHTMLContent:function(a){if(this.options.url){this.content.src=null;this.options.url=null;var b='<div id="'+this.getId()+'_content" class="'+this.options.className+'_content"> </div>';$(this.getId()+"_table_content").innerHTML=b;this.content=$(this.element.id+"_content")}this.getContent().innerHTML=a},setAjaxContent:function(b,a,d,c){this.showFunction=d?"showCenter":"show";this.showModal=c||false;a=a||{};this.setHTMLContent("");this.onComplete=a.onComplete;if(!this._onCompleteHandler){this._onCompleteHandler=this._setAjaxContent.bind(this)}a.onComplete=this._onCompleteHandler;new Ajax.Request(b,a);a.onComplete=this.onComplete},_setAjaxContent:function(a){Element.update(this.getContent(),a.responseText);if(this.onComplete){this.onComplete(a)}this.onComplete=null;this[this.showFunction](this.showModal)},setURL:function(a){if(this.options.url){this.content.src=null}this.options.url=a;var b="<iframe frameborder='0' name='"+this.getId()+"_content'  id='"+this.getId()+"_content' src='"+a+"' width='"+this.width+"' height='"+this.height+"'> </iframe>";$(this.getId()+"_table_content").innerHTML=b;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(b,c,p,e,a){b=b||this.element.id;this.cookie=[b,c,p,e,a];var n=WindowUtilities.getCookie(b);if(n){var o=n.split(",");var l=o[0].split(":");var k=o[1].split(":");var m=parseFloat(o[2]),f=parseFloat(o[3]);var g=o[4];var d=o[5];this.setSize(m,f);if(g=="true"){this.doMinimize=true}else{if(d=="true"){this.doMaximize=true}}this.useLeft=l[0]=="l";this.useTop=k[0]=="t";this.element.setStyle(this.useLeft?{left:l[1]}:{right:l[1]});this.element.setStyle(this.useTop?{top:k[1]}:{bottom:k[1]})}},getId:function(){return this.element.id},setDestroyOnClose:function(){this.options.destroyOnClose=true},setConstraint:function(a,b){this.constraint=a;this.constraintPad=Object.extend(this.constraintPad,b||{});if(this.useTop&&this.useLeft){this.setLocation(parseFloat(this.element.style.top),parseFloat(this.element.style.left))}},_initDrag:function(b){if(Event.element(b)==this.sizer&&this.isMinimized()){return}if(Event.element(b)!=this.sizer&&this.isMaximized()){return}if(window.ie&&this.heightN==0){this._getWindowBorderSize()}this.pointer=[this._round(Event.pointerX(b),this.options.gridX),this._round(Event.pointerY(b),this.options.gridY)];if(this.options.wiredDrag){this.currentDrag=this._createWiredElement()}else{this.currentDrag=this.element}if(Event.element(b)==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 a=$(this.getId()+"_close");if(a&&Position.within(a,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(b)},_round:function(b,a){return a==1?b:b=Math.floor(b/a)*a},_updateDrag:function(b){var a=[this._round(Event.pointerX(b),this.options.gridX),this._round(Event.pointerY(b),this.options.gridY)];var m=a[0]-this.pointer[0];var l=a[1]-this.pointer[1];if(this.doResize){var k=this.widthOrg+m;var d=this.heightOrg+l;m=this.width-this.widthOrg;l=this.height-this.heightOrg;if(this.useLeft){k=this._updateWidthConstraint(k)}else{this.currentDrag.setStyle({right:(this.rightOrg-m)+"px"})}if(this.useTop){d=this._updateHeightConstraint(d)}else{this.currentDrag.setStyle({bottom:(this.bottomOrg-l)+"px"})}this.setSize(k,d);this._notify("onResize")}else{this.pointer=a;if(this.useLeft){var c=parseFloat(this.currentDrag.getStyle("left"))+m;var g=this._updateLeftConstraint(c);this.pointer[0]+=g-c;this.currentDrag.setStyle({left:g+"px"})}else{this.currentDrag.setStyle({right:parseFloat(this.currentDrag.getStyle("right"))-m+"px"})}if(this.useTop){var f=parseFloat(this.currentDrag.getStyle("top"))+l;var e=this._updateTopConstraint(f);this.pointer[1]+=e-f;this.currentDrag.setStyle({top:e+"px"})}else{this.currentDrag.setStyle({bottom:parseFloat(this.currentDrag.getStyle("bottom"))-l+"px"})}this._notify("onMove")}if(this.iefix){this._fixIEOverlapping()}this._removeStoreLocation();Event.stop(b)},_endDrag:function(a){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(a);this._hideWiredElement();this._saveCookie();document.body.ondrag=null;document.body.onselectstart=null},_updateLeftConstraint:function(b){if(this.constraint&&this.useLeft&&this.useTop){var a=this.options.parent==document.body?WindowUtilities.getPageSize().windowWidth:this.options.parent.getDimensions().width;if(b<this.constraintPad.left){b=this.constraintPad.left}if(b+this.width+this.widthE+this.widthW>a-this.constraintPad.right){b=a-this.constraintPad.right-this.width-this.widthE-this.widthW}}return b},_updateTopConstraint:function(c){if(this.constraint&&this.useLeft&&this.useTop){var a=this.options.parent==document.body?WindowUtilities.getPageSize().windowHeight:this.options.parent.getDimensions().height;var b=this.height+this.heightN+this.heightS;if(c<this.constraintPad.top){c=this.constraintPad.top}if(c+b>a-this.constraintPad.bottom){c=a-this.constraintPad.bottom-b}}return c},_updateWidthConstraint:function(a){if(this.constraint&&this.useLeft&&this.useTop){var b=this.options.parent==document.body?WindowUtilities.getPageSize().windowWidth:this.options.parent.getDimensions().width;var c=parseFloat(this.element.getStyle("left"));if(c+a+this.widthE+this.widthW>b-this.constraintPad.right){a=b-this.constraintPad.right-c-this.widthE-this.widthW}}return a},_updateHeightConstraint:function(b){if(this.constraint&&this.useLeft&&this.useTop){var a=this.options.parent==document.body?WindowUtilities.getPageSize().windowHeight:this.options.parent.getDimensions().height;var c=parseFloat(this.element.getStyle("top"));if(c+b+this.heightN+this.heightS>a-this.constraintPad.bottom){b=a-this.constraintPad.bottom-c-this.heightN-this.heightS}}return b},_createWindow:function(a){var f=this.options.className;var d=document.createElement("div");d.setAttribute("id",a);if(this.options.eschat){d.className="dialog paper_chat2"}else{d.className="dialog"}var e;if(this.options.url){e='<iframe frameborder="0" name="'+a+'_content"  id="'+a+'_content" src="'+this.options.url+'"> </iframe>'}else{e='<div id="'+a+'_content" class="'+f+'_content"> </div>'}var g=this.options.closable?"<div class='"+f+"_close' id='"+a+"_close' onclick='Windows.close(\""+a+"\", event); return false;'> </div>":"";var h=this.options.minimizable?"<div class='"+f+"_minimize' id='"+a+"_minimize' onclick='Windows.minimize(\""+a+"\", event)'> </div>":"";var l=this.options.maximizable?"<div class='"+f+"_maximize' id='"+a+"_maximize' onclick='Windows.maximize(\""+a+"\", event)'> </div>":"";var k=this.options.detachable?"<div class='"+f+"_detach' id='"+a+"_detach' onmouseup='Windows.getWindow(\""+a+"\").detach();'> </div>":"";var c=this.options.resizable?"class='"+f+"_sizer' id='"+a+"_sizer'":"class='"+f+"_se'";var b="../themes/default/blank.gif";d.innerHTML=g+h+l+k+"      <table id='"+a+"_row1' class=\"top table_window\">        <tr>          <td class='"+f+"_nw' id='"+a+"_nw'></td>          <td class='"+f+"_n' id='"+a+"_n'><div id='"+a+"_top' class='"+f+"_title title_window'>"+this.options.title+"</div></td>          <td class='"+f+"_ne' id='"+a+"_ne'></td>        </tr>      </table>      <table id='"+a+"_row2' class=\"mid table_window\">        <tr>          <td class='"+f+"_w'></td>            <td id='"+a+"_table_content' class='"+f+"_content' valign='top'>"+e+"</td>          <td class='"+f+"_e'></td>        </tr>      </table>        <table id='"+a+"_row3' class=\"bot table_window\">        <tr>          <td class='"+f+"_sw'></td>            <td class='"+f+"_s'><div id='"+a+"_bottom' class='status_bar'><span style='float:left; width:1px; height:1px'></span></div></td>            <td "+c+"></td>        </tr>      </table>    ";Element.hide(d);this.options.parent.insertBefore(d,this.options.parent.firstChild);Event.observe($(a+"_content"),"load",this.options.onload);return d},changeClassName:function(a){var b=this.options.className;var d=this.getId();var c=this;$A(["_close","_minimize","_maximize","_sizer","_content"]).each(function(e){c._toggleClassName($(d+e),b+e,a+e)});$$("#"+d+" td").each(function(e){e.className=e.className.sub(b,a)});this.options.className=a},_toggleClassName:function(c,b,a){if(c){c.removeClassName(b);c.addClassName(a)}},setLocation:function(c,b){c=this._updateTopConstraint(c);b=this._updateLeftConstraint(b);var a=this.currentDrag||this.element;a.setStyle({top:c+"px"});a.setStyle({left:b+"px"});this.useLeft=true;this.useTop=true},getLocation:function(){var a={};if(this.useTop){a=Object.extend(a,{top:this.element.getStyle("top")})}else{a=Object.extend(a,{bottom:this.element.getStyle("bottom")})}if(this.useLeft){a=Object.extend(a,{left:this.element.getStyle("left")})}else{a=Object.extend(a,{right:this.element.getStyle("right")})}return a},getSize:function(){return{width:this.width,height:this.height}},setSize:function(c,b,a){c=parseFloat(c);b=parseFloat(b);if(!this.minimized&&c<this.options.minWidth){c=this.options.minWidth}if(!this.minimized&&b<this.options.minHeight){b=this.options.minHeight}if(this.options.maxHeight&&b>this.options.maxHeight){b=this.options.maxHeight}if(this.options.maxWidth&&c>this.options.maxWidth){c=this.options.maxWidth}if(this.useTop&&this.useLeft&&Window.hasEffectLib&&Effect.ResizeWindow&&a){new Effect.ResizeWindow(this,null,null,c,b,{duration:Window.resizeEffectDuration})}else{this.width=c;this.height=b;var f=this.currentDrag?this.currentDrag:this.element;f.setStyle({width:c+this.widthW+this.widthE+"px"});f.setStyle({height:b+this.heightN+this.heightS+"px"});if(!this.currentDrag||this.currentDrag==this.element){var d=$(this.element.id+"_content");d.setStyle({height:b+"px"});d.setStyle({width:c+"px"})}}},updateHeight:function(){this.setSize(this.width,this.content.scrollHeight,true)},updateWidth:function(){this.setSize(this.content.scrollWidth,this.height,true)},toFront:function(){if(Windows.focusedWindow!=null&&typeof(Windows.focusedWindow)!="undefined"&&$(Windows.focusedWindow.element.id+"_nw")&&Windows.focusedWindow.element.id.indexOf("modal_dialog")==-1){$(Windows.focusedWindow.element.id+"_nw").className=this.options.className+"_nw_inactive";$(Windows.focusedWindow.element.id+"_n").className=this.options.className+"_n_inactive";$(Windows.focusedWindow.element.id+"_ne").className=this.options.className+"_ne_inactive";if(Windows.focusedWindow.options.detachable){$(Windows.focusedWindow.element.id+"_detach").className=this.options.className+"_detach_inactive"}if(Windows.focusedWindow.options.minimizable){$(Windows.focusedWindow.element.id+"_minimize").className=this.options.className+"_minimize_inactive"}if(Windows.focusedWindow.options.maximizable){$(Windows.focusedWindow.element.id+"_maximize").className=this.options.className+"_maximize_inactive"}if(Windows.focusedWindow.options.closable){$(Windows.focusedWindow.element.id+"_close").className=this.options.className+"_close_inactive"}}if(this.element.style.zIndex<Windows.maxZIndex){this.setZIndex(Windows.maxZIndex+1)}this._notify("onFocus");if(this.iefix){this._fixIEOverlapping()}if(this.element.id.indexOf("modal_dialog")==-1){$(this.element.id+"_nw").className=this.options.className+"_nw";$(this.element.id+"_n").className=this.options.className+"_n";$(this.element.id+"_ne").className=this.options.className+"_ne";if(this.options.detachable){$(this.element.id+"_detach").className=this.options.className+"_detach"}if(this.options.minimizable){$(this.element.id+"_minimize").className=this.options.className+"_minimize"}if(this.options.maximizable){$(this.element.id+"_maximize").className=this.options.className+"_maximize"}if(this.options.closable){$(this.element.id+"_close").className=this.options.className+"_close"}}},show:function(c){if(c){if(typeof this.overlayOpacity=="undefined"){var b=this;setTimeout(function(){b.show(c)},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})}if(!this.width||!this.height){var a=WindowUtilities._computeSize(this.content.innerHTML,this.content.id,this.width,this.height,0,this.options.className);if(this.height){this.width=a+5}else{this.height=a+5}}this.setSize(this.width,this.height);if(this.centered){this._center(this.centerTop,this.centerLeft)}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();this.visible=true;WindowUtilities.focusedWindow=this;this._notify("onShow")},showCenter:function(a,c,b){this.centered=true;this.centerTop=c;this.centerLeft=b;this.show(a)},isVisible:function(){return this.visible},_center:function(c,b){var d=WindowUtilities.getWindowScroll();var a=WindowUtilities.getPageSize();if(typeof c=="undefined"){c=(a.windowHeight-(this.height+this.heightN+this.heightS))/2}c+=d.top;if(typeof b=="undefined"){b=(a.windowWidth-(this.width+this.widthW+this.widthE))/2}b+=d.left;this.setLocation(c,b);this.toFront()},_recenter:function(b){if(this.centered){var a=WindowUtilities.getPageSize();if(this.pageSize&&this.pageSize.windowWidth==a.windowWidth&&this.pageSize.windowHeight==a.windowHeight){return}this.pageSize=a;if($("overlay_modal")){$("overlay_modal").setStyle({height:(a.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 a=this.destroy.bind(this);if(this.options.hideEffectOptions.afterFinish){var b=this.options.hideEffectOptions.afterFinish;this.options.hideEffectOptions.afterFinish=function(){b();a()}}else{this.options.hideEffectOptions.afterFinish=function(){a()}}}Windows.updateFocusedWindow();if(this.options.eschat){$("barh_footer").show()}this.doNotNotifyHide=true;this.hide();this.doNotNotifyHide=false;this._notify("onClose")}},minimize:function(){if(this.resizing){return}var a=$(this.getId()+"_row2");if(!this.minimized){this.minimized=true;var d=a.getDimensions().height;this.r2Height=d;var c=this.element.getHeight()-d;if(this.useLeft&&this.useTop&&Window.hasEffectLib&&Effect.ResizeWindow){new Effect.ResizeWindow(this,null,null,null,this.height-d,{duration:Window.resizeEffectDuration})}else{this.height-=d;this.element.setStyle({height:c+"px"});a.hide()}if(!this.useTop){var b=parseFloat(this.element.getStyle("bottom"));this.element.setStyle({bottom:(b+d)+"px"})}}else{this.minimized=false;var d=this.r2Height;this.r2Height=null;if(this.useLeft&&this.useTop&&Window.hasEffectLib&&Effect.ResizeWindow){new Effect.ResizeWindow(this,null,null,null,this.height+d,{duration:Window.resizeEffectDuration})}else{var c=this.element.getHeight()+d;this.height+=d;this.element.setStyle({height:c+"px"});a.show()}if(!this.useTop){var b=parseFloat(this.element.getStyle("bottom"));this.element.setStyle({bottom:(b-d)+"px"})}this.toFront()}this._notify("onMinimize");this._saveCookie()},maximize:function(){if(this.isMinimized()||this.resizing){return}if(window.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 h=WindowUtilities.getWindowScroll();var b=WindowUtilities.getPageSize();var g=h.left;var f=h.top;if(this.options.parent!=document.body){h={top:0,left:0,bottom:0,right:0};var e=this.options.parent.getDimensions();b.windowWidth=e.width;b.windowHeight=e.height;f=0;g=0}if(this.constraint){b.windowWidth-=Math.max(0,this.constraintPad.left)+Math.max(0,this.constraintPad.right);b.windowHeight-=Math.max(0,this.constraintPad.top)+Math.max(0,this.constraintPad.bottom);g+=Math.max(0,this.constraintPad.left);f+=Math.max(0,this.constraintPad.top)}var d=b.windowWidth-this.widthW-this.widthE;var a=b.windowHeight-this.heightN-this.heightS;if(this.useLeft&&this.useTop&&Window.hasEffectLib&&Effect.ResizeWindow){new Effect.ResizeWindow(this,f,g,d,a,{duration:Window.resizeEffectDuration})}else{this.setSize(d,a);this.element.setStyle(this.useLeft?{left:g}:{right:g});this.element.setStyle(this.useTop?{top:f}:{bottom:f})}this.toFront();if(this.iefix){this._fixIEOverlapping()}}this._notify("onMaximize");if(this.options.eschat&&this.isMaximized()){get_chat_telao();var c=Element.getDimensions(this.element.id+"_rcvd").width-280;$(this.element.id+"_rcvd").setStyle({width:c+"px"})}else{$("chat_telao").hide();var c=Element.getDimensions(this.element.id+"_rcvd").width+280;$(this.element.id+"_rcvd").setStyle({width:c+"px"})}this._saveCookie()},isMinimized:function(){return this.minimized},isMaximized:function(){return(this.storedLocation!=null)},setOpacity:function(a){if(Element.setOpacity){Element.setOpacity(this.element,a)}},setZIndex:function(a){this.element.setStyle({zIndex:a});Windows.updateZindex(a,this)},setTitle:function(a){if(!a||a==""){a="&nbsp;"}Element.update(this.element.id+"_top",a)},setStatusBar:function(b){var a=$(this.getId()+"_bottom");if(typeof(b)=="object"){if(this.bottombar.firstChild){this.bottombar.replaceChild(b,this.bottombar.firstChild)}else{this.bottombar.appendChild(b)}}else{this.bottombar.innerHTML=b}},_checkIEOverlapping:function(){},_fixIEOverlapping:function(){Position.clone(this.element,this.iefix);this.iefix.style.zIndex=this.element.style.zIndex-1;this.iefix.show()},_getWindowBorderSize:function(b){var c=this._createHiddenDiv(this.options.className+"_n");this.heightN=Element.getDimensions(c).height;c.parentNode.removeChild(c);var c=this._createHiddenDiv(this.options.className+"_s");this.heightS=Element.getDimensions(c).height;c.parentNode.removeChild(c);var c=this._createHiddenDiv(this.options.className+"_e");this.widthE=Element.getDimensions(c).width;c.parentNode.removeChild(c);var c=this._createHiddenDiv(this.options.className+"_w");this.widthW=Element.getDimensions(c).width;c.parentNode.removeChild(c);var c=document.createElement("div");c.className="overlay_"+this.options.className;document.body.appendChild(c);var a=this;setTimeout(function(){a.overlayOpacity=($(c).getStyle("opacity"));c.parentNode.removeChild(c)},10);if(window.ie){this.heightS=$(this.getId()+"_row3").getDimensions().height;this.heightN=$(this.getId()+"_row1").getDimensions().height}if(window.khtml&&!window.webkit){this.setSize(this.width,this.height)}if(this.doMaximize){this.maximize()}if(this.doMinimize){this.minimize()}},_createHiddenDiv:function(b){var a=document.body;var c=document.createElement("div");c.setAttribute("id",this.element.id+"_tmp");c.className=b;c.style.display="none";c.innerHTML="";a.insertBefore(c,a.firstChild);return c},_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 a="";if(this.useLeft){a+="l:"+(this.storedLocation?this.storedLocation.left:this.element.getStyle("left"))}else{a+="r:"+(this.storedLocation?this.storedLocation.right:this.element.getStyle("right"))}if(this.useTop){a+=",t:"+(this.storedLocation?this.storedLocation.top:this.element.getStyle("top"))}else{a+=",b:"+(this.storedLocation?this.storedLocation.bottom:this.element.getStyle("bottom"))}a+=","+(this.storedLocation?this.storedLocation.width:this.width);a+=","+(this.storedLocation?this.storedLocation.height:this.height);a+=","+this.isMinimized();a+=","+this.isMaximized();WindowUtilities.setCookie(a,this.cookie)}},_createWiredElement:function(){if(!this.wiredElement){if(window.ie){this._getWindowBorderSize()}var b=document.createElement("div");b.className="wired_frame "+this.options.className+"_wired_frame";b.style.position="absolute";this.options.parent.insertBefore(b,this.options.parent.firstChild);this.wiredElement=$(b)}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 a=this.element.getDimensions();this.wiredElement.setStyle({width:a.width+"px",height:a.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(a){if(this.options[a]){this.options[a](this)}else{Windows.notify(a,this)}}};var Windows={windows:[],modalWindows:[],observers:[],focusedWindow:null,maxZIndex:0,overlayShowEffectOptions:{duration:0.5},overlayHideEffectOptions:{duration:0.5},addObserver:function(a){this.removeObserver(a);this.observers.push(a)},removeObserver:function(a){this.observers=this.observers.reject(function(b){return b==a})},notify:function(a,b){this.observers.each(function(c){if(c[a]){c[a](a,b)}})},getWindow:function(a){return this.windows.detect(function(b){return b.getId()==a})},getFocusedWindow:function(){return this.focusedWindow},updateFocusedWindow:function(){this.focusedWindow=this.windows.length>=2?this.windows[this.windows.length-2]:null},register:function(a){this.windows.push(a)},addModalWindow:function(a){if(this.modalWindows.length==0){WindowUtilities.disableScreen(a.options.className,"overlay_modal",a.overlayOpacity,a.getId())}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(a.getId())}this.modalWindows.push(a)},removeModalWindow:function(a){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(a){this.windows.push(a)},unregister:function(a){this.windows=this.windows.reject(function(b){return b==a})},closeAll:function(){this.windows.each(function(a){Windows.close(a.getId())})},closeAllModalWindows:function(){WindowUtilities.enableScreen();this.modalWindows.each(function(a){if(a){a.close()}})},minimize:function(c,a){var b=this.getWindow(c);if(b&&b.visible){b.minimize()}Event.stop(a)},maximize:function(c,a){var b=this.getWindow(c);if(b&&b.visible){b.maximize()}Event.stop(a)},close:function(c,a){var b=this.getWindow(c);if(b){b.close()}if(a){Event.stop(a)}},unsetOverflow:function(a){this.windows.each(function(b){b.oldOverflow=b.getContent().getStyle("overflow")||"auto";b.getContent().setStyle({overflow:"hidden"})});if(a&&a.oldOverflow){a.getContent().setStyle({overflow:a.oldOverflow})}},resetOverflow:function(){this.windows.each(function(a){if(a.oldOverflow){a.getContent().setStyle({overflow:a.oldOverflow})}})},updateZindex:function(a,b){if(a>this.maxZIndex){this.maxZIndex=a}this.focusedWindow=b}};var Dialog={dialogId:null,onCompleteFunc:null,callFunc:null,parameters:null,confirm:function(d,c){if(d&&typeof d!="string"){Dialog._runAjaxRequest(d,c,Dialog.confirm);return}d=d||"";c=c||{};var f=c.okLabel?c.okLabel:"Ok";var a=c.cancelLabel?c.cancelLabel:"Cancel";c=Object.extend(c,c.windowParameters||{});c.windowParameters=c.windowParameters||{};c.className=c.className||"alert";var b="class ='"+(c.buttonClass?c.buttonClass+" ":"")+" ok_button'";var e="class ='"+(c.buttonClass?c.buttonClass+" ":"")+" cancel_button'";var d="      <div class='"+c.className+"_message'>"+d+"</div>        <div class='"+c.className+"_buttons'>          <input type='button' value='"+f+"' onclick='Dialog.okCallback()' "+b+"/>          <input type='button' value='"+a+"' onclick='Dialog.cancelCallback()' "+e+"/>        </div>    ";return this._openDialog(d,c)},alert:function(c,b){if(c&&typeof c!="string"){Dialog._runAjaxRequest(c,b,Dialog.alert);return}c=c||"";b=b||{};var d=b.okLabel?b.okLabel:"Ok";b=Object.extend(b,b.windowParameters||{});b.windowParameters=b.windowParameters||{};b.className=b.className||"alert";var a="class ='"+(b.buttonClass?b.buttonClass+" ":"")+" ok_button'";var c="      <div class='"+b.className+"_message'>"+c+"</div>        <div class='"+b.className+"_buttons'>          <input type='button' value='"+d+"' onclick='Dialog.okCallback()' "+a+"/>        </div>";return this._openDialog(c,b)},info:function(b,a){if(b&&typeof b!="string"){Dialog._runAjaxRequest(b,a,Dialog.info);return}b=b||"";a=a||{};a=Object.extend(a,a.windowParameters||{});a.windowParameters=a.windowParameters||{};a.className=a.className||"alert";var b="<div id='modal_dialog_message' class='"+a.className+"_message'>"+b+"</div>";if(a.showProgress){b+="<div id='modal_dialog_progress' class='"+a.className+"_progress'>  </div>"}a.ok=null;a.cancel=null;return this._openDialog(b,a)},setInfoMessage:function(a){$("modal_dialog_message").update(a)},closeInfo:function(){Windows.close(this.dialogId)},_openDialog:function(e,d){var c=d.className;if(!d.height&&!d.width){d.width=WindowUtilities.getPageSize().pageWidth/2}if(d.id){this.dialogId=d.id}else{var b=new Date();this.dialogId="modal_dialog_"+b.getTime();d.id=this.dialogId}if(!d.height||!d.width){var a=WindowUtilities._computeSize(e,this.dialogId,d.width,d.height,5,c);if(d.height){d.width=a+5}else{d.height=a+5}}d.resizable=d.resizable||false;d.effectOptions=d.effectOptions;d.minimizable=false;d.maximizable=false;d.draggable=false;d.closable=false;var f=new Window(d);f.getContent().innerHTML=e;f.showCenter(true,d.top,d.left);f.setDestroyOnClose();f.cancelCallback=d.onCancel||d.cancel;f.okCallback=d.onOk||d.ok;return f},_getAjaxContent:function(a){Dialog.callFunc(a.responseText,Dialog.parameters)},_runAjaxRequest:function(c,b,a){if(c.options==null){c.options={}}Dialog.onCompleteFunc=c.options.onComplete;Dialog.parameters=b;Dialog.callFunc=a;c.options.onComplete=Dialog._getAjaxContent;new Ajax.Request(c.url,c.options)},okCallback:function(){var a=Windows.focusedWindow;if(!a.okCallback||a.okCallback(a)){$$("#"+a.getId()+" input").each(function(b){b.onclick=null});a.close()}},cancelCallback:function(){var a=Windows.focusedWindow;$$("#"+a.getId()+" input").each(function(b){b.onclick=null});a.close();if(a.cancelCallback){a.cancelCallback(a)}}};if(window.ActiveXObject){window.ie=window[window.XMLHttpRequest?"ie7":"ie6"]=true}else{if(document.childNodes&&!document.all&&!navigator.taintEnabled){window.khtml=true}else{if(document.getBoxObjectFor!=null){window.gecko=true}}}var array=navigator.userAgent.match(new RegExp(/AppleWebKit\/([\d\.\+]*)/));window.webkit=array&&array.length==2?parseFloat(array[1])>=420:false;var WindowUtilities={getWindowScroll:function(){var c=window;var d,b,a,e;b=window.pageXOffset||document.documentElement.scrollLeft;d=window.pageYOffset||document.documentElement.scrollTop;if(window.ie){a=Math.max(document.documentElement.offsetWidth,document.documentElement.scrollWidth)}else{if(window.khtml){a=document.body.scrollWidth}else{a=document.documentElement.scrollWidth}}if(window.ie){e=Math.max(document.documentElement.offsetHeight,document.documentElement.scrollHeight)}else{if(window.khtml){e=document.body.scrollHeight}else{e=document.documentElement.scrollHeight}}return{top:d,left:b,width:a,height:e}},getPageSize:function(){var e,a;if(window.innerHeight&&window.scrollMaxY){e=document.body.scrollWidth;a=window.innerHeight+window.scrollMaxY}else{if(document.body.scrollHeight>document.body.offsetHeight){e=document.body.scrollWidth;a=document.body.scrollHeight}else{e=document.body.offsetWidth;a=document.body.offsetHeight}}var c,f;if(self.innerHeight){c=self.innerWidth;f=self.innerHeight}else{if(document.documentElement&&document.documentElement.clientHeight){c=document.documentElement.clientWidth;f=document.documentElement.clientHeight}else{if(document.body){c=document.body.clientWidth;f=document.body.clientHeight}}}var d,b;if(a<f){d=f}else{d=a}if(e<c){b=c}else{b=e}return{pageWidth:b,pageHeight:d,windowWidth:c,windowHeight:f}},disableScreen:function(b,a,d,e){var c=this;WindowUtilities.initLightbox(a,b,function(){c._disableScreen(b,a,d,e)})},_disableScreen:function(e,d,c,h){var b=document.body;var g="0.65";var f=$(d);var a=WindowUtilities.getPageSize();if(h&&window.ie){WindowUtilities._hideSelect();WindowUtilities._showSelect(h)}f.style.height=(a.pageHeight+"px");f.style.display="none";if(d=="overlay_modal"&&Window.hasEffectLib&&Windows.overlayShowEffectOptions){f.overlayOpacity=g;new Effect.Appear(f,Object.extend({from:0,to:g},Windows.overlayShowEffectOptions))}else{f.style.display="block"}},enableScreen:function(b){b=b||"overlay_modal";var a=$(b);if(a){if(b=="overlay_modal"&&Window.hasEffectLib&&Windows.overlayHideEffectOptions){new Effect.Fade(a,Object.extend({from:a.overlayOpacity,to:0},Windows.overlayHideEffectOptions))}else{a.style.display="none";a.parentNode.removeChild(a)}if(b!="__invisible__"){WindowUtilities._showSelect()}}},_hideSelect:function(a){if(window.ie){a=a==null?"":"#"+a+" ";$$(a+"select").each(function(b){if(!WindowUtilities.isDefined(b.oldVisibility)){b.oldVisibility=b.style.visibility?b.style.visibility:"visible";b.style.visibility="hidden"}})}},_showSelect:function(a){if(window.ie){a=a==null?"":"#"+a+" ";$$(a+"select").each(function(b){if(WindowUtilities.isDefined(b.oldVisibility)){try{b.style.visibility=b.oldVisibility}catch(c){b.style.visibility="visible"}b.oldVisibility=null}else{if(b.style.visibility){b.style.visibility="visible"}}})}},isDefined:function(a){return typeof(a)!="undefined"&&a!=null},initLightbox:function(e,c,b){if($(e)){Element.setStyle(e,{zIndex:Windows.maxZIndex+1});Windows.maxZIndex++;b()}else{var a=document.body;var d=document.createElement("div");d.setAttribute("id",e);d.className="overlay_"+c;d.style.display="none";d.style.position="absolute";d.style.top="0";d.style.left="0";d.style.zIndex=Windows.maxZIndex+1;Windows.maxZIndex++;d.style.width="100%";a.insertBefore(d,a.firstChild);if(window.khtml&&e=="overlay_modal"){setTimeout(function(){b()},10)}else{b()}}},setCookie:function(b,a){var c=new Date();c.setDate(c.getDate()+a[1]);document.cookie=a[0]+"="+escape(b)+((a[1])?"; expires="+c.toGMTString():"")+((a[2])?"; path="+a[2]:"")+((a[3])?"; domain="+a[3]:"")+((a[4])?"; secure":"")},getCookie:function(c){var b=document.cookie;var e=c+"=";var d=b.indexOf("; "+e);if(d==-1){d=b.indexOf(e);if(d!=0){return null}}else{d+=2}var a=document.cookie.indexOf(";",d);if(a==-1){a=b.length}return unescape(b.substring(d+e.length,a))},_computeSize:function(e,a,b,g,d,f){var k=document.body;var c=document.createElement("div");c.setAttribute("id",a);c.className=f+"_content";if(g){c.style.height=g+"px"}else{c.style.width=b+"px"}c.style.position="absolute";c.style.top="0";c.style.left="0";c.style.display="none";c.innerHTML=e;k.insertBefore(c,k.firstChild);var h;if(g){h=$(a).getDimensions().width+d}else{h=$(a).getDimensions().height+d}k.removeChild(c);return h}};function SoundManager(c,a){var b=this;this.version="V2.0b.20070415";this.url=(c||"soundmanager2.swf");this.debugMode=false;this.useConsole=true;this.consoleOnly=false;this.nullURL="data/null.mp3";this.defaultOptions={autoLoad:false,stream:true,autoPlay:false,onid3:null,onload:null,whileloading:null,onplay:null,whileplaying:null,onstop:null,onfinish:null,onbeforefinish:null,onbeforefinishtime:5000,onbeforefinishcomplete:null,onjustbeforefinish:null,onjustbeforefinishtime:200,multiShot:true,pan:0,volume:100};this.allowPolling=true;this.enabled=false;this.o=null;this.id=(a||"sm2movie");this.oMC=null;this.sounds=[];this.soundIDs=[];this.isIE=(navigator.userAgent.match(/MSIE/));this.isSafari=(navigator.userAgent.match(/safari/i));this.debugID="soundmanager-debug";this._debugOpen=true;this._didAppend=false;this._appendSuccess=false;this._didInit=false;this._disabled=false;this._hasConsole=(typeof console!="undefined"&&typeof console.log!="undefined");this._debugLevels=!b.isSafari?["debug","info","warn","error"]:["log","log","log","log"];this.getMovie=function(d){return b.isIE?window[d]:(b.isSafari?document[d+"-embed"]:document.getElementById(d+"-embed"))};this.loadFromXML=function(e){try{b.o._loadFromXML(e)}catch(d){b._failSafely();return true}};this.createSound=function(f){if(!b._didInit){throw new Error("soundManager.createSound(): Not loaded yet - wait for soundManager.onload() before calling sound-related methods")}if(arguments.length==2){f={id:arguments[0],url:arguments[1]}}var e=b._mergeObjects(f);b._writeDebug('soundManager.createSound(): "<a href="#" onclick="soundManager.play(\''+e.id+'\');return false" title="play this sound">'+e.id+'</a>" ('+e.url+")",1);if(b._idCheck(e.id,true)){b._writeDebug("sound "+e.id+" already defined - exiting",2);return false}b.sounds[e.id]=new SMSound(b,e);b.soundIDs[b.soundIDs.length]=e.id;try{b.o._createSound(e.id,e.onjustbeforefinishtime)}catch(d){b._failSafely();return true}if(e.autoLoad||e.autoPlay){b.sounds[e.id].load(e)}if(e.autoPlay){b.sounds[e.id].playState=1}};this.destroySound=function(e){if(!b._idCheck(e)){return false}for(var d=b.soundIDs.length;d--;){if(b.soundIDs[d]==e){delete b.soundIDs[d];continue}}b.sounds[e].unload();delete b.sounds[e]};this.load=function(e,d){if(!b._idCheck(e)){return false}b.sounds[e].load(d)};this.unload=function(d){if(!b._idCheck(d)){return false}b.sounds[d].unload()};this.play=function(e,d){if(!b._idCheck(e)){if(typeof d!="Object"){d={url:d}}if(d&&d.url){b._writeDebug('soundController.play(): attempting to create "'+e+'"',1);d.id=e;b.createSound(d)}else{return false}}b.sounds[e].play(d)};this.start=this.play;this.setPosition=function(e,d){if(!b._idCheck(e)){return false}b.sounds[e].setPosition(d)};this.stop=function(d){if(!b._idCheck(d)){return false}b._writeDebug("soundManager.stop("+d+")",1);b.sounds[d].stop()};this.stopAll=function(){b._writeDebug("soundManager.stopAll()",1);for(var d in b.sounds){if(b.sounds[d] instanceof SMSound){b.sounds[d].stop()}}};this.pause=function(d){if(!b._idCheck(d)){return false}b.sounds[d].pause()};this.resume=function(d){if(!b._idCheck(d)){return false}b.sounds[d].resume()};this.togglePause=function(d){if(!b._idCheck(d)){return false}b.sounds[d].togglePause()};this.setPan=function(e,d){if(!b._idCheck(e)){return false}b.sounds[e].setPan(d)};this.setVolume=function(d,e){if(!b._idCheck(d)){return false}b.sounds[d].setVolume(e)};this.setPolling=function(d){if(!b.o||!b.allowPolling){return false}b._writeDebug("soundManager.setPolling("+d+")");b.o._setPolling(d)};this.disable=function(){if(b._disabled){return false}b._disabled=true;b._writeDebug("soundManager.disable(): Disabling all functions - future calls will return false.",1);for(var d=b.soundIDs.length;d--;){b._disableObject(b.sounds[b.soundIDs[d]])}b.initComplete();b._disableObject(b)};this.getSoundById=function(e,d){if(!e){throw new Error("SoundManager.getSoundById(): sID is null/undefined")}var f=b.sounds[e];if(!f&&!d){b._writeDebug('"'+e+'" is an invalid sound ID.',2)}return f};this.onload=function(){soundManager._writeDebug("<em>Warning</em>: soundManager.onload() is undefined.",2)};this.onerror=function(){};this._idCheck=this.getSoundById;this._disableObject=function(d){for(var e in d){if(typeof d[e]=="function"&&typeof d[e]._protected=="undefined"){d[e]=function(){return false}}}e=null};this._failSafely=function(){var e="http://www.macromedia.com/support/documentation/en/flashplayer/help/settings_manager04.html";var d="You may need to whitelist this location/domain eg. file:///C:/ or C:/ or mysite.com, or set ALWAYS ALLOW under the Flash Player Global Security Settings page. Note that this seems to apply only to file system viewing.";var f='<a href="'+e+'" title="'+d+'">view/edit</a>';var g='<a href="'+e+'" title="Flash Player Global Security Settings">FPGSS</a>';if(!b._disabled){b._writeDebug("soundManager: JS-&gt;Flash communication failed. Possible causes: flash/browser security restrictions ("+f+"), insufficient browser/plugin support, or .swf not found",2);b._writeDebug("Verify that the movie path of <em>"+b.url+'</em> is correct (<a href="'+b.url+'" title="If you get a 404/not found, fix it!">test link</a>)',1);if(b._didAppend){if(!document.domain){b._writeDebug("Loading from local file system? (document.domain appears to be null, this URL path may need to be added to 'trusted locations' in "+g+")",1);b._writeDebug("Possible security/domain restrictions ("+f+"), should work when served by http on same domain",1)}}b.disable()}};this._createMovie=function(o,p){if(b._didAppend&&b._appendSuccess){return false}if(window.location.href.indexOf("debug=1")+1){b.debugMode=true}b._didAppend=true;var k=['<object classid="clsid:d27cdb6e-ae6d-11cf-96b8-444553540000" codebase="http://fpdownload.macromedia.com/pub/shockwave/cabs/flash/swflash.cab#version=8,0,0,0" width="16" height="16" id="'+o+'"><param name="movie" value="'+p+'"><param name="quality" value="high"><param name="allowScriptAccess" value="always" /></object>','<embed name="'+o+'-embed" id="'+o+'-embed" src="'+p+'" width="1" height="1" quality="high" allowScriptAccess="always" pluginspage="http://www.macromedia.com/go/getflashplayer" type="application/x-shockwave-flash"></embed>'];var f='<div id="'+b.debugID+'-toggle" style="position:fixed;_position:absolute;right:0px;bottom:0px;_top:0px;width:1.2em;height:1.2em;line-height:1.2em;margin:2px;padding:0px;text-align:center;border:1px solid #999;cursor:pointer;background:#fff;color:#333;z-index:706" title="Toggle SM2 debug console" onclick="soundManager._toggleDebug()">-</div>';var h='<div id="'+b.debugID+'" style="display:'+(b.debugMode&&((!b._hasConsole||!b.useConsole)||(b.useConsole&&b._hasConsole&&!b.consoleOnly))?"block":"none")+';opacity:0.85"></div>';var l="soundManager._createMovie(): appendChild/innerHTML set failed. Serving application/xhtml+xml MIME type? Browser may be enforcing strict rules, not allowing write to innerHTML. (PS: If so, this means your commitment to XML validation is going to break stuff now, because this part isn't finished yet. ;))";var n='<div style="position:absolute;left:-256px;top:-256px;width:1px;height:1px" class="movieContainer">'+k[b.isIE?0:1]+"</div>"+(b.debugMode&&((!b._hasConsole||!b.useConsole)||(b.useConsole&&b._hasConsole&&!b.consoleOnly))&&!document.getElementById(b.debugID)?"x"+h+f:"");var d=(document.body?document.body:document.getElementsByTagName("div")[0]);if(d){b.oMC=document.createElement("div");b.oMC.className="movieContainer";b.oMC.style.position="absolute";b.oMC.style.left="-256px";b.oMC.style.width="1px";b.oMC.style.height="1px";try{d.appendChild(b.oMC);b.oMC.innerHTML=k[b.isIE?0:1];b._appendSuccess=true}catch(g){throw new Error(l)}if(!document.getElementById(b.debugID)&&((!b._hasConsole||!b.useConsole)||(b.useConsole&&b._hasConsole&&!b.consoleOnly))){var e=document.createElement("div");e.id=b.debugID;e.style.display=(b.debugMode?"block":"none");if(b.debugMode){try{var m=document.createElement("div");d.appendChild(m);m.innerHTML=f}catch(g){throw new Error(l)}}d.appendChild(e)}d=null}b._writeDebug("-- SoundManager 2 Version "+b.version.substr(1)+" --",1);b._writeDebug('soundManager._createMovie(): trying to load <a href="'+p+'" title="Test this link (404=bad)">'+p+"</a>",1)};this._writeDebug=function(k,d){if(!b.debugMode){return false}if(b._hasConsole&&b.useConsole){console[b._debugLevels[d]||"log"](k);if(b.useConsoleOnly){return true}}var e="soundmanager-debug";try{var f=document.getElementById(e);if(!f){return false}var g=document.createElement("div");g.innerHTML=k;f.insertBefore(g,f.firstChild)}catch(h){}f=null};this._writeDebug._protected=true;this._writeDebugAlert=function(d){alert(d)};if(window.location.href.indexOf("debug=alert")+1){b.debugMode=true;b._writeDebug=b._writeDebugAlert}this._toggleDebug=function(){var d=document.getElementById(b.debugID);var e=document.getElementById(b.debugID+"-toggle");if(!d){return false}if(b._debugOpen){e.innerHTML="+";d.style.display="none"}else{e.innerHTML="-";d.style.display="block"}b._debugOpen=!b._debugOpen};this._toggleDebug._protected=true;this._debug=function(){b._writeDebug("soundManager._debug(): sounds by id/url:",0);for(var d=0,e=b.soundIDs.length;d<e;d++){b._writeDebug(b.sounds[b.soundIDs[d]].sID+" | "+b.sounds[b.soundIDs[d]].url,0)}};this._mergeObjects=function(g,h){var e=g;var f=(typeof h=="undefined"?b.defaultOptions:h);for(var d in f){if(typeof e[d]=="undefined"){e[d]=f[d]}}return e};this.createMovie=function(d){if(d){b.url=d}b._initMovie()};this._initMovie=function(){if(b.o){return false}b.o=b.getMovie(b.id);if(!b.o){b._createMovie(b.id,b.url);b.o=b.getMovie(b.id)}if(b.o){b._writeDebug("soundManager._initMovie(): Got "+b.o.nodeName+" element ("+(b._didAppend?"created via JS":"static HTML")+")",1)}};this.initComplete=function(){if(b._didInit){return false}b._didInit=true;b._writeDebug("-- SoundManager 2 "+(b._disabled?"failed to load":"loaded")+" ("+(b._disabled?"security/load error":"OK")+") --",1);if(b._disabled){b._writeDebug("soundManager.initComplete(): calling soundManager.onerror()",1);b.onerror.apply(window);return false}b._writeDebug("soundManager.initComplete(): calling soundManager.onload()",1);try{b.onload.apply(window)}catch(d){b._writeDebug("soundManager.onload() threw an exception: "+d.message,2);throw d}b._writeDebug("soundManager.onload() complete",1)};this.init=function(){if(window.removeEventListener){window.removeEventListener("load",b.beginInit,false)}else{if(window.detachEvent){window.detachEvent("onload",b.beginInit)}}try{b.o._externalInterfaceTest();b._writeDebug("Flash ExternalInterface call (JS -&gt; Flash) succeeded.",1);if(!b.allowPolling){b._writeDebug("Polling (whileloading/whileplaying support) is disabled.",1)}b.setPolling(true);b.enabled=true}catch(d){b._failSafely();b.initComplete();return false}b.initComplete()};this.beginDelayedInit=function(){setTimeout(b.beginInit,200)};this.beginInit=function(){b.createMovie();b._initMovie();setTimeout(b.init,1000)};this.destruct=function(){if(b.isSafari){for(var d=b.soundIDs.length;d--;){if(b.sounds[b.soundIDs[d]].readyState==1){b.sounds[b.soundIDs[d]].unload()}}}b.disable()}}function SMSound(c,d){var a=this;var b=c;this.sID=d.id;this.url=d.url;this.options=b._mergeObjects(d);this.id3={};a.resetProperties=function(e){a.bytesLoaded=null;a.bytesTotal=null;a.position=null;a.duration=null;a.durationEstimate=null;a.loaded=false;a.loadSuccess=null;a.playState=0;a.paused=false;a.readyState=0;a.didBeforeFinish=false;a.didJustBeforeFinish=false};a.resetProperties();this.load=function(g){a.loaded=false;a.loadSuccess=null;a.readyState=1;a.playState=(g.autoPlay||false);var f=b._mergeObjects(g);if(typeof f.url=="undefined"){f.url=a.url}try{b._writeDebug("loading "+f.url,1);b.o._load(a.sID,f.url,f.stream,f.autoPlay,f.whileloading?1:0)}catch(e){b._writeDebug("SMSound().load(): JS-&gt;Flash communication failed.",2)}};this.unload=function(){b._writeDebug('SMSound().unload(): "'+a.sID+'"');a.setPosition(0);b.o._unload(a.sID,b.nullURL);a.resetProperties()};this.play=function(f){if(!f){f={}}if(f.onfinish){a.options.onfinish=f.onfinish}if(f.onbeforefinish){a.options.onbeforefinish=f.onbeforefinish}if(f.onjustbeforefinish){a.options.onjustbeforefinish=f.onjustbeforefinish}var e=b._mergeObjects(f);if(a.playState==1){var g=e.multiShot;if(!g){b._writeDebug('SMSound.play(): "'+a.sID+'" already playing? (one-shot)',1);return false}else{b._writeDebug('SMSound.play(): "'+a.sID+'" already playing (multi-shot)',1)}}if(!a.loaded){if(a.readyState==0){b._writeDebug('SMSound.play(): .play() before load request. Attempting to load "'+a.sID+'"',1);e.stream=true;e.autoPlay=true;a.load(e)}else{if(a.readyState==2){b._writeDebug('SMSound.play(): Could not load "'+a.sID+'" - exiting',2);return false}else{b._writeDebug('SMSound.play(): "'+a.sID+'" is loading - attempting to play..',1)}}}else{b._writeDebug('SMSound.play(): "'+a.sID+'"')}if(a.paused){a.resume()}else{a.playState=1;a.position=(e.offset||0);if(e.onplay){e.onplay.apply(a)}a.setVolume(e.volume);a.setPan(e.pan);if(!e.autoPlay){b.o._start(a.sID,e.loop||1,a.position)}}};this.start=this.play;this.stop=function(e){if(a.playState==1){a.playState=0;a.paused=false;if(b.defaultOptions.onstop){b.defaultOptions.onstop.apply(a)}b.o._stop(a.sID)}};this.setPosition=function(e){b.o._setPosition(a.sID,e/1000,a.paused||!a.playState)};this.pause=function(){if(a.paused){return false}b._writeDebug("SMSound.pause()");a.paused=true;b.o._pause(a.sID)};this.resume=function(){if(!a.paused){return false}b._writeDebug("SMSound.resume()");a.paused=false;b.o._pause(a.sID)};this.togglePause=function(){b._writeDebug("SMSound.togglePause()");if(!a.playState){a.play({offset:a.position/1000});return false}if(a.paused){b._writeDebug("SMSound.togglePause(): resuming..");a.resume()}else{b._writeDebug("SMSound.togglePause(): pausing..");a.pause()}};this.setPan=function(e){if(typeof e=="undefined"){e=0}b.o._setPan(a.sID,e);a.options.pan=e};this.setVolume=function(e){if(typeof e=="undefined"){e=100}b.o._setVolume(a.sID,e);a.options.volume=e};this._whileloading=function(g,f,e){a.bytesLoaded=g;a.bytesTotal=f;a.duration=e;a.durationEstimate=parseInt((a.bytesTotal/a.bytesLoaded)*a.duration);if(a.readyState!=3&&a.options.whileloading){a.options.whileloading.apply(a)}};this._onid3=function(f,k){b._writeDebug('SMSound()._onid3(): "'+this.sID+'" ID3 data received.');var e=[];for(var g=0,h=f.length;g<h;g++){e[f[g]]=k[g]}a.id3=b._mergeObjects(a.id3,e);if(a.options.onid3){a.options.onid3.apply(a)}};this._whileplaying=function(e){if(isNaN(e)||e==null){return false}a.position=e;if(a.playState==1){if(a.options.whileplaying){a.options.whileplaying.apply(a)}if(a.loaded&&a.options.onbeforefinish&&a.options.onbeforefinishtime&&!a.didBeforeFinish&&a.duration-a.position<=a.options.onbeforefinishtime){b._writeDebug("duration-position &lt;= onbeforefinishtime: "+a.duration+" - "+a.position+" &lt= "+a.options.onbeforefinishtime+" ("+(a.duration-a.position)+")");a._onbeforefinish()}}};this._onload=function(e){e=(e==1?true:false);b._writeDebug('SMSound._onload(): "'+a.sID+'"'+(e?" loaded.":' failed to load (or loaded from cache - weird bug) - [<a href="'+a.url+'">test URL</a>]'));a.loaded=e;a.loadSuccess=e;a.readyState=e?3:2;if(a.options.onload){a.options.onload.apply(a)}};this._onbeforefinish=function(){if(!a.didBeforeFinish){a.didBeforeFinish=true;if(a.options.onbeforefinish){a.options.onbeforefinish.apply(a)}}};this._onjustbeforefinish=function(e){if(!a.didJustBeforeFinish){a.didJustBeforeFinish=true;if(a.options.onjustbeforefinish){a.options.onjustbeforefinish.apply(a)}}};this._onfinish=function(){b._writeDebug('SMSound._onfinish(): "'+a.sID+'"');a.playState=0;a.paused=false;if(a.options.onfinish){a.options.onfinish.apply(a)}if(a.options.onbeforefinishcomplete){a.options.onbeforefinishcomplete.apply(a)}a.setPosition(0);a.didBeforeFinish=false;a.didJustBeforeFinish=false}}var hexcase=0;var b64pad="";var chrsz=8;function hex_md5(a){return binl2hex(core_md5(str2binl(a),a.length*chrsz))}function b64_md5(a){return binl2b64(core_md5(str2binl(a),a.length*chrsz))}function str_md5(a){return binl2str(core_md5(str2binl(a),a.length*chrsz))}function hex_hmac_md5(a,b){return binl2hex(core_hmac_md5(a,b))}function b64_hmac_md5(a,b){return binl2b64(core_hmac_md5(a,b))}function str_hmac_md5(a,b){return binl2str(core_hmac_md5(a,b))}function md5_vm_test(){return hex_md5("abc")=="900150983cd24fb0d6963f7d28e17f72"}function core_md5(q,l){q[l>>5]|=128<<((l)%32);q[(((l+64)>>>9)<<4)+14]=l;var p=1732584193;var o=-271733879;var n=-1732584194;var m=271733878;for(var g=0;g<q.length;g+=16){var k=p;var h=o;var f=n;var e=m;p=md5_ff(p,o,n,m,q[g+0],7,-680876936);m=md5_ff(m,p,o,n,q[g+1],12,-389564586);n=md5_ff(n,m,p,o,q[g+2],17,606105819);o=md5_ff(o,n,m,p,q[g+3],22,-1044525330);p=md5_ff(p,o,n,m,q[g+4],7,-176418897);m=md5_ff(m,p,o,n,q[g+5],12,1200080426);n=md5_ff(n,m,p,o,q[g+6],17,-1473231341);o=md5_ff(o,n,m,p,q[g+7],22,-45705983);p=md5_ff(p,o,n,m,q[g+8],7,1770035416);m=md5_ff(m,p,o,n,q[g+9],12,-1958414417);n=md5_ff(n,m,p,o,q[g+10],17,-42063);o=md5_ff(o,n,m,p,q[g+11],22,-1990404162);p=md5_ff(p,o,n,m,q[g+12],7,1804603682);m=md5_ff(m,p,o,n,q[g+13],12,-40341101);n=md5_ff(n,m,p,o,q[g+14],17,-1502002290);o=md5_ff(o,n,m,p,q[g+15],22,1236535329);p=md5_gg(p,o,n,m,q[g+1],5,-165796510);m=md5_gg(m,p,o,n,q[g+6],9,-1069501632);n=md5_gg(n,m,p,o,q[g+11],14,643717713);o=md5_gg(o,n,m,p,q[g+0],20,-373897302);p=md5_gg(p,o,n,m,q[g+5],5,-701558691);m=md5_gg(m,p,o,n,q[g+10],9,38016083);n=md5_gg(n,m,p,o,q[g+15],14,-660478335);o=md5_gg(o,n,m,p,q[g+4],20,-405537848);p=md5_gg(p,o,n,m,q[g+9],5,568446438);m=md5_gg(m,p,o,n,q[g+14],9,-1019803690);n=md5_gg(n,m,p,o,q[g+3],14,-187363961);o=md5_gg(o,n,m,p,q[g+8],20,1163531501);p=md5_gg(p,o,n,m,q[g+13],5,-1444681467);m=md5_gg(m,p,o,n,q[g+2],9,-51403784);n=md5_gg(n,m,p,o,q[g+7],14,1735328473);o=md5_gg(o,n,m,p,q[g+12],20,-1926607734);p=md5_hh(p,o,n,m,q[g+5],4,-378558);m=md5_hh(m,p,o,n,q[g+8],11,-2022574463);n=md5_hh(n,m,p,o,q[g+11],16,1839030562);o=md5_hh(o,n,m,p,q[g+14],23,-35309556);p=md5_hh(p,o,n,m,q[g+1],4,-1530992060);m=md5_hh(m,p,o,n,q[g+4],11,1272893353);n=md5_hh(n,m,p,o,q[g+7],16,-155497632);o=md5_hh(o,n,m,p,q[g+10],23,-1094730640);p=md5_hh(p,o,n,m,q[g+13],4,681279174);m=md5_hh(m,p,o,n,q[g+0],11,-358537222);n=md5_hh(n,m,p,o,q[g+3],16,-722521979);o=md5_hh(o,n,m,p,q[g+6],23,76029189);p=md5_hh(p,o,n,m,q[g+9],4,-640364487);m=md5_hh(m,p,o,n,q[g+12],11,-421815835);n=md5_hh(n,m,p,o,q[g+15],16,530742520);o=md5_hh(o,n,m,p,q[g+2],23,-995338651);p=md5_ii(p,o,n,m,q[g+0],6,-198630844);m=md5_ii(m,p,o,n,q[g+7],10,1126891415);n=md5_ii(n,m,p,o,q[g+14],15,-1416354905);o=md5_ii(o,n,m,p,q[g+5],21,-57434055);p=md5_ii(p,o,n,m,q[g+12],6,1700485571);m=md5_ii(m,p,o,n,q[g+3],10,-1894986606);n=md5_ii(n,m,p,o,q[g+10],15,-1051523);o=md5_ii(o,n,m,p,q[g+1],21,-2054922799);p=md5_ii(p,o,n,m,q[g+8],6,1873313359);m=md5_ii(m,p,o,n,q[g+15],10,-30611744);n=md5_ii(n,m,p,o,q[g+6],15,-1560198380);o=md5_ii(o,n,m,p,q[g+13],21,1309151649);p=md5_ii(p,o,n,m,q[g+4],6,-145523070);m=md5_ii(m,p,o,n,q[g+11],10,-1120210379);n=md5_ii(n,m,p,o,q[g+2],15,718787259);o=md5_ii(o,n,m,p,q[g+9],21,-343485551);p=safe_add(p,k);o=safe_add(o,h);n=safe_add(n,f);m=safe_add(m,e)}return Array(p,o,n,m)}function md5_cmn(h,e,d,c,g,f){return safe_add(bit_rol(safe_add(safe_add(e,h),safe_add(c,f)),g),d)}function md5_ff(g,f,m,l,e,k,h){return md5_cmn((f&m)|((~f)&l),g,f,e,k,h)}function md5_gg(g,f,m,l,e,k,h){return md5_cmn((f&l)|(m&(~l)),g,f,e,k,h)}function md5_hh(g,f,m,l,e,k,h){return md5_cmn(f^m^l,g,f,e,k,h)}function md5_ii(g,f,m,l,e,k,h){return md5_cmn(m^(f|(~l)),g,f,e,k,h)}function core_hmac_md5(c,f){var e=str2binl(c);if(e.length>16){e=core_md5(e,c.length*chrsz)}var a=Array(16),d=Array(16);for(var b=0;b<16;b++){a[b]=e[b]^909522486;d[b]=e[b]^1549556828}var g=core_md5(a.concat(str2binl(f)),512+f.length*chrsz);return core_md5(d.concat(g),512+128)}function safe_add(a,d){var c=(a&65535)+(d&65535);var b=(a>>16)+(d>>16)+(c>>16);return(b<<16)|(c&65535)}function bit_rol(a,b){return(a<<b)|(a>>>(32-b))}function str2binl(d){var c=Array();var a=(1<<chrsz)-1;for(var b=0;b<d.length*chrsz;b+=chrsz){c[b>>5]|=(d.charCodeAt(b/chrsz)&a)<<(b%32)}return c}function binl2str(c){var d="";var a=(1<<chrsz)-1;for(var b=0;b<c.length*32;b+=chrsz){d+=String.fromCharCode((c[b>>5]>>>(b%32))&a)}return d}function binl2hex(c){var b=hexcase?"0123456789ABCDEF":"0123456789abcdef";var d="";for(var a=0;a<c.length*4;a++){d+=b.charAt((c[a>>2]>>((a%4)*8+4))&15)+b.charAt((c[a>>2]>>((a%4)*8))&15)}return d}function binl2b64(d){var c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";var f="";for(var b=0;b<d.length*4;b+=3){var e=(((d[b>>2]>>8*(b%4))&255)<<16)|(((d[b+1>>2]>>8*((b+1)%4))&255)<<8)|((d[b+2>>2]>>8*((b+2)%4))&255);for(var a=0;a<4;a++){if(b*8+a*6>d.length*32){f+=b64pad}else{f+=c.charAt((e>>6*(3-a))&63)}}}return f}(function(){var a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},b={array:function(d){var g=["["],c,m,k,e=d.length,h;for(k=0;k<e;k+=1){h=d[k];m=b[typeof h];if(m){h=m(h);if(typeof h=="string"){if(c){g[g.length]=","}g[g.length]=h;c=true}}}g[g.length]="]";return g.join("")},"boolean":function(c){return String(c)},"null":function(c){return"null"},number:function(c){return isFinite(c)?String(c):"null"},object:function(d){if(d){if(d instanceof Array){return b.array(d)}var e=["{"],c,k,h,g;for(h in d){g=d[h];k=b[typeof g];if(k){g=k(g);if(typeof g=="string"){if(c){e[e.length]=","}e.push(b.string(h),":",g);c=true}}}e[e.length]="}";return e.join("")}return"null"},string:function(c){if(/["\\\x00-\x1f]/.test(c)){c=c.replace(/([\x00-\x1f\\"])/g,function(e,d){var f=a[d];if(f){return f}f=d.charCodeAt();return"\\u00"+Math.floor(f/16).toString(16)+(f%16).toString(16)})}return'"'+c+'"'}};Object.prototype.toJSONString=function(){return b.object(this)};Array.prototype.toJSONString=function(){return b.array(this)}})();String.prototype.parseJSON=function(){try{return !(/[^,:{}\[\]0-9.\-+Eaeflnr-u \n\r\t]/.test(this.replace(/"(\\.|[^"\\])*"/g,"")))&&eval("("+this+")")}catch(e){return false}};function XHConn(){var b,a=false;b=XHRFactory.getInstance();if(!b){return null}this.connect=function(e,d,c,f){if(!b){return false}a=false;d=d.toUpperCase();try{if(d=="GET"){b.open(d,e+"?"+c,true);c=""}else{b.open(d,e,true);b.setRequestHeader("Method","POST "+e+" HTTP/1.1");b.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}b.onreadystatechange=function(){if(b.readyState==4&&!a){a=true;if(f!=null){f(b)}XHRFactory.release(b)}};b.send(c)}catch(g){return false}return true};return this}var XHRFactory=(function(){var b=new Array();var e=10;var a=function(){};function d(){if(window.XMLHttpRequest){return new XMLHttpRequest()}else{if(window.ActiveXObject){return new ActiveXObject("Microsoft.XMLHTTP")}}}for(var c=0;c<e;c++){b.push(d())}return({release:function(f){f.onreadystatechange=a;b.push(f)},getInstance:function(){if(b.length<1){return d()}else{return b.pop()}},toString:function(){return"stack size = "+b.length}})})();var siteName="ChatBarh";var allowNewUsers=true;var languageOptions=[["brazilian_portuguese","Portugues do Brasil"],["english","English"],["spanish","Spanish"],["german","German"],["french","French"],["italian","Italian"]];var theme="dark";var alertWidth=400;var useBlinker=true;var blinkSpeed=1000;var pulsateTitles=true;var audioNotify=true;var pingFrequency=2500;var pingTo="ajax_im.php";var adminPingTo="admin.php";var blockedBuddyStatus=true;var imWidth=310;var imHeight=335;var imDetachable=true;var buddyListLoc=1;var idleTime=15;var useLingo=false;var lingoPunction=[[" "," "],["\\.\\.",".."],["\\.\\.\\.","..."],["\\.\\.\\.\\.","...."],["\\.\\.\\.\\.\\.","....."],["\\.","."],[",",","],[";",";"],["\\!","!"],["\\?","?"]];var useIcons=true;var pathToIcons="thumb.php?&w=25&h=25&q=40&zc=1&src=buddyicons/";var showInList=true;var vanishingIcons=true;var vanishingSpeed=30000;var defaultIcon="default.png";var defaultIconChat="./themes/dark/profile.png";var imHistory=true;var timestamp="[H:i:s]";var roons_online=new Array();var System={login:function(d,e){var f=(d?d:$("username").value);var c=(e?e:$("password").value);var b=Languages.current;$("input_ok").addClassName("input_load");var a=new XHConn();a.connect(pingTo,"POST","call=login&username="+f+"&password="+hex_md5(c)+"&langcurrent="+b,function(v){if(v.responseText=="invalid"||v.responseText=="banned"){$("login_error_msg").innerHTML=(v.responseText=="invalid"?Languages.get("incorrectInfo"):Languages.get("userBanned"));$("login_error_msg").show();new Effect.Shake("modal");$("input_ok").removeClassName("input_load")}else{loggedIn=true;user=f;pass=hex_md5(c);defaultTitle=document.title=document.title+": "+user;$("languageList").hide();$("droppable_container").show();$("body").addClassName("body_login");$("menu_bubplastic").show();$("searchBuddy").value=Languages.get("addBuddyButton");if(typeof(Buddylist)!="undefined"){Buddylist.create();if(trim(v.responseText).length==0){System.logout()}var l=v.responseText.parseJSON();pingTimer=setInterval("System.ping()",pingFrequency);$("modal").hide();if(l.blocked&&l.blocked.length>0){var h=l.blocked.parseJSON();Buddylist.blocked=h}else{Buddylist.blocked={}}var r;if(l.buddy&&l.buddy.length>0){var n=l.buddy.parseJSON();for(var w in n){if(!$(w.replace(/\s/,"_")+"_group")&&w!="toJSONString"){Buddylist.addGroup(w)}if(!Buddylist.list[w]){Buddylist.list[w]={}}for(i=0;i<n[w].length;i++){r=n[w][i];Buddylist.list[w][r.username]={username:r.username,blocked:(Buddylist.blocked.inArray(r.username)?true:false),status:r.is_online,icon:r.icon};if(typeof(Buddylist.listObjects[r.username])=="undefined"){Buddylist.addBuddy(r.username,w,r.icon)}$(Buddylist.listObjects[r.username].obj).setStyle({display:"block"});if(!blockedBuddyStatus&&Buddylist.list[w][r.username].blocked){Buddylist.moveBuddy(r.username,Languages.get("offline"));$(Buddylist.listObjects[r.username].img).src="themes/"+theme+"/blocked.png"}else{if(r.is_online==0||r.is_online==50){Buddylist.moveBuddy(r.username,Languages.get("offline"));$(Buddylist.listObjects[r.username].img).src="themes/"+theme+"/offline.png"}else{if(r.is_online==2){Buddylist.moveBuddy(r.username,w);$(Buddylist.listObjects[r.username].img).src="themes/"+theme+"/away.png"}else{Buddylist.moveBuddy(r.username,w);$(Buddylist.listObjects[r.username].img).src="themes/"+theme+"/online.png"}}if(Buddylist.list[w][r.username].blocked==true){$(Buddylist.listObjects[r.username].img).src="themes/"+theme+"/blocked.png"}}}}}}if(l.admin==1){var z=document.createElement("script");z.src="js/admin2.js?"+(new Date()).getTime();z.type="text/javascript";document.getElementsByTagName("head").item(0).appendChild(z);$("blBottomToolbar").innerHTML+='<a title="Admin" id="admin-button" href="#" class="stdButton" onclick="AdminWindows.adminButton();return false;" onmouseover="ButtonCtl.hover(this);" onmousedown="ButtonCtl.down(this);" onmouseup="ButtonCtl.normal(this);" onmouseout="ButtonCtl.normal(this);">Admin</a>';$("admin-button").setStyle({position:"absolute",left:"0",top:"0"})}Event.observe(document,"focus",function(){blinkerOn(false)});Event.observe(window,"focus",function(){blinkerOn(false)});Event.observe(document,"blur",function(){blinkerOn(true)});Event.observe(window,"blur",function(){blinkerOn(true)});Event.observe(document,"keypress",function(s){s=s||window.event;if(Windows.focusedWindow.getId().indexOf("_im")!=-1&&IM.sendBoxWithFocus==null){var A=$(Windows.focusedWindow.getId()+"_sendBox");A.focus();A.value+=String.fromCharCode(s.charCode)}});Event.stopObserving(window,"resize",recenterModal);var k="";var m=(typeof(l.roomlang)!=="undefined"?l.roomlang.length:0);for(i=0;i<m;i++){var q=l.roomlang[i];if(i==2){k='<div class="droppable" id="droppable_'+i+'" onmouseover="roomProfile()" onmouseout="roomProfile()" ><p id="fullname_display"></p><p><img id="status_room_chat_'+i+'" alt="" src="themes/dark/offline.png"/> <span id="name_room_chat_'+i+'">'+q+'</span> <em id="profile_display_em">(arraste sua bebida at&eacute; aqui)</em></p><p id="profile_display"><span onclick="Dialogs.changePass()"><img src="images/key_go.png" align="absmiddle" title="'+Languages.get("changeSettingsPassword")+'"> '+Languages.get("changeSettingsPassword")+' |</span><span onclick="Dialogs.changeProfile()"> <img src="images/vcard.png" align="absmiddle" title="'+Languages.get("changeSettingsProfile")+'"> '+Languages.get("changeSettingsProfile")+' |</span><span onclick="Dialogs.changeIcon()"> <img src="images/picture_go.png" align="absmiddle" title="'+Languages.get("changeSettingsBuddyicon")+'"> '+Languages.get("changeSettingsBuddyicon")+" </span> </p></div>"+k}else{k='<div class="droppable" id="droppable_'+i+'"><img class="room_icone" id="room_icone_'+i+'" alt="" src="themes/dark/room_icon_'+i+'.png"/><p id="roomstatus"><img id="status_room_chat_'+i+'" alt="" src="themes/dark/offline.png"/> <span id="name_room_chat_'+i+'">'+q+'</span> <span id="count_room_chat_'+i+'"></span></p></div>'+k}}$("droppable_container_room").update(k);$("droppable_container_room").show();Droppables.add("droppable_0",{accept:"draggable",hoverclass:"hover",onHover:function(){},onDrop:function(){Chatroom.join("chat_0",l.roomlang[0]);setTimeout("$('barh_footer').hide()",500)}});Droppables.add("droppable_1",{accept:"draggable",hoverclass:"hover",onHover:function(){},onDrop:function(){Chatroom.join("chat_1",l.roomlang[1]);setTimeout("$('barh_footer').hide()",500)}});Droppables.add("droppable_2",{accept:"draggable",hoverclass:"hover",onHover:function(){},onDrop:function(){Chatroom.join("chat_2",l.roomlang[2]);setTimeout("$('barh_footer').hide()",500)}});Droppables.add("droppable_3",{accept:"draggable",hoverclass:"hover",onHover:function(){},onDrop:function(){Chatroom.join("chat_3",l.roomlang[3]);setTimeout("$('barh_footer').hide()",500)}});Droppables.add("droppable_4",{accept:"draggable",hoverclass:"hover",onHover:function(){},onDrop:function(){Chatroom.join("chat_4",l.roomlang[4]);setTimeout("$('barh_footer').hide()",500)}});Droppables.add("vc_show",{accept:"draggable",hoverclass:"hover",onDrop:function(){Dialogs.Videos()}});new Draggable("drink0",{revert:true});new Draggable("drink1",{revert:true});new Draggable("drink2",{revert:true});new Draggable("drink3",{revert:true});new Draggable("drink4",{revert:true});new Draggable("drink5",{revert:true});new Draggable("drink6",{revert:true});new Draggable("drink7",{revert:true});Status.lastIM=new Date().getTime();System.ping();inputInfo("userInfo","username",l.username);if(l.lastping==0){setTimeout("Dialogs.Intro()",6000)}if(l.birthdate==0){setTimeout("Dialogs.changeName()",6000)}if(add_chatuser!=0){setTimeout("addUser(add_chatuser)",6000)}if(l.fullname==0){setTimeout("Dialogs.changeName()",6000)}else{fulname_login=l.fullname.split(" ");$("fullname_display").update("<span id='name_part' style='display:none'>"+fulname_login[0]+"</span><span id='name_fullname'>"+l.fullname+"</span>");inputInfo("userInfo","fullname",l.fullname)}if(l.buddyicon!=0&&l.buddyicon!="none"){$("photo_user_icon").setAttribute("src","thumb.php?&w=70&h=70&q=40&zc=1&src=buddyicons/"+f+"."+l.buddyicon);inputInfo("userInfo","buddyicon",l.buddyicon)}var p="";var u=(typeof(l.playlist)!=="undefined"?l.playlist.length:0);var o=5;p+='<div id="slidetelao1" class="slide" /><div><img src="http://static-cdn.justin.tv/previews/live_user_pheu_net-50x37.jpg" width="75" /></div></div>';p+='<div id="slidetelao2" class="slide" style="display:none" /><div><img src="http://static-cdn.justin.tv/previews/live_user_globobr-50x37.jpg" width="75" /></div></div>';p+='<div id="slidetelao3" class="slide" style="display:none" /><div><img src="http://static-cdn.justin.tv/previews/live_user_imperadorfilmes_-50x37.jpg" width="75" /></div></div>';p+='<div id="slidetelao4" class="slide" style="display:none" /><div><img src="http://static-cdn.justin.tv/previews/live_user_boston_pc-50x37.jpg" width="75" /></div></div>';for(i=0;i<u;i++){var t=l.playlist[i];var y=1;for(j=1;j<=y;j++){p+='<div id="slidetelao'+o+'" class="slide" style="display:none" /><div><img src="http://img.youtube.com/vi/'+t+"/"+j+'.jpg" width="75" /></div></div>';o++}}$("telao-show").update(p);start_slideshow(1,(o+3),4000,"slidetelao");soundManager.play("crowdbar");var g=l.buddyicon;FLIR.init();setTimeout("Effect.Fade('profile_display')",7000);setTimeout("Effect.Fade('profile_display_em')",7000);setTimeout("$('name_fullname').hide()",7000);setTimeout("$('name_part').show();",7000);if(chatuser!=0){Chatroom.join(f)}}})},keyHandler:function(c,b){c=c||window.event;var a=document.all?c.keyCode:c.which;if(a==13&&typeof b=="function"){b()}return a!=13},logout:function(){if(user==""||pass==""){return}var xmlhttp=false;
/*@cc_on @*/
/*@if (@_jscript_version >= 5)
      try{xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{xmlhttp = new ActiveXObject("Microsoft.XMLHTTP");}catch(E){xmlhttp=false;}}
      @end @*/
if(!xmlhttp&&typeof XMLHttpRequest!="undefined"){xmlhttp=new XMLHttpRequest()}xmlhttp.open("POST",pingTo,false);xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded");xmlhttp.send("call=logout");clearTimeout(pingTimer);defaultTitle=document.title=document.title.replace(": "+user,"");user="";pass="";loggedIn=false;if(typeof(Status)!="undefined"){Status.state=0;Status.awayMessage=""}Element.stopObserving(window,"resize",recenterModal);if(typeof(Buddylist)!="undefined"){Buddylist.destroy()}for(var name in IM.windows){if(typeof(IM.windows[name].getId)!="undefined"&&typeof($(IM.windows[name].getId()))!="undefined"){try{if(IM.windows[name].detached){IM.windows[name].popup.close()}else{IM.windows[name].destroy()}}catch(e){}}}for(var name in Chatroom.windows){if(typeof(Chatroom.windows[name].getId)!="undefined"&&typeof($(Chatroom.windows[name].getId()))!="undefined"){try{Chatroom.windows[name].destroy()}catch(e){}}}if($("admin-userSearch")){Windows.getWindow("admin-userSearch").destroy()}Dialog.alert('<span class="dialog_long_label">'+Languages.get("signedOff")+"</span>",{windowParameters:{className:"alert",width:alertWidth,height:85},okLabel:Languages.get("reconnect"),ok:function(win){try{window.location.reload()}catch(e){}}})},register:function(){if(!allowNewUsers){return}var e="";var f=$("register_button");Event.stopObserving(f,"click",System.register);if($("fullname").value!=""){if(checkEmailAddr($("newemail").value)){if($("newpassword").value.length>=6&&$("newpassword").value.length<=20){if($("newusername").value.isAlphaNumeric()&&$("newusername").value.length>=3&&$("newusername").value.length<=16){var d=new XHConn();var g=$("newusername").value.toLowerCase();var c=$("newpassword").value;var b=$("newemail").value;var a=$("fullname").value;d.connect(pingTo,"POST","call=register&username="+g+"&password="+c+"&email="+b+"&fullname="+a,function(h){switch(h.responseText){case"user_registered":$("modalBanner").hide();$("modalBannerChat").hide();Dialog.alert('<span class="dialog_long_label">'+Languages.get("registerSuccess")+'</span><div style="clear:both"></div>',{windowParameters:{className:"alert",width:alertWidth},ok:function(k){clearInputs();Dialog.closeInfo();Dialogs.login();$("modalBanner").show();$("modalBannerChat").show()}});Event.observe(f,"click",System.register);return;case"username_taken":e=Languages.get("registerUsernameTaken");break;case"username_bad":e=Languages.get("registerUsernameBad");break;case"password_bad_length":e=Languages.get("registerPasswordShort");break;case"invalid_email":e=Languages.get("registerInvalidEmail");break;case"email_already_used":e=Languages.get("registerEmailTaken");break;default:e=Languages.get("registerFailed")}$("register_error_msg").innerHTML=e;$("register_error_msg").setStyle({display:"block"});new Effect.Shake("modal");Event.observe(f,"click",System.register)});return}else{e=Languages.get("registerUsernameBad")}}else{e=Languages.get("registerPasswordShort")}}else{e=Languages.get("registerInvalidEmail")}}else{e=Languages.get("registerPasswordsMatch")}$("register_error_msg").innerHTML=e;$("register_error_msg").setStyle({display:"block"});new Effect.Shake("modal");Event.observe(f,"click",System.register)},idle:function(){var a=new Date().getTime()-(idleTime*60*1000);if(Status.lastIM<a&&typeof(Status)!="undefined"&&Status.state==0){Status.set(1,Languages.get("away"));Status.wasSetAutoAway=true}},ping:function(c){if($('" + IM.windows[Context.currentUser].getId() + "_setTypping')){var a=$('" + IM.windows[Context.currentUser].getId() + "_setTypping').value}else{var a=0}if(idleTime>0){System.idle()}var b=new XHConn();b.connect(pingTo,"POST","call=ping&typping="+a+"&away="+(typeof(Status)!="undefined"?Status.state:0)+(c==true?"&initial=true":""),function(p){var v;if((typeof p.status!="undefined"&&p.status!=200)||p.responseText=="not_logged_in"){System.logout();return}if(trim(p.responseText).length==0){return}var d=p.responseText.parseJSON();var t,C,D,n,m;var k=(typeof(d.messages)!=="undefined"?d.messages.length:0);for(v=0;v<k;v++){D=d.messages[v].chatroom;if(!D){t=d.messages[v].sender;who=t}else{var B=d.messages[v].sender.split(".");t=B[1];who=B[0]}C=d.messages[v].message;m=d.messages[v].buddyicon==0?defaultIconChat:pathToIcons+t+"."+d.messages[v].buddyicon;n='<img src="'+m+'" id="buddyIcon_'+t+'" alt="'+t+'" class="IM_buddyIcon" />'+t;var q=null;try{q=window[D?"Chatroom":"IM"].windows[who].getId()}catch(A){}if(!$(q)){window[D?"Chatroom":"IM"].create(who,who)}else{if(!window[D?"Chatroom":"IM"].windows[who].detached&&!window[D?"Chatroom":"IM"].windows[who].isVisible()){window[D?"Chatroom":"IM"].windows[who].show();setTimeout("scrollToBottom('"+window[D?"Chatroom":"IM"].windows[who].getId()+"_rcvd')",125)}}var w=(!window[D?"Chatroom":"IM"].windows[who].detached?$(window[D?"Chatroom":"IM"].windows[who].getId()+"_rcvd"):window[D?"Chatroom":"IM"].windows[who].popup.$(window[D?"Chatroom":"IM"].windows[who].getId()+"_rcvd"));C=C.replace(/(\s|\n|>|^)(\w+:\/\/[^<\s\n]+)/,'$1<a href="$2" target="_blank">$2</a>');C=IM.emoteReplace(C,smilies);if(C.replace(/<([^>]+)>/ig,"").indexOf("/me")==0){w.innerHTML+='<div class="IM_user'+(t==user&&D?"A":"B")+'"><b class="user'+(t==user&&D?"A":"B")+'">'+IM.createTimestamp()+" <i>"+n+" "+C.replace(/<([^>]+)>/ig,"").replace(/\/me/,"")+"</i></b></div>\n"}else{w.innerHTML+='<div class="IM_user'+(t==user&&D?"A":"B")+'"><b class="user'+(t==user&&D?"A":"B")+'">'+IM.createTimestamp()+" "+n+":</b> "+C+"</div>\n"}w.scrollTop=w.scrollHeight-w.clientHeight+6;if(!c){if(w.innerHTML.toLowerCase().replace(/<\S[^>]*>/g,"").indexOf(user.toLowerCase()+": ("+Languages.get("autoreply").toLowerCase()+")")==-1&&typeof(Status)!="undefined"&&Status.state==1&&who==t){var o=$(q+"_setFont").innerHTML;var g=$(q+"_setFontSize").innerHTML;var f=$(q+"_setFontColorColor").style.backgroundColor;window[D?"Chatroom":"IM"].sendMessage(t,"("+Languages.get("autoreply")+") "+Status.awayMessage,false,false,false,o,g,f)}if(Windows.getFocusedWindow().getId()!=window[D?"Chatroom":"IM"].windows[who].getId()&&pulsateTitles==true){new Effect.Pulsate(window[D?"Chatroom":"IM"].windows[who].getId()+"_top")}if(titlebarBlinker==true&&useBlinker==true){clearTimeout(blinkerTimer);blinkerTimer=setTimeout("titlebarBlink('"+who+"', \""+C.replace(/\"/,'"').replace(/<([^>]+)>/ig,"")+'", 0, '+D+")",blinkSpeed)}}w=null}if(k>0&&audioNotify==true){soundManager.play("msg_in")}mesa=null;usermesa=null;var z=(typeof(d.mesas)!=="undefined"?d.mesas.length:0);var y=(typeof(roons_online)!=="undefined"?roons_online.length:0);if(z>0){for(v=0;v<z;v++){mesa=d.mesas[v].mesa.toLowerCase();usermesa=d.mesas[v].user;$("status_room_"+mesa).setAttribute("src","themes/dark/online.png");$("count_room_"+mesa).update("("+usermesa+")");$("name_room_"+mesa).parentNode.parentNode.addClassName("hover");roons_online[v]=mesa}}if(z==0){t=null}C=null;var l="",s="",u="";var h=(typeof(d.events)!=="undefined"?d.events.length:0);for(v=0;v<h;v++){t=d.events[v].sender;C=d.events[v].event;who=(d.events[v].recipient==user?t:d.events[v].recipient);u=C.split(",");m=d.events[v].buddyicon==0?defaultIconChat:pathToIcons+t+"."+d.events[v].buddyicon;n='<img src="'+m+'" id="buddyIcon_'+t+'" alt="'+t+'" class="IM_buddyIcon" />'+t;switch(u[0]){case"status":if(typeof(Buddylist)!="undefined"){l=d.events[v].group;if(l&&!$(l.replace(/\s/,"_")+"_group")&&l!="toJSONString"){Buddylist.addGroup(l)}if(typeof(Buddylist.listObjects[t])=="undefined"){Buddylist.addBuddy(t,l,"none");Buddylist.list[l][t]={username:t,blocked:false,status:u[1]};$(Buddylist.listObjects[t].obj).setStyle({display:"block"})}else{if(l==null){l=Buddylist.listObjects[t].group}}Buddylist.list[l][t].status=u[1];if(!blockedBuddyStatus&&typeof(Buddylist.list[l][t])!=="undefined"&&Buddylist.list[l][t].blocked){Buddylist.moveBuddy(t,Languages.get("offline"));$(Buddylist.listObjects[t].img).src="themes/"+theme+"/blocked.png"}else{if(u[1]==0||u[1]==50){Buddylist.moveBuddy(t,Languages.get("offline"));IM.notifyUser(t,Languages.get("signedoff").replace("%1",t));$(Buddylist.listObjects[t].img).src=(typeof(Buddylist.list[l][t])!=="undefined"&&Buddylist.list[l][t].blocked?"themes/"+theme+"/blocked.png":"themes/"+theme+"/offline.png")}else{if(u[1]==2){Buddylist.moveBuddy(t,l);IM.notifyUser(t,Languages.get("wentaway").replace("%1",t));$(Buddylist.listObjects[t].img).src=(typeof(Buddylist.list[l][t])!=="undefined"&&Buddylist.list[l][t].blocked?"themes/"+theme+"/blocked.png":"themes/"+theme+"/away.png")}else{Buddylist.moveBuddy(t,l);IM.notifyUser(t,Languages.get("cameback").replace("%1",t));$(Buddylist.listObjects[t].img).src=(typeof(Buddylist.list[l][t])!=="undefined"&&Buddylist.list[l][t].blocked?"themes/"+theme+"/blocked.png":"themes/"+theme+"/online.png")}}}}break;case"chat":var r=$(Chatroom.windows[u[2]].getId()+"_rcvd");if(u[1]=="join"){if(!$(t+"_"+u[2]+"_chatUser")&&typeof(Chatroom.windows[u[2]])!="undefined"){Chatroom.windows[u[2]].addUser(t)}r.innerHTML=r.innerHTML+'<div class="IM_userB"><b class="userB">'+IM.createTimestamp()+" <i>"+n+" "+Languages.get("hasJoined")+"</i></b></div>";scrollToBottom(Chatroom.windows[u[2]].getId()+"_rcvd")}else{if(u[1]=="left"){if(typeof(Chatroom.windows[u[2]])!="undefined"){Chatroom.windows[u[2]].deleteUser(t)}r.innerHTML=r.innerHTML+'<div class="IM_userB"><b class="userB">'+IM.createTimestamp()+" <i>"+n+" "+Languages.get("hasLeft")+"</i></b></div>";scrollToBottom(Chatroom.windows[u[2]].getId()+"_rcvd")}}break}u=null}t=null;C=null;who=null});b=null},changeName:function(){var c=$("changeName_txt").value,b="";if(c.replace(/\s/g,"")!=""){var a=new XHConn();a.connect(pingTo,"POST","call=changename&name="+encodeURIComponent(c),function(d){if(d.responseText=="success"){Dialog.closeInfo();Dialog.alert('<span class="dialog_long_label lang-changeNameSuccess">'+Languages.get("changeNameSuccess")+'</span><div style="clear:both"></div>',{windowParameters:{className:"alert",width:alertWidth,height:85},ok:function(e){Dialog.closeInfo();Windows.close("changeName")}})}else{b=Languages.get("changeNameFailed")}if(b.length>0){$("changeName_error_msg").innerHTML=b}})}else{b=Languages.get("changeNameEmpty")}if(b.length>0){$("changeName_error_msg").innerHTML=b}},changeProfile:function(){var c=$("changeprofile_textarea").value,b="";if(c.replace(/\s/g,"")!=""){var a=new XHConn();a.connect(pingTo,"POST","call=changeprofile&profile="+encodeURIComponent(c),function(d){if(d.responseText=="success"){Dialog.closeInfo();Dialog.alert('<span class="dialog_long_label lang-changeProfileSuccess">'+Languages.get("changeProfileSuccess")+'</span><div style="clear:both"></div>',{windowParameters:{className:"alert",width:alertWidth,height:85},ok:function(e){Dialog.closeInfo();Windows.close("changeProfile")}})}else{b=Languages.get("changeProfileFailed")}if(b.length>0){$("changeprofile_error_msg").innerHTML=b}})}else{b=Languages.get("changeProfileEmpty")}if(b.length>0){$("changeprofile_error_msg").innerHTML=b}},changeIcon:function(){var e=$("changeicon_iframe");if(e.contentDocument){var f=e.contentDocument}else{if(e.contentWindow){var f=e.contentWindow.document}else{var f=window.frames.changeicon_iframe.document}}if(f.location.href=="about:blank"){return}var c="",b=f.body.innerHTML;if(b=="success"){$("photo_user_icon").src=$("photo_user_icon").src+"?"+(new Date()).getTime();var a=$("photo_user_icon").src;Dialog.closeInfo();Dialog.alert('<span class="dialog_long_label lang-changeBuddyiconSuccess">'+Languages.get("changeBuddyiconSuccess")+'</span><div style="clear:both"></div>',{windowParameters:{className:"alert",width:alertWidth,height:85},ok:function(d){Dialog.closeInfo();Windows.close("changeIcon")}})}else{if(b=="nofile"){c=Languages.get("changeIconSelectFile")}else{if(b=="size"){c=Languages.get("changeIconSize")}else{if(b=="bad_type"){c=Languages.get("changeIconBadType")}else{if(b=="bad_extension"){c=Languages.get("changeIconBadExtension")}else{c=Languages.get("changeIconFailed")}}}}}if(c.length>0){$("changeicon_error_msg").innerHTML=c}},changePass:function(){var c=$("currentpw").value,d=$("newpw").value,b="";if(hex_md5(c)==pass){if(d==$("confirmpw").value){var a=new XHConn();a.connect(pingTo,"POST","call=pwdchange&username="+user+"&password="+hex_md5(c)+"&newpwd="+d,function(e){if(e.responseText=="pw_changed"){Dialog.closeInfo();Dialog.alert('<span class="dialog_long_label lang-changeSuccess">'+Languages.get("changeSuccess")+'</span><div style="clear:both"></div>',{windowParameters:{className:"alert",width:alertWidth,height:85},ok:function(f){Dialog.closeInfo();Windows.close("changePass");setTimeout("System.logout();",250)}})}else{if(e.responseText=="invalid_pw"){b=Languages.get("currentPassInvalid");$("currentpw").value=""}else{if(e.responseText=="password_bad_length"){b=Languages.get("changePasswordShort");$("newpw").value="";$("confirmpw").value=""}else{b=Languages.get("changeFailed")}}}if(b.length>0){$("changepass_error_msg").innerHTML=b}})}else{b=Languages.get("changeNoMatch")}}else{b=Languages.get("currentPassInvalid")}if(b.length>0){$("changepass_error_msg").innerHTML=b}},resetPass:function(){var a=new XHConn();a.connect(pingTo,"POST","call=reset&email="+encodeURIComponent($("resetto").value),function(c){var b="";if(c.responseText=="pw_reset"){Dialog.alert('<span class="dialog_long_label lang-newPasswordEmailed langinsert-clear">'+Languages.get("newPasswordEmailed").replace("%1",$("resetto").value)+'</span><div style="clear:both"></div>',{windowParameters:{className:"alert",width:alertWidth},ok:function(d){clearInputs();Dialog.closeInfo();Dialogs.login()}})}else{if(c.responseText=="no_email_on_record"){b=Languages.get("noEmailOnRecord")}else{b=Languages.get("problemResetting")}}if(b.length>0){$("forgotpass_error_msg").innerHTML=b;$("forgotpass_error_msg").setStyle({display:"block"});new Effect.Shake("modal")}})}};var Dialogs={login:function(){clearInputs();$("login_error_msg").innerHTML="";this.mainDialogShow("login");this.currentMainDialog="login";setTimeout("try { $('username').focus(); } catch(e) { }",1125)},register:function(){clearInputs();$("register_error_msg").innerHTML="";Dialogs.mainDialogShow("register");this.currentMainDialog="register";setTimeout("try { $('newusername').focus(); } catch(e) { }",505)},forgotPass:function(){clearInputs();$("forgotpass_error_msg").innerHTML="";Dialogs.mainDialogShow("forgotPass");this.currentMainDialog="forgotPass";setTimeout("try { $('resetto').focus(); } catch(e) { }",505)},mainDialogShow:function(a){if(this.currentMainDialog){Element.setStyle(this.currentMainDialog+"Dialog",{display:"none"})}Element.setStyle(a+"Dialog",{display:"block"})},newIM:function(){var a;if($("newIM")){Windows.getWindow("newIM").toFront();return}a=new Window({id:"newIM",className:"dialog",width:240,height:120,resizable:false,title:Languages.get("newIM"),draggable:true,closable:true,maximizable:false,minimizable:false,detachable:false,minWidth:240,minHeight:120,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});a.setConstraint(true,{left:0,right:0,top:0,bottom:0});a.getContent().innerHTML='<div class="dialog_info lang-newIMPlease langinsert-clear" style="padding:3px;">'+Languages.get("newIMPlease")+'</div>                                          <span id="newim_error_msg" class="errorMsg">&nbsp;</span>                                          <div id="newim_box" style="padding-left:30px;width:100%;">                                          <div style="display:block;float:left;margin-right:5px;padding-top:4px;">'+Languages.get("username")+':</div><input type="text" style="width:120px;" id="sendto" name="sendto" onkeypress="handleInput(event, function() { IM.newIMWindow(); })" />                                          </div>                                          <div id="newim_buttons">'+ButtonCtl.create(Languages.get("openIM"),"IM.newIMWindow();")+ButtonCtl.create(Languages.get("cancel"),"Windows.close('newIM');")+"</div>";$("newim_buttons").setStyle({position:"absolute",top:"110px",left:"25px"});a.setDestroyOnClose();a.showCenter();setTimeout("$('sendto').focus();",125)},newRoom:function(){var a;if($("newRoom")){Windows.getWindow("newRoom").toFront();return}a=new Window({id:"newRoom",className:"dialog",width:240,height:300,resizable:false,title:Languages.get("newRoom"),draggable:true,closable:true,maximizable:false,minimizable:false,detachable:false,minWidth:240,minHeight:120,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});a.setConstraint(true,{left:0,right:0,top:0,bottom:0});a.getContent().innerHTML='<div class="dialog_info lang-newRoomPlease langinsert-clear" style="padding:3px;">'+Languages.get("newRoomPlease")+'</div>                                            <span id="newroom_error_msg" class="errorMsg">&nbsp;</span>                                            <div id="newroom_box" style="padding-left:25px;width:100%;">                                            <div style="display:block;margin-right:5px;padding-top:4px;" class="lang-roomname langinsert-replace">'+Languages.get("roomname")+':</div><input type="text" style="width:187px;margin-left:0px;" id="roomname" name="roomname" onkeypress="handleInput(event, function() {Chatroom.join($(\'roomname\').value); }, function(){$(\'roomname\').value = $(\'roomname\').value.toLowerCase();})" />                                            <div id="newroom_room_list"></div>                                            </div>                                            <div id="newroom_buttons">'+ButtonCtl.create(Languages.get("joinRoom"),"Chatroom.join($('roomname').value);")+ButtonCtl.create(Languages.get("cancel"),"Windows.close('newRoom');")+"</div>";$("newroom_buttons").setStyle({position:"absolute",top:"290px",left:"25px"});ChatroomList.get($("newroom_room_list"));a.setDestroyOnClose();a.showCenter();setTimeout("$('roomname').focus();",125)},newBuddy:function(){var a;if($("newBuddy")){Windows.getWindow("newBuddy").toFront();return}a=new Window({id:"newBuddy",className:"dialog",width:240,height:160,resizable:false,title:Languages.get("newBuddy"),draggable:true,closable:true,maximizable:false,minimizable:false,detachable:false,minWidth:240,minHeight:120,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});a.setConstraint(true,{left:0,right:0,top:0,bottom:0});a.getContent().innerHTML='<span id="newbuddy_error_msg" class="errorMsg">&nbsp;</span>                                             <div id="newbuddy_box" style="padding-left:22px;width:100%;">                                             <div style="display:block;margin-right:24px;padding-top:4px;font-size:10pt;" id="newBuddyUsernameDisplay">&nbsp;</div><input type="hidden" id="newBuddyUsername" name="newBuddyUsername" value="" /><br />                                             <div style="display:block;margin-right:5px;padding-top:4px;">'+Languages.get("addtogroup")+':</div><input type="text" style="width:110px;" id="newBuddyGroup" name="newBuddyGroup" value="Minha Turma" onfocus="this.select();" onkeypress="handleInput(event, function() { Buddylist.addNewBuddy($(\'newBuddyUsername\').value, $(\'newBuddyGroup\').value); })" />                                             </div>                                             <div id="newbuddy_buttons">'+ButtonCtl.create(Languages.get("add"),"Buddylist.addNewBuddy($('newBuddyUsername').value, $('newBuddyGroup').value);")+ButtonCtl.create(Languages.get("cancel"),"Windows.close('newBuddy');")+"</div>";$("newbuddy_buttons").setStyle({position:"absolute",top:"150px",left:"25px"});a.setDestroyOnClose();a.showCenter();setTimeout("$('newBuddyUsername').focus();",125)},removeBuddy:function(b){var a;if(typeof b=="undefined"){var b=curSelected}if(b==""||b.length==0){return}if($("delBuddy")){Windows.getWindow("delBuddy").toFront();return}a=new Window({id:"delBuddy",className:"dialog",width:240,height:70,resizable:false,title:Languages.get("removeBuddy"),draggable:true,closable:true,maximizable:false,minimizable:false,detachable:false,minWidth:240,minHeight:70,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});a.setConstraint(true,{left:0,right:0,top:0,bottom:0});a.getContent().innerHTML='<div class="dialog_info" style="padding:3px;">'+Languages.get("removeBuddyAreYouSure").replace("%1",b)+'</div>                                             <div id="delbuddy_buttons">'+ButtonCtl.create(Languages.get("ok"),"Buddylist.deleteBuddy('"+b+"');Windows.close('delBuddy');")+ButtonCtl.create(Languages.get("cancel"),"Windows.close('delBuddy');")+"</div>";$("delbuddy_buttons").setStyle({position:"absolute",top:"60px",left:"25px"});a.setDestroyOnClose();a.showCenter()},blockBuddy:function(a){var b;if($("blockBuddy")){Windows.getWindow("blockBuddy").toFront();return}b=new Window({id:"blockBuddy",className:"dialog",width:240,height:70,resizable:false,title:Languages.get("blockBuddy"),draggable:true,closable:true,maximizable:false,minimizable:false,detachable:false,minWidth:240,minHeight:70,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});b.setConstraint(true,{left:0,right:0,top:0,bottom:0});b.getContent().innerHTML='<div class="dialog_info" style="padding:3px;">'+(Buddylist.blocked.inArray(a)?Languages.get("unblockBuddyAreYouSure").replace("%1",a):Languages.get("blockBuddyAreYouSure").replace("%1",a))+'</div>                                             <div id="blockbuddy_buttons">'+ButtonCtl.create(Languages.get("ok"),"Buddylist.blockBuddy('"+a+"');Windows.close('blockBuddy');")+ButtonCtl.create(Languages.get("cancel"),"Windows.close('blockBuddy');")+"</div>";$("blockbuddy_buttons").setStyle({position:"absolute",top:"60px",left:"25px"});b.setDestroyOnClose();b.showCenter()},removeGroup:function(b){var a;if($("delGroup")){Windows.getWindow("delGroup").toFront();return}a=new Window({id:"delGroup",className:"dialog",width:240,height:70,resizable:false,title:Languages.get("removeGroup"),draggable:true,closable:true,maximizable:false,minimizable:false,detachable:false,minWidth:240,minHeight:70,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});a.setConstraint(true,{left:0,right:0,top:0,bottom:0});a.getContent().innerHTML='<div class="dialog_info" style="padding:3px;">'+Languages.get("removeGroupAreYouSure").replace("%1",b)+'</div>                                             <div id="delgroup_buttons">'+ButtonCtl.create(Languages.get("ok"),"Buddylist.deleteGroup('"+b+"');Windows.close('delGroup');")+ButtonCtl.create(Languages.get("cancel"),"Windows.close('delGroup');")+"</div>";$("delgroup_buttons").setStyle({position:"absolute",top:"60px",left:"25px"});a.setDestroyOnClose();a.showCenter()},changeSettings:function(){var a;if($("changeSettings")){Windows.getWindow("changeSettings").toFront();return}a=new Window({id:"changeSettings",className:"dialog",width:300,height:160,resizable:false,title:Languages.get("changeSettings"),draggable:true,closable:true,maximizable:false,minimizable:false,detachable:false,minWidth:240,minHeight:150,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});a.setConstraint(true,{left:0,right:0,top:0,bottom:0});a.getContent().innerHTML='<div class="dialog_info lang-changeSettingsInstructions langinsert-clear" style="padding:3px;">'+Languages.get("changeSettingsInstructions")+'</div>                                                <div id="changesettings_buttons">'+ButtonCtl.create(Languages.get("changeSettingsPassword"),"Dialogs.changePass();if($('changeSettings')){Windows.close('changeSettings');}")+ButtonCtl.create(Languages.get("changeSettingsProfile"),"Dialogs.changeProfile();if($('changeSettings')){Windows.close('changeSettings');}")+(useIcons?ButtonCtl.create(Languages.get("changeSettingsBuddyicon"),"Dialogs.changeIcon();if($('changeSettings')){Windows.close('changeSettings');}"):"")+ButtonCtl.create(Languages.get("cancel"),"Windows.close('changeSettings');")+"</div>";$("changesettings_buttons").setStyle({position:"absolute",top:"60px",left:"85px"});a.setDestroyOnClose();a.showCenter()},inviteFriends:function(){var a;if($("inviteFriends")){Windows.getWindow("inviteFriends").toFront();return}a=new Window({id:"inviteFriends",className:"dialog",width:340,height:430,resizable:false,title:Languages.get("inviteFriends"),draggable:true,closable:true,maximizable:false,minimizable:false,detachable:false,minWidth:240,minHeight:150,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});a.setConstraint(true,{left:0,right:0,top:0,bottom:0});a.getContent().innerHTML='<div class="dialog_info lang-changeSettingsInstructions langinsert-clear" style="padding:20px;"><p>'+Languages.get("nameFriend")+': <br><input name="nameFriend" id="inviteFriendsName" size="35" maxlength="40"></p><p>'+Languages.get("emailFriend")+': <br><input name="emailFriend" id="inviteFriendsEmail" size="35" maxlength="80"></p><p>'+Languages.get("message")+':</p><div style="background-color: #EAEAEA; color: #000; padding:10px;"><textarea id="inviteMesageFriend" name="mesageFriend" style="font-family:Tahoma,Verdana,Arial,sans-serif; font-size:8pt; margin-bottom:10px; margin-top:10px; padding:5px; width:93%; height:60px;">'+Languages.get("messageFriend")+"</textarea><p>"+Languages.get("knowNow")+'</p><div align="center"><br><br><a href="http://chatbarh.com" target="_blank" style="font: 20px Arial, Helvetica, sans-serif; font-weight: bold; color: #085098;">'+Languages.get("signIn")+"</a><br><br></div><p>"+Languages.get("forgetEverything")+'</p><div><div id="invitefriends_buttons">'+ButtonCtl.create(Languages.get("cancel"),"Windows.close('inviteFriends');")+ButtonCtl.create(Languages.get("ok"),"getInviteFriends();")+"</div></div>";$("invitefriends_buttons").setStyle({position:"absolute",top:"420px",left:"75px"});a.setDestroyOnClose();a.showCenter()},changeProfile:function(){var b;if($("changeProfile")){Windows.getWindow("changeProfile").toFront();return}b=new Window({id:"changeProfile",className:"dialog",width:300,height:280,resizable:false,title:Languages.get("changeProfile"),draggable:true,closable:true,maximizable:false,minimizable:false,detachable:false,minWidth:240,minHeight:240,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});b.setConstraint(true,{left:0,right:0,top:0,bottom:0});b.getContent().innerHTML='<div class="dialog_info lang-changeProfileInstructions langinsert-clear" style="padding:3px;">'+Languages.get("changeProfileInstructions")+'</div>                                             <span id="changeprofile_error_msg" class="errorMsg">&nbsp;</span>                                             <div style="display:block;float:left;margin-right:5px;padding-top:4px;" class="langinsert-replace">'+Languages.get("changeProfileName")+':</div><textarea style="width:97%;height:150px;" id="changeprofile_textarea"></textarea>                                             <div id="changeprofile_buttons">'+ButtonCtl.create(Languages.get("change"),"System.changeProfile();")+ButtonCtl.create(Languages.get("cancel"),"Windows.close('changeProfile');")+"</div>";$("changeprofile_buttons").setStyle({position:"absolute",top:"270px",left:"55px"});var a=new XHConn();a.connect(pingTo,"POST","call=getprofile&user="+user,function(c){$("changeprofile_textarea").value=c.responseText});b.setDestroyOnClose();b.showCenter()},viewProfile:function(a){$("divContext").style.display="none";if(typeof(Profile.windows[a])=="undefined"){Profile.create(a,a)}else{if(!Profile.windows[a].isVisible()){Profile.windows[a].show();Profile.windows[a].toFront()}else{Profile.windows[a].toFront()}}},changeIcon:function(){if(!useIcons){return}var a;if($("changeIcon")){Windows.getWindow("changeIcon").toFront();return}a=new Window({id:"changeIcon",className:"dialog",width:300,height:160,resizable:false,title:Languages.get("changeBuddyicon"),draggable:true,closable:true,maximizable:false,minimizable:false,detachable:false,minWidth:240,minHeight:120,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});a.setConstraint(true,{left:0,right:0,top:0,bottom:0});a.getContent().innerHTML='<div class="dialog_info lang-changeBuddyiconInstructions langinsert-clear" style="padding:3px;">'+Languages.get("changeBuddyiconInstructions")+'</div>                                             <span id="changeicon_error_msg" class="errorMsg">&nbsp;</span>                                             <form target="changeicon_iframe" id="changeicon_form" enctype="multipart/form-data" method="post" action="'+pingTo+'">                                             <input type="hidden" name="call" value="changeicon" style="display:none;" />                                             <input id="changeicon_input_file" type="file" name="icon" />                                             <div id="changeicon_buttons">'+ButtonCtl.createSubmit(Languages.get("change"))+ButtonCtl.create(Languages.get("cancel"),"Windows.close('changeIcon');")+'</form><iframe src="about:blank" onload="System.changeIcon()" style="display:none" id="changeicon_iframe" name="changeicon_iframe"></iframe></div>';$("changeicon_buttons").setStyle({position:"absolute",top:"150px",left:"55px"});a.setDestroyOnClose();a.showCenter()},changePass:function(){var a;if($("changePass")){Windows.getWindow("changePass").toFront();return}a=new Window({id:"changePass",className:"dialog",width:300,height:160,resizable:false,title:Languages.get("changePassword"),draggable:true,closable:true,maximizable:false,minimizable:false,detachable:false,minWidth:240,minHeight:120,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});a.setConstraint(true,{left:0,right:0,top:0,bottom:0});a.getContent().innerHTML='<div class="dialog_info lang-changePasswordInstructions langinsert-clear" style="padding:3px;">'+Languages.get("changePasswordInstructions")+'</div>                                             <span id="changepass_error_msg" class="errorMsg">&nbsp;</span>                                             <div id="changepass_box" style="padding-left:12px;width:100%;">                                             <div style="display:block;float:left;margin-right:5px;padding-top:4px;" class="lang-currentPassword langinsert-replace">'+Languages.get("currentPassword")+':</div><input type="password" style="width:110px;" id="currentpw" name="currentpw" onkeypress="handleInput(event, function() { System.changePass(); })" /><br />                                             <div style="display:block;float:left;margin-right:20px;padding-top:4px;" class="lang-currentPassword langinsert-replace">'+Languages.get("newPassword")+':</div><input type="password" style="width:110px;" id="newpw" name="newpw" onkeypress="handleInput(event, function() { changePass(); })" />                                             <div style="display:block;float:left;margin-right:4px;padding-top:4px;" class="lang-currentPassword langinsert-replace">'+Languages.get("confirmPassword")+':</div><input type="password" style="width:110px;" id="confirmpw" name="confirmpw" onkeypress="handleInput(event, function() { System.changePass(); })" />                                             </div>                                             <div id="changepass_buttons">'+ButtonCtl.create(Languages.get("change"),"System.changePass();")+ButtonCtl.create(Languages.get("cancel"),"Windows.close('changePass');")+"</div>";$("changepass_buttons").setStyle({position:"absolute",top:"150px",left:"55px"});a.setDestroyOnClose();a.showCenter();setTimeout("$('currentpw').focus();",125)},sendFlower:function(){var e;if($("sendFlower")){Windows.getWindow("sendFlower").toFront();return}var b=4;var d="";var c=$("photo_user_icon").src;var g=$("name_fullname").innerHTML;var a='<img id="photoUser_gift" style="margin:0 5px 10px 0" src="'+c+'" width="40" border="0" align="left">'+g;for(var f=0;f<b;f++){d+='<a href="#" id="gift'+f+'" onclick="getSendFlower(1,this.id); return false;"><img src="images/gifts/gift'+f+'.jpg" align="left" border="0"></a>'}e=new Window({id:"sendFlower",className:"dialog",width:450,height:440,resizable:false,title:"Enviar Flores Online",draggable:true,closable:true,maximizable:false,minimizable:false,detachable:false,minWidth:240,minHeight:120,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});e.setConstraint(true,{left:0,right:0,top:0,bottom:0});e.getContent().innerHTML='<div class="dialog_info lang-instructionsText langinsert-clear" style="margin:0;padding:0 20px 20px 20px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 8pt;"> 													<div id="gifts"> 														<span id="searchGiftsInfo"><input type="hidden" value="1" id="step3_select"></span> 														<div id="step1" class="steps"> 															<h2><span id="active">1</span><span>2</span><span>3</span>  GR&#193;TIS: Escolha a op&#231;&#227;o para enviar: </h2> '+d+' 														</div> 														<div id="step2" class="steps" style="display:none"> 															<h2><span>1</span><span id="active">2</span><span>3</span> </h2> 															<p>Parab&#233;ns pela Escolha! Agora diga o nome do seu amigo(a) que est&#225; mesa. 															<br>O Gar&#231;om vai levar discretamente at&#233; ele(a)...</p> 															<div id="gifts_search_user"> 															<input type="text" class="searchGifts ac_field_text" id="searchGifts" onFocus="focusSearch(this.id)" value="" /> <br><br>															<a href="#" onclick="changeSendFlower(0)">ou digite um endere&#231;o de email</a> 															</div> 															<div id="gifts_search_email" style="display:none"> 															Nome: <input type="text" class="searchGifts ac_field_text" id="searchGifts_nome" value="" /> <br> 															Email: <input type="text" class="searchGifts ac_field_text" id="searchGifts_email" value="" /> <br> 															<a href="#" onclick="changeSendFlower(1)">ou digite um endere&#231;o de email</a> <br><br>'+ButtonCtl.create("Continuar","step2for3_email();")+'</div> 														</div> 														<div id="step3" class="steps"> 															<h2><span>1</span><span>2</span><span id="active">3</span>  Escreva sua mensagem antes de enviar: </h2> 															<div id="sendFlowerBox"> <div id="sendFlowerDest"></div> 															<img id="giftImg" src="images/gifts/gift0.jpg" border="0" align="left" style="margin:10px 10px 0 0"> <div style="margin-top:10px"> '+a+' l&#225; do &#34Bar Virtual&#34 enviou pra voc&#234;! </div><br> 																<textarea id="sendFlowerTextarea">Seu recado aqui...</textarea> <br> 																<span id="gifts_search_add" style="display:none"><input type="checkbox" id="gifts_search_add_checkbox" onclick="focusAddUser();" /> Adicionar como amigo </span>'+ButtonCtl.create("Enviar","sendFlower();")+"</div></div> 													</div> 											</div>";e.setDestroyOnClose();e.showCenter()},Intro:function(){var a;if($("Intro")){Windows.getWindow("Intro").toFront();return}a=new Window({id:"Intro",className:"dialog",width:550,height:540,resizable:false,title:Languages.get("instructionsTitle"),draggable:true,closable:true,maximizable:false,minimizable:false,detachable:false,minWidth:240,minHeight:120,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});a.setConstraint(true,{left:0,right:0,top:0,bottom:0});a.getContent().innerHTML='<div class="dialog_info lang-instructionsText langinsert-clear" style="margin:20px;padding:20px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 8pt; background-color:#fff; color:#000"> 										<center><img src="images/logo.png" width="175" height="88" align="absmiddle" /></center><br> 										<ol>'+Languages.get("instructionsText")+'</ol> 										<center><img onclick="Windows.close(\'Intro\', event);return false;" src="themes/dark/window/fechar.gif" style="cursor:pointer;"></center></div>';a.setDestroyOnClose();a.showCenter()},AdsContract:function(){var a;if($("AdsContract")){Windows.getWindow("AdsContract").toFront();return}a=new Window({id:"AdsContract",className:"dialog",width:450,height:440,resizable:false,title:"Acordo de Divulga&ccedil;&atilde;o",draggable:true,closable:true,maximizable:false,minimizable:false,detachable:false,minWidth:240,minHeight:120,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});a.setConstraint(true,{left:0,right:0,top:0,bottom:0});var b="<p>ACORDO DE DIVULGA&Ccedil;&Atilde;O: </p><p>Declaro estar de acordo que a minha marca constar&aacute; na p&aacute;gina denominada &quot;Chame o Gar&ccedil;om&quot; no site www.chatbarh.com atrav&eacute;s de um link fornecido por mim do site oficial da minha empresa, cujo per&iacute;odo dessa divulga&ccedil;&atilde;o ser&aacute; excepcionalmente de R$ 45,00 (Quarenta e Cinco Reais) com validade para 06 (Seis) meses. </p><p>Fica firmado entre as partes que o valor mensal dessa divulga&ccedil;&atilde;o, ser&aacute; pago atrav&eacute;s de boleto enviado para meu email.  </p><p>Declaro estar ciente de que o atendimento de excel&ecirc;ncia aos clientes gerados pelo site ser&aacute; essencial para o sucesso dessa parceria comercial.  </p><p>O presente contrato de parceria ter&aacute; sua vigencia a partir da identifica&ccedil;&atilde;o do valor mensal na conta do site. </p><p>Ciente e de acordo  </p><br><br><p>Empresa Contratante conforme Cadastramento anexo.</p><p>Club do RH Networking Corporativo Ltda. </p>";a.getContent().innerHTML='<div class="dialog_info lang-instructionsText langinsert-clear" style="margin:10px;padding:10px;font-family: Verdana, Arial, Helvetica, sans-serif;font-size: 8pt;"> 										<center><img src="images/logo.png" width="175" height="88" align="absmiddle" /></center><br> 										<ol>'+b+'</ol> 										<center><img onclick="Windows.close(\'AdsContract\', event);return false;" src="themes/dark/window/fechar.gif" style="cursor:pointer;"></center></div>';a.setDestroyOnClose();a.showCenter()},Games:function(){var a;if($("Games")){Windows.getWindow("Games").toFront();return}a=new Window({id:"Games",className:"dialog",width:630,height:450,resizable:false,title:Languages.get("games"),draggable:true,closable:true,maximizable:false,minimizable:false,detachable:false,minWidth:240,minHeight:120,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});a.setConstraint(true,{left:0,right:0,top:0,bottom:0});swfobject.embedSWF("games/bartender.swf","Games_content","600","440","9.0.0");a.setDestroyOnClose();a.showCenter()},Videos:function(){var a;if($("Videos")){Windows.getWindow("Videos").toFront();return}a=new Window({id:"Videos",className:"dialog",width:400,height:530,resizable:true,title:Languages.get("videotube"),url:"pages/VideosPlayer.php",draggable:true,closable:true,maximizable:false,minimizable:true,detachable:false,minWidth:250,minHeight:110,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});a.setConstraint(true,{left:20,right:0,top:30,bottom:0});a.setDestroyOnClose();a.showCenter()},Chame:function(){var a;if($("Chame")){Windows.getWindow("Chame").toFront();return}a=new Window({id:"Chame",className:"dialog",width:570,height:540,resizable:true,title:"Chame o Gar&ccedil;on",url:"pages/ChameGarcom.php",draggable:true,closable:true,maximizable:false,minimizable:true,detachable:false,minWidth:250,minHeight:110,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});a.setConstraint(true,{left:0,right:0,top:0,bottom:0});a.setDestroyOnClose();a.showCenter()},ChameForm:function(){var a;if($("ChameForm")){Windows.getWindow("ChameForm").toFront();return}a=new Window({id:"ChameForm",className:"dialog",width:600,height:300,resizable:false,title:"<strong>Aten&ccedil;&atilde;o: </strong>Formul&aacute;rio exclusivo para Pessoas Jur&iacute;dicas/Anunciantes.",draggable:true,closable:true,maximizable:false,minimizable:false,detachable:false,minWidth:240,minHeight:150,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});a.setConstraint(true,{left:0,right:0,top:0,bottom:0});a.getContent().innerHTML='<div class="dialog_form lang-changeSettingsInstructions langinsert-clear" style="padding:20px;"><p>Raz&atilde;o Social: <br><input id="ChameFormCompany" size="35" maxlength="40"></p><p>CNPJ: <br><input id="ChameFormCnpj" size="35" maxlength="40"></p><p>Cidades para visibilidade: <br><input id="ChameFormCities" size="35" maxlength="40"></p><p>Cargo: <br><input id="ChameFormRole" size="35" maxlength="40"></p><p>Endereco Completo: <br><input id="ChameFormGetting" size="35" maxlength="40"></p><div><div class="quick_edit">Clique nos textos abaixo para edita-los!</div><div id="ChameForm_boxads" class="box_ads"><ol><li><h3><a href="#" onclick="return false"><span id="ChameFormName" onclick="aEditCell(this)">Nome da Empresa</span></a></h3><p><span id="ChameFormDescription" onclick="aEditCell(this)">Breve descritivo de suas atividades...</span><cite><br><span id="ChameFormLink" onclick="aEditCell(this)">www.minhaempresa.com.br</span><br><span id="ChameFormPhone" onclick="aEditCell(this)">(DDD) 0000-0000</span></cite></li></ol></div><div id="ChameForm_buttons">'+ButtonCtl.create(Languages.get("cancel"),"Windows.close('ChameForm');")+ButtonCtl.create(Languages.get("ok"),"getChameForm();")+'</div><div id="contract"><a href="#" onclick="Dialogs.AdsContract();return false;">Ler contrato de parceria</a></div></div>';$("ChameForm_boxads").setStyle({position:"absolute",margin:"-155px 0 0 0",left:"250px"});$("ChameForm_buttons").setStyle({position:"absolute",top:"280px",left:"200px"});a.setDestroyOnClose();a.showCenter()},changeName:function(){changeNameWin=new Window({id:"changeName",className:"dialog",width:300,height:160,resizable:false,title:Languages.get("changeNameTitle"),draggable:true,closable:true,maximizable:false,minimizable:false,detachable:false,minWidth:240,minHeight:120,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});changeNameWin.setConstraint(true,{left:0,right:0,top:0,bottom:0});changeNameWin.getContent().innerHTML='<div class="dialog_info" style="padding:3px;">'+Languages.get("changeNameInstructions")+'</div>                                             <span id="changeName_error_msg" class="errorMsg">&nbsp;</span>                                             <div id="changeName_box" style="padding-left:12px;width:100%;">                                             <div style="display:block;float:left;margin-right:5px;padding-top:4px;" class="lang-currentPassword langinsert-replace">'+Languages.get("currentName")+':</div><input type="text" style="width:160px;" id="changeName_txt" name="changeName_txt" onkeypress="handleInput(event, function() { System.changeName(); })" /><br />                                             </div>                                             <div id="changeName_buttons">'+ButtonCtl.create(Languages.get("change"),"System.changeName();")+ButtonCtl.create(Languages.get("cancel"),"Windows.close('changeName');")+"</div>";$("changeName_buttons").setStyle({position:"absolute",top:"150px",left:"55px"});changeNameWin.setDestroyOnClose();changeNameWin.showCenter();setTimeout("$('changeName_txt').focus();",125)},cropPhoto:function(a){cropPhotoWin=new Window({id:"cropPhoto",className:"dialog",width:500,height:380,resizable:false,title:Languages.get("changeNameTitle"),draggable:true,closable:true,maximizable:false,minimizable:false,detachable:false,minWidth:240,minHeight:120,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});cropPhotoWin.setConstraint(true,{left:0,right:0,top:0,bottom:0});cropPhotoWin.getContent().innerHTML='<div class="dialog_info" style="padding:3px;"></div>                                             <span id="changeName_error_msg" class="errorMsg">&nbsp;</span>                                             <div id="changeName_box" style="padding-left:12px;width:100%;">                                             <div style="display:block;float:left;margin-right:5px;padding-top:4px;" class="lang-currentPassword langinsert-replace"> 											<div id="testWrap"><img id="testImage" src="'+a+'"></div><input type="hidden" name="x1" id="x1" /><input type="hidden" name="y1" id="y1" /><input type="hidden" name="x2" id="x2" /><input type="hidden" name="y2" id="y2" /><input type="hidden" name="width" id="width" /><input type="hidden" name="height" id="height" />                                             </div>                                             <div id="cropPhoto_buttons">'+ButtonCtl.create(Languages.get("change"),"System.changeName();")+ButtonCtl.create(Languages.get("cancel"),"Windows.close('changeName');")+"</div>";$("cropPhoto_buttons").setStyle({position:"absolute",top:"300px",left:"55px"});cropPhotoWin.setDestroyOnClose();cropPhotoWin.showCenter();new Cropper.Img("testImage",{minWidth:70,minHeight:70,ratioDim:{x:70,y:70},displayOnInit:true,onEndCrop:onEndCrop})}};var Buddylist={buddyListWin:null,create:function(){Event.observe(window,"resize",Buddylist.fixBuddyList);if(!$("bl")){this.buddyListWin=new Window({id:"bl",className:"dialog",width:210,height:(Browser.height()-80),zIndex:100,resizable:true,title:Languages.get("buddyList"),draggable:true,closable:false,maximizable:false,detachable:false,minWidth:205,minHeight:150,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});this.buddyListWin.setConstraint(true,{left:0,right:0,top:40,bottom:0})}this.buddyListWin.getContent().innerHTML='<div id="blTopToolbar">'+(typeof(Status)!="undefined"?'<div id="statusSettings"><input type="text" id="customStatus" onkeypress="Status.processCustomAway(event);" style="display:none" onblur="if($(\'customStatus\').style.display != \'none\') { $(\'customStatus\').style.display = \'none\'; $(\'curStatus\').style.display = \'block\'; }" /><a href="#" id="curStatus" onclick="Status.toggleStatusList();return false;">'+Languages.get("available")+"</a></div>":"")+'</div><div id="blContainer"><ul id="buddylist" class="sortable box"><li style="display:none"></li></ul></div><div id="blBottomToolbar"></div>';Event.observe(this.buddyListWin.getContent(),"contextmenu",function(){return false});$("bl_minimize").setStyle({left:(this.buddyListWin.getSize()["width"]-21)+"px"});this.sizeBuddyList();this.buddyListWin.showCenter(false,(((Browser.height()-40)/2)-(this.buddyListWin.getSize()["height"]/2)),(buddyListLoc==0?10:(Browser.width()-this.buddyListWin.getSize()["width"]-10)));this.buddyListWin.toFront();this.list={};this.listObjects={};this.blocked={}},destroy:function(){this.buddyListWin.destroy()},fixBuddyList:function(){if(Buddylist.buddyListWin.isVisible()){Buddylist.buddyListWin.setSize(210,(Browser.height()-80));Buddylist.buddyListWin.setLocation((((Browser.height()-40)/2)-(Buddylist.buddyListWin.getSize()["height"]/2)),(buddyListLoc==0?10:(Browser.width()-Buddylist.buddyListWin.getSize()["width"]-10)));Buddylist.sizeBuddyList()}},sizeBuddyList:function(){$("blContainer").setStyle({width:(this.buddyListWin.getSize()["width"]-8)+"px",height:(this.buddyListWin.getSize()["height"]-25)+"px"});$("blBottomToolbar").setStyle({width:(this.buddyListWin.getSize()["width"]-8)+"px",top:(this.buddyListWin.getSize()["height"]-7)+"px"});$("bl_minimize").setStyle({left:(this.buddyListWin.getSize()["width"]-21)+"px"})},addNewBuddy:function(c,a){c=c.toLowerCase();if(!inArray(Buddylist.list,c)&&(!Buddylist.listObjects[c]||!$(Buddylist.listObjects[c].obj))){var b=new XHConn();b.connect(pingTo,"POST","call=isuser&username="+c,function(e){if(e.responseText=="not_exists"){$("newbuddy_error_msg").innerHTML=Languages.get("noSuchUser")}else{if(!$(a.replace(/\s/,"_")+"_group")){Buddylist.addGroup(a);Buddylist.list[a]=[]}Buddylist.addBuddy(c,"Offline","none");if(parseInt(e.responseText)==0){Buddylist.moveBuddy(c,"Offline");$(Buddylist.listObjects[c].img).src="themes/"+theme+"/offline.png"}else{if(parseInt(e.responseText)==2){Buddylist.moveBuddy(c,a);$(Buddylist.listObjects[c].img).src="themes/"+theme+"/away.png"}else{Buddylist.moveBuddy(c,a);$(Buddylist.listObjects[c].img).src="themes/"+theme+"/online.png"}}Buddylist.list[a][c]={username:c,blocked:false,status:parseInt(e.responseText)};var d=new XHConn();d.connect(pingTo,"POST","call=addbuddy&username="+c+"&group="+a,null);Windows.close("newBuddy")}})}else{$("newbuddy_error_msg").innerHTML=Languages.get("alreadyOnBuddylist")}},addBuddy:function(f,b,a){if(!$(b.replace(/\s/,"_")+"_group")){this.addGroup(b)}var c=$(b.replace(/\s/,"_")+"_group");var e=(a=="none"?defaultIcon:pathToIcons+f+"."+a);var d=Math.floor(Math.random()*1000000000);while($(d+"_blItem")){d=Math.floor(Math.random()*1000000000)}c.innerHTML+='<li id="'+d+'_blItem" class="buddy'+(useIcons&&showInList?" buddyicon":"")+'" onclick="Buddylist.clickBuddy(event, \''+f+'\');return false;" onselectstart="return false;" onmouseover="Buddylist.selectBuddy(this, \''+f+"', true);\" onmouseout=\"Buddylist.selectBuddy(this, '"+f+'\', false);" ondblclick="Buddylist.onBuddyDblClick();">'+(useIcons&&showInList?(defaultIcon==""&&a=="none"?"":'<img class="blIcon" src="'+e+'" alt="" id="'+d+'_blIcon" />'):"")+'&nbsp;&nbsp;&nbsp;&nbsp;<img src="themes/'+theme+'/online.png" alt="" id="'+d+'_blImg" />&nbsp;'+f+'<div class="fastquick" style="display:none" id="fastquick_'+f+'"><img src="images/user.png" onmousedown="Dialogs.viewProfile(\''+f+'\');return false;" align="absmiddle" border="0"><img src="images/user_block.png" onmousedown="Dialogs.blockBuddy(\''+f+'\');return false;" align="absmiddle" border="0"><img src="images/cross.png" onmousedown="Dialogs.removeBuddy(\''+f+'\');return false;" align="absmiddle" border="0"></div></li>';Buddylist.listObjects[f]={};Buddylist.listObjects[f].obj=d+"_blItem";Buddylist.listObjects[f].img=d+"_blImg";Buddylist.listObjects[f].icon=a;Buddylist.listObjects[f].group=b;$(Buddylist.listObjects[f].obj).setStyle({listStyleType:"none"})},moveBuddy:function(c,a){if(a==null){return}if($(Buddylist.listObjects[c].obj).parentNode==$(a.replace(/\s/,"_")+"_group")){return}if(!$(a.replace(/\s/,"_")+"_group")){this.addGroup(a)}var b=$(a.replace(/\s/,"_")+"_group");b.insertBefore($(Buddylist.listObjects[c].obj),null)},addGroup:function(a){var b=$("buddylist");b.innerHTML=(a=="Offline"?b.innerHTML:"")+'<li id="'+a.replace(/\s/,"_")+'_groupTop" class="groupTop" onmousedown="return false;" onselectstart="return false;" onclick="Buddylist.toggleGroup(\''+a+'\');"><img id="'+a.replace(/\s/,"_")+'_groupArrow" src="themes/'+theme+'/window/arrow.png" />&nbsp;&nbsp;'+a+(a!="Offline"?' <a href="#" class="delLink" onclick="Dialogs.removeGroup(\''+a+'\');return false;"><img src="themes/'+theme+'/window/smallx.png" style="border:0;" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" /></a>':"")+'</li>\n<ul id="'+a.replace(/\s/,"_")+'_group" class="group"></ul>'+(a!="Offline"?b.innerHTML:"")},deleteBuddy:function(f){if(f.indexOf("_group")!=-1){this.deleteGroup(f.substring(0,f.length-6));return}var c=f;var e=null;for(var d in this.list){if(typeof(this.list[d][f])!=="undefined"&&this.list[d][f].username==f){e=d;break}}var a=$(Buddylist.listObjects[f].obj);if(typeof(a)!=="undefined"){a.parentNode.removeChild(a);if(this.list[e]){this.list[e][f]=null;var b=new XHConn();b.connect(pingTo,"POST","call=removebuddy&username="+f,null)}Dialog.closeInfo()}},blockBuddy:function(e){var c=this.blocked.inArray(e);if(c){for(var b=0;b<this.blocked.length;b++){if(this.blocked[b]==e){this.blocked.splice(b,1)}break}}else{this.blocked[this.blocked.length]=e}var a=new XHConn();a.connect(pingTo,"POST","call=blockbuddy&username="+e+(c?"&status="+(Status.state+1):""),null);for(var d in this.list){if(typeof(this.list[d][e])!=="undefined"&&this.list[d][e].username==e){this.list[d][e].blocked=(c?false:true);$(Buddylist.listObjects[e].img).src=(!c?"themes/"+theme+"/blocked.png":(Buddylist.list[d][e].status==1?"themes/"+theme+"/online.png":(Buddylist.list[d][e].status>=2?"themes/"+theme+"/away.png":"themes/"+theme+"/offline.png")));if(!blockedBuddyStatus&&c){Buddylist.moveBuddy(e,Languages.get("offline"))}break}}},deleteGroup:function(b){var g=b.replace(/\s/,"_");var f=$(g+"_group");var e=$(g+"_groupTop");if(typeof(f)!=="undefined"){f.parentNode.removeChild(f);e.parentNode.removeChild(e);for(var d=0;d<this.list[b].length;d++){var a=$(Buddylist.listObjects[this.list[b][d].username].obj);if(typeof(a)!=="undefined"){a.parentNode.removeChild(a)}}delete this.list[b];var c=new XHConn();c.connect(pingTo,"POST","call=removegroup&group="+b,null);Dialog.closeInfo()}else{$("deletebuddy_error_msg").innerHTML=Languages.get("noSuchGroup");$("deletebuddy_error_msg").show();Dialog.win.updateHeight()}},toggleGroup:function(b){var c=$(b.replace(/\s/,"_")+"_group");var a=$(b.replace(/\s/,"_")+"_groupArrow");if(c.style.display!="none"){c.hide();a.src="themes/"+theme+"/window/arrow_up.png"}else{c.show();a.src="themes/"+theme+"/window/arrow.png"}},selectBuddy:function(b,d,a){if(a===false){if(curSelected!=d){try{Element.addClassName(b,"listNotSelected");$("fastquick_"+d).hide();Element.removeClassName(b,"listSelected");Element.removeClassName(b,"listHover")}catch(c){}}else{Element.addClassName(b,"listSelected");$("fastquick_"+d).show();Element.removeClassName(b,"listNotSelected");Element.removeClassName(b,"listHover")}}else{Element.addClassName(b,"listHover");$("fastquick_"+d).show();Element.removeClassName(b,"listSelected");Element.removeClassName(b,"listNotSelected")}},clickBuddy:function(c,f){c=c||window.event;if(c.button==2){Context.lastClicked=f}else{Context.lastClicked=null;if(curSelected.length>0){try{var b=$(Buddylist.listObjects[curSelected].obj);Element.addClassName(b,"listNotSelected");$("fastquick_"+f).hide();Element.removeClassName(b,"listSelected");Element.removeClassName(b,"listHover")}catch(d){}}curSelected=f;var a=$(Buddylist.listObjects[curSelected].obj);Element.addClassName(a,"listSelected");$("fastquick_"+f).show();Element.removeClassName(a,"listNotSelected");Element.removeClassName(a,"listHover")}return false},onBuddyDblClick:function(){if(curSelected.length>0){if(typeof(IM.windows[curSelected])=="undefined"){IM.create(curSelected,curSelected)}else{if(IM.windows[curSelected].detached){if(IM.windows[curSelected].popup.closed){IM.windows[curSelected]=IM.windows[curSelected].old;IM.windows[curSelected].show()}else{IM.windows[curSelected].popup.focus()}}else{if(!IM.windows[curSelected].isVisible()){IM.windows[curSelected].show();IM.windows[curSelected].toFront();setTimeout("scrollToBottom('"+IM.windows[curSelected].getId()+"_rcvd')",125);setTimeout("$('"+IM.windows[curSelected].getId()+"_sendBox').focus();",250)}else{IM.windows[curSelected].toFront();setTimeout("$('"+IM.windows[curSelected].getId()+"_sendBox').focus();",250)}}}}}};var Status={state:0,awayMessage:"",wasSetAutoAway:false,lastIM:null,set:function(a,b){lastIM=new Date().getTime();if(a==1){this.state=1;this.awayMessage=b;$("curStatus").innerHTML=this.awayMessage.substring(0,30)+(this.awayMessage.length>30?"...":"")}else{this.state=a;this.awayMessage="";$("curStatus").innerHTML=b}$("statusList").hide()},customAway:function(){$("curStatus").hide();$("customStatus").show().focus()},processCustomAway:function(b){b=b||b.window;var a=document.all?b.keyCode:b.which;if(a==13){awayMessage=$("customStatus").value;$("curStatus").innerHTML=awayMessage.substring(0,30)+(awayMessage.length>30?"...":"");$("curStatus").show();$("customStatus").hide();Status.set(1,awayMessage)}return a!=13},toggleStatusList:function(){var a=$("statusList");if(a.style.display=="block"){a.hide();if(a.style.zIndex>Windows.maxZIndex){Windows.maxZIndex=a.style.zIndex}}else{Element.setStyle(a,{left:parseInt(Buddylist.buddyListWin.getLocation()["left"])+$("statusSettings").offsetLeft+$("blTopToolbar").offsetLeft+"px",top:parseInt(Buddylist.buddyListWin.getLocation()["top"])+$("statusSettings").offsetTop+$("blTopToolbar").offsetTop+$("statusSettings").offsetHeight+"px",zIndex:Windows.maxZIndex+20,display:"block"})}}};var Profile={windows:{},create:function(c,f){var e=Math.round(Math.random()*(Browser.width()-360))+"px";var a=Math.round(Math.random()*(Browser.height()-400))+"px";var d=randomString(32)+"_profile";this.windows[c]=new Window({id:d,className:"dialog",width:320,height:335,top:a,left:e,resizable:true,title:f,draggable:true,detachable:false,minWidth:320,minHeight:150,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});this.windows[c].setConstraint(true,{left:0,right:0,top:0,bottom:0});var b=new XHConn();b.connect(pingTo,"POST","call=getprofile&user="+c,function(g){Profile.windows[c].getContent().innerHTML='<div class="userProfile" id="'+c+'_userProfile">'+(g.responseText==""?Languages.get("hasNoProfile"):g.responseText)+'</div><div class="updateProfile">'+ButtonCtl.create(Languages.get("update"),"Profile.update('"+c+"');")+"</div>"}.bind(c));this.windows[c].show();this.windows[c].toFront();Windows.focusedWindow=this.windows[c]},update:function(b){if($(b+"_userProfile")){var a=new XHConn();a.connect(pingTo,"POST","call=getprofile&user="+b,function(c){$(b+"_userProfile").innerHTML=(c.responseText==""?Languages.get("hasNoProfile"):c.responseText)})}}};var AjaxIM={windows:{},sendBoxWithFocus:null,create:function(b,f){var a=typeof Buddylist.listObjects[b]=="undefined"?"none":Buddylist.listObjects[b].icon;var d=(a=="none"?defaultIcon:pathToIcons+b+"."+a);var e=Math.round(Math.random()*(Browser.width()-360))+"px";var g=Math.round(Math.random()*(Browser.height()-400))+"px";var c=randomString(32)+"_im";this.windows[b]=new IMWindow({id:c,className:"dialog",width:320,height:335,top:g,left:e,resizable:true,title:f,draggable:true,detachable:imDetachable,minWidth:320,minHeight:150,showEffectOptions:{duration:0},hideEffectOptions:{duration:0}});this.windows[b].setConstraint(true,{left:0,right:0,top:0,bottom:0});this.windows[b].getContent().innerHTML='<div class="userToolbar" id="'+c+'_userFuncs"><img src="themes/'+theme+'/window/addbuddy.png" class="toolbarButton" onclick="Dialogs.newBuddy();$(\'newBuddyUsername\').value=\''+b+'\'" alt="'+Languages.get("addBuddyButton")+'" title="'+Languages.get("addBuddyButton")+'" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onmousedown="buttonDown(this);" onmouseup="buttonNormal(this);" /> <img src="themes/'+theme+'/window/block.png" class="toolbarButton" onclick="Dialogs.blockBuddy(\''+b+'\');" alt="" title="" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onmousedown="buttonDown(this);" onmouseup="buttonNormal(this);" /></div>'+(useIcons?(defaultIcon==""&&a=="none"?"":'<img src="'+d+'" id="buddyIcon_'+b+'" alt="Buddy Icon" class="buddyIcon" onmouseover="IM.buddyIconHover(this);" onmouseout="IM.buddyIconNormal(this);" />'):"")+'<div class="rcvdMessages" id="'+c+'_rcvd"></div>\n<div class="imToolbar" id="'+c+'_toolbar" onmousemove="return false;" onselectstart="return false;"><img src="themes/'+theme+'/window/bold_off.png" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onclick="IM.windows[\''+b+'\'].toggleBold();" onmousedown="return false;" alt="'+Languages.get("bold")+'" id="'+c+'_bold" /> <img src="themes/'+theme+'/window/italic_off.png" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onclick="IM.windows[\''+b+'\'].toggleItalic();" onmousedown="return false;" alt="'+Languages.get("italic")+'" id="'+c+'_italic" /> <img src="themes/'+theme+'/window/underline_off.png" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onclick="IM.windows[\''+b+'\'].toggleUnderline();" onmousedown="return false;" alt="'+Languages.get("underline")+'" id="'+c+'_underline" /></div> <a href="#" class="setFontLink" id="'+c+'_setFont" onclick="IM.windows[\''+b+'\'].toggleFontList();return false;" onselectstart="return false;">Tahoma</a> <a href="#" class="setFontSizeLink" id="'+c+'_setFontSize" onclick="IM.windows[\''+b+'\'].toggleFontSizeList();return false;" onselectstart="return false;">12</a> <a href="#" class="setFontColorLink" id="'+c+'_setFontColor" onclick="IM.windows[\''+b+'\'].toggleFontColorList();return false;" onselectstart="return false;"><div id="'+c+'_setFontColorColor" style="width:14px;height:14px;display:block;"></div></a> <a href="#" class="insertEmoticonLink" id="'+c+'_insertEmoticon" onclick="IM.windows[\''+b+'\'].toggleEmoticonList();return false;" onselectstart="return false;"><img src="themes/'+theme+'/emoticons/mini_smile.gif" width="14" height="14" style="border:0;" /></a>\n<div style="overflow:auto;"><textarea class="inputText" id="'+c+'_sendBox" onfocus="blinkerOn(false);IM.sendBoxWithFocus=this;" onblur="IM.sendBoxWithFocus=null;" onkeypress="return IM.windows[\''+b+"'].keyHandler(event);\" onkeyup=\"textTypping('', '"+c+'_setTypping\');"></textarea><input type="hidden" id="'+c+'_setTypping" value="0"></div>';this.windows[b].setUsername(b);$(c+"_rcvd").setStyle({height:(this.windows[b].getSize().height-135)+"px",width:(this.windows[b].getSize().width-10)+"px"});$(c+"_toolbar").setStyle({top:(this.windows[b].getSize().height-73)+"px",width:(this.windows[b].getSize().width-10)+"px"});$(c+"_setFont").setStyle({top:(this.windows[b].getSize().height-65)+"px"});$(c+"_setFontSize").setStyle({top:(this.windows[b].getSize().height-65)+"px"});$(c+"_setFontColor").setStyle({top:(this.windows[b].getSize().height-65)+"px"});$(c+"_setFontColorColor").setStyle({backgroundColor:"#000"});$(c+"_insertEmoticon").setStyle({top:(this.windows[b].getSize().height-65)+"px"});$(c+"_sendBox").setStyle({top:(this.windows[b].getSize().height-45)+"px",left:"2px",width:(this.windows[b].getSize().width-16)+"px",fontWeight:"400",fontStyle:"normal",textDecoration:"none"});this.windows[b].show();this.windows[b].toFront();Windows.focusedWindow=this.windows[b];setTimeout("$('"+c+"_sendBox').focus();",250);if(vanishingIcons){setTimeout("if($('buddyIcon_"+b+"')){$('buddyIcon_"+b+"').hide();}",vanishingSpeed)}},sendMessage:function(g,l,e,c,a,d,b,k,h){var f=new XHConn();f.connect(pingTo,"POST","call=send&recipient="+g+"&chatroom="+e+"&bold="+c+"&italic="+a+"&underline="+d+"&font="+b+"&fontsize="+k+"&fontcolor="+h+"&message="+encodeURIComponent(l),function(n){var m=null;switch(n.responseText){case"sent":break;case"sent_offline":m=Languages.get("notifySentButOffline");break;case"not_online":m=Languages.get("errorNotLoggedIn");break;case"too_long":m=Languages.get("errorMsgTooLong");break;case"not_logged_in":if(typeof System!="undefined"){System.logout()}else{self.opener.System.logout()}break;default:m=Languages.get("errorUnknown");break}if(e=="true"){Chatroom.windows[g].sendResult(l,c,a,d,b,k,h,m)}else{IM.windows[g].sendResult(l,c,a,d,b,k,h,m)}});if(audioNotify==true){soundManager.play("msg_out")}},emoteReplace:function(c,d){var b;for(var a in d){if(c.indexOf(a)>-1){c=c.replace(new RegExp(regExpEscape(a),"g"),'<img src="themes/'+theme+"/emoticons/"+d[a]+'" alt="'+d[a]+'" title="'+a+'" />')}}return c},newIMWindow:function(){if($("sendto").value.replace(/^\s*|\s*$/g,"").length>0){var a=$("sendto").value;if(typeof(this.windows[a])=="undefined"){this.create(a,a)}else{if(!this.windows[a].isVisible()){this.windows[a].show();setTimeout("scrollToBottom('"+this.windows[a].getId()+"_rcvd')",125)}}Windows.close("newIM");this.windows[a].toFront();setTimeout("$('"+this.windows[a].getId()+"_sendBox').focus()",125)}else{$("newim_error_msg").innerHTML=Languages.get("newIMProper")}},handleClose:function(a,c){if(c.getId().indexOf("_im")==-1&&c.getId().indexOf("_chat")==-1){return}if(typeof(c.room)!=="undefined"){Chatroom.leave(c.room)}var b=$(c.getId()+"_rcvd");if(imHistory==true){b.innerHTML='<span class="imHistory">'+b.innerHTML.replace(new RegExp("("+Languages.get("autoreply")+":)/g"),Languages.get("autoreply")+":").replace(/<(?![Bb][Rr] ?\/?)([^>]+)>/ig,"")+"</span>\n"}else{b.innerHTML=""}},handleMinimize:function(a,b){if(b.getId().indexOf("_im")==-1){return}var c=$(b.getId()+"_rcvd");c.scrollTop=c.scrollHeight-c.clientHeight+6},createTimestamp:function(){Stamp=new Date();var g=String(Stamp.getHours());var a=String(Stamp.getMinutes());var h=String(Stamp.getSeconds());var b=g>12?g-12:g;var f=g>12?"pm":"am";var l=g>12?"PM":"AM";var d=String(Stamp.getDate());var m=String(Stamp.getMonth()+1);var c=["Jan","Feb","Mar","Apr","May","Jun","July","Aug","Sep","Nov","Dec"][m-1];var k=String(Stamp.getFullYear());var e=k.substring(2);tu=m;tx=d;tQ=g;g=(g.length>1)?g:"0"+g;a=(a.length>1)?a:"0"+a;tq=(b.length>1)?b:"0"+b;h=(h.length>1)?h:"0"+h;d=(d.length>1)?d:"0"+d;m=(m.length>1)?m:"0"+m;if(typeof timestamp=="undefined"){timestamp=self.opener.timestamp}return'<span class="timestamp">'+timestamp.replace(/H/,g).replace(/h/,b).replace(/i/,a).replace(/s/,h).replace(/d/,d).replace(/Y/,k).replace(/y/,e).replace(/m/,m).replace(/u/,tu).replace(/x/,tx).replace(/Q/,tQ).replace(/q/,tq).replace(/a/,f).replace(/A/,l).replace(/M/,c)+"</span>"},notifyUser:function(b,a){if(typeof(IM.windows[b])!="undefined"){if(IM.windows[b].isVisible()){IM.windows[b].sendResult("","","","","","","",a)}}},buddyIconHover:function(a){},buddyIconNormal:function(a){if($(a.id+"_clone")){$(a.id+"_clone").remove()}}};var AjaxIMWindow=Class.create();Object.extend(AjaxIMWindow.prototype,Window.prototype);Object.extend(AjaxIMWindow.prototype,{setUsername:function(a){this.username=a},send:function(){},sendResult:function(o,d,a,e,b,n,l,p){var h=this.getId();var c=$(h+"_sendBox");var f=$(h+"_rcvd");var k=$("photo_user_icon").src;var m=(k=="none"?defaultIcon:k);var g='<img src="'+m+'" id="buddyIcon_'+user+'" alt="'+user+'" class="IM_buddyIcon" />'+user;if(p!=null){f.innerHTML=f.innerHTML+'<span class="imError">'+p+"</span><br>"}if(trim(o).length>0){o=o.replace(/<br\/>/g,"\n").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/<([^>]+)>/ig,"").replace(/\n/g,"<br/>").replace(/(\s|\n|>|^)(\w+:\/\/[^<\s\n]+)/,'$1<a href="$2" target="_blank">$2</a>');o=IM.emoteReplace(o,smilies);if(o.replace(/<([^>]+)>/ig,"").indexOf("/me")==0){f.innerHTML=f.innerHTML+'<div class="IM_userA"><b class="userA">'+IM.createTimestamp()+" <i>"+g+" "+o.replace(/<([^>]+)>/ig,"").replace(/\/me/,"")+"</i></b></div>\n"}else{f.innerHTML=f.innerHTML+'<div class="IM_userA"><b class="userA">'+IM.createTimestamp()+" "+g+':</b> <span style="font-family:'+b+",sans-serif;font-size:"+n+"px;color:"+l+';">'+(d=="true"?"<b>":"")+(a=="true"?"<i>":"")+(e=="true"?"<u>":"")+o+(d=="true"?"</b>":"")+(a=="true"?"</i>":"")+(e=="true"?"</u>":"")+"</span></div>\n"}}scrollToBottom(h+"_rcvd")},toggleBold:function(){var b=this.getId();var a=$(b+"_sendBox");if(Windows.focusedWindow.options.eschat){var c="paper_"}else{var c=""}a.hide();if(a.style.fontWeight=="400"){$(b+"_bold").src="themes/"+theme+"/window/"+c+"bold_on.png";a.setStyle({fontWeight:"700"})}else{a.setStyle({fontWeight:"400"});$(b+"_bold").src="themes/"+theme+"/window/"+c+"bold_off.png"}a.show();setTimeout("$('"+b+"_sendBox').focus();",125)},toggleItalic:function(){var b=this.getId();var a=$(b+"_sendBox");if(Windows.focusedWindow.options.eschat){var c="paper_"}else{var c=""}a.hide();if(a.style.fontStyle=="normal"){a.setStyle({fontStyle:"italic"});$(b+"_italic").src="themes/"+theme+"/window/"+c+"italic_on.png"}else{a.setStyle({fontStyle:"normal"});$(b+"_italic").src="themes/"+theme+"/window/"+c+"italic_off.png"}a.show();setTimeout("$('"+b+"_sendBox').focus();",125)},toggleUnderline:function(){var b=this.getId();var a=$(b+"_sendBox");if(Windows.focusedWindow.options.eschat){var c="paper_"}else{var c=""}a.hide();if(a.style.textDecoration=="none"){a.setStyle({textDecoration:"underline"});$(b+"_underline").src="themes/"+theme+"/window/"+c+"underline_on.png"}else{a.setStyle({textDecoration:"none"});$(b+"_underline").src="themes/"+theme+"/window/"+c+"underline_off.png"}a.show();setTimeout("$('"+b+"_sendBox').focus();",125)},toggleFontList:function(){var a=$("fontsList");var b=$(this.getId()+"_setFont");$("emoticonList","fontColorList","fontSizeList").invoke("hide");if($("fontsList").style.display=="block"){a.hide()}else{a.setStyle({left:Position.cumulativeOffset(b)[0]+"px",top:(Position.cumulativeOffset(b)[1]+Element.getHeight(b)-1)+"px",zIndex:Windows.maxZIndex+20,display:"block"});IM.active=this}},toggleFontSizeList:function(){var a=$("fontSizeList");var b=$(this.getId()+"_setFontSize");$("emoticonList","fontsList","fontColorList").invoke("hide");if($("fontSizeList").style.display=="block"){$("fontSizeList").setStyle({display:"none"})}else{a.setStyle({left:Position.cumulativeOffset(b)[0]+"px",top:(Position.cumulativeOffset(b)[1]+Element.getHeight(b)-1)+"px",zIndex:Windows.maxZIndex+20,display:"block"});IM.active=this}},toggleEmoticonList:function(){var b=$("emoticonList");var a=$(this.getId()+"_insertEmoticon");$("fontsList","fontSizeList","fontColorList").invoke("hide");if($("emoticonList").style.display=="block"){$("emoticonList").setStyle({display:"none"})}else{b.setStyle({left:Position.cumulativeOffset(a)[0]+"px",top:(Position.cumulativeOffset(a)[1]+Element.getHeight(a)-1)+"px",zIndex:Windows.maxZIndex+20,display:"block"});IM.active=this}},toggleFontColorList:function(){var b=$("fontColorList");var a=$(this.getId()+"_setFontColor");$("fontsList","fontSizeList","emoticonList").invoke("hide");if($("fontColorList").style.display=="block"){$("fontColorList").setStyle({display:"none"})}else{b.setStyle({left:Position.cumulativeOffset(a)[0]+"px",top:(Position.cumulativeOffset(a)[1]+Element.getHeight(a)-1)+"px",zIndex:Windows.maxZIndex+20,display:"block"});IM.active=this}},setFont:function(c){var b=this.getId();var a=$(b+"_sendBox");a.hide();a.setStyle({fontFamily:c+", sans-serif"});a.show();$(b+"_setFont").innerHTML=c;setTimeout("$('"+b+"_sendBox').focus();",125);this.toggleFontList("")},setFontSize:function(c){var b=this.getId();var a=$(b+"_sendBox");a.hide();a.setStyle({fontSize:c+"px"});a.show();$(b+"_setFontSize").innerHTML=c;setTimeout("$('"+b+"_sendBox').focus();",125);this.toggleFontSizeList("")},setFontColor:function(a){var c=this.getId();var b=$(c+"_sendBox");b.setStyle({color:a});$(c+"_setFontColorColor").setStyle({backgroundColor:a});setTimeout("$('"+c+"_sendBox').focus();",125);this.toggleFontColorList("")},insertText:function(a){var c=this.getId();var b=$(c+"_sendBox");b.value+=a;setTimeout("$('"+c+"_sendBox').focus();",125);this.toggleEmoticonList();return false},keyHandler:function(e){e=e||window.event;var d=document.all?e.keyCode:e.which;var a=e.shiftKey;textTypping("typping",this.getId()+"_setTypping");if(useLingo){var c=$(this.getId()+"_sendBox").value;if(trim(c).length>0){for(var b=0;b<lingoPunction.length;b++){if(RegExp(lingoPunction[b][0]+"$").test(c)){$(this.getId()+"_sendBox").value=Languages.lingoReplace(c,lingoPunction[b]);if(d==13&&!a){}else{return true}}}}}if(d==13&&!a){this.send();return false}return true},detach:function(){var a=this.getId();newWin=this.username;newWinRcvd=$(a+"_rcvd").innerHTML;this.hide();this.popup=window.open("./popup.html",a+"_im","left="+this.getLocation()["left"]+",top="+this.getLocation()["top"]+",width=320,height=335,toolbar=0,location=1,status=0,menubar=0,resizable=1,scrollbars=0");this.detached=true}});var IM={handleResize:function(a,d,c){if(d.getId()=="bl"){Buddylist.sizeBuddyList()}else{if(d.getId().indexOf("_im")!=-1){var b=d.getId();var e=$(b+"_rcvd");e.setStyle({height:(d.getSize()["height"]-135)+"px",width:(d.getSize()["width"]-10)+"px"});$(b+"_toolbar").setStyle({top:(d.getSize()["height"]-73)+"px",width:(d.getSize()["width"]-10)+"px"});$(b+"_setFont").setStyle({top:(d.getSize()["height"]-65)+"px"});$(b+"_setFontSize").setStyle({top:(d.getSize()["height"]-65)+"px"});$(b+"_setFontColor").setStyle({top:(d.getSize()["height"]-65)+"px"});$(b+"_insertEmoticon").setStyle({top:(d.getSize()["height"]-65)+"px"});$(b+"_sendBox").setStyle({top:(d.getSize()["height"]-45)+"px",width:(d.getSize()["width"]-16)+"px"});e.scrollTop=e.scrollHeight-e.clientHeight+6}else{if(d.getId().indexOf("_chat")!=-1){Chatroom.handleResize(d.room)}else{if(d.getId().indexOf("admin-")!=-1){AdminWindows.handleResize(d)}}}}}};Object.extend(IM,AjaxIM);var IMWindow=Class.create(AjaxIMWindow);IMWindow.addMethods({send:function($super){$super();var g=this.getId();var c=$(g+"_sendBox");var d=(c.style.fontWeight=="400"?"false":"true");var a=(c.style.fontStyle=="normal"?"false":"true");var e=(c.style.textDecoration=="none"?"false":"true");var b=$(g+"_setFont").innerHTML;var l=$(g+"_setFontSize").innerHTML;var h=$(g+"_setFontColorColor").style.backgroundColor;var f=(typeof(this.room)!=="undefined"?"true":"false");if(trim(c.value).length>0){var k=c.value;c.value="";IM.sendMessage((f=="true"?this.room:this.username),k.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;").replace(/\n/g,"<br/>"),f,d,a,e,b,l,h);Status.lastIM=new Date().getTime();if(typeof(Status)!="undefined"&&Status.wasSetAutoAway){Status.set(1,Languages.get("available"))}}scrollToBottom(g+"_rcvd");c.focus()}});var Chatroom={windows:{},create:function(b,f){var e=Math.round(Math.random()*(Browser.width()-360))+"px";var g=Math.round(Math.random()*(Browser.height()-400))+"px";var d=randomString(32)+"_chat";this.windows[b]=new ChatWindow({id:d,className:"dialog",width:482,height:340,top:g,left:e,resizable:true,title:f,draggable:true,maximizable:true,detachable:false,minWidth:475,minHeight:150,showEffectOptions:{duration:0},hideEffectOptions:{duration:0},eschat:true});this.windows[b].setConstraint(true,{left:0,right:0,top:0,bottom:0});this.windows[b].getContent().innerHTML='<div class="rcvdMessages" id="'+d+'_rcvd"></div>\n<div id="chat_telao" style="display:none"><div id="chat_telao_content"></div><div id="chat_telao_canais"></div></div><div class="chatUserList" id="'+d+'_userlist"> <div class="chat_link" onclick="Dialogs.sendFlower();"><a href="#"> <img src="images/send_flower.png" align="absmiddle" border="0"> Envie flores online para:</a></div> <div class="chat_link" onclick="Windows.maximize(\''+d+'\', event);"><a href="#"> <img src="images/television.png" align="absmiddle" border="0"> Liga tel&#227;o / Expandir</a></div> <div class="chat_link" onclick="Dialogs.Games();"><a href="#"> <img src="images/controller.png" align="absmiddle" border="0"> Game Drink 100%</a></div><div class="chat_link" onclick="Dialogs.Chame();"><a href="#"> <img src="images/drink.png" align="absmiddle" border="0"> Chame o Gar&#231;om</a></div> <ul id="'+d+'_ul" class="sortable box"><li style="display:none"></li></ul></div>\n<div class="imToolbar" id="'+d+'_toolbar" onmousemove="return false;" onselectstart="return false;"><img src="themes/'+theme+'/window/paper_bold_off.png" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onclick="Chatroom.windows[\''+b+'\'].toggleBold();" onmousedown="return false;" alt="'+Languages.get("bold")+'" id="'+d+'_bold" /> <img src="themes/'+theme+'/window/paper_italic_off.png" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onclick="Chatroom.windows[\''+b+'\'].toggleItalic();" onmousedown="return false;" alt="'+Languages.get("italic")+'" id="'+d+'_italic" /> <img src="themes/'+theme+'/window/paper_underline_off.png" onmouseover="buttonHover(this);" onmouseout="buttonNormal(this);" onclick="Chatroom.windows[\''+b+'\'].toggleUnderline();" onmousedown="return false;" alt="'+Languages.get("underline")+'" id="'+d+'_underline" /></div> <a href="#" class="setFontLink" id="'+d+'_setFont" onclick="Chatroom.windows[\''+b+'\'].toggleFontList();return false;" onselectstart="return false;">Tahoma</a> <a href="#" class="setFontSizeLink" id="'+d+'_setFontSize" onclick="Chatroom.windows[\''+b+'\'].toggleFontSizeList();return false;" onselectstart="return false;">12</a> <a href="#" class="setFontColorLink" id="'+d+'_setFontColor" onclick="Chatroom.windows[\''+b+'\'].toggleFontColorList();return false;" onselectstart="return false;"><div id="'+d+'_setFontColorColor" style="width:14px;height:14px;display:block;"></div></a> <a href="#" class="insertEmoticonLink" id="'+d+'_insertEmoticon" onclick="Chatroom.windows[\''+b+'\'].toggleEmoticonList();return false;" onselectstart="return false;"><img src="themes/'+theme+'/emoticons/mini_smile.gif" width="14" height="14" style="border:0;" /></a>\n<div style="overflow:auto;"><textarea class="inputText" id="'+d+'_sendBox" onfocus="blinkerOn(false);" onkeypress="return Chatroom.windows[\''+b+"'].keyHandler(event);\"></textarea></div>";this.windows[b].setRoom(b);$(d+"_userlist").setStyle({left:(this.windows[b].getSize().width-155)+"px",height:(this.windows[b].getSize().height-12)+"px"});$(d+"_rcvd").setStyle({marginTop:"5px",height:(this.windows[b].getSize().height-103)+"px",width:(this.windows[b].getSize().width-170)+"px"});$(d+"_toolbar").setStyle({top:(this.windows[b].getSize().height-73)+"px",width:(this.windows[b].getSize().width-170)+"px"});$(d+"_setFont").setStyle({top:(this.windows[b].getSize().height-65)+"px"});$(d+"_setFontSize").setStyle({top:(this.windows[b].getSize().height-65)+"px"});$(d+"_setFontColor").setStyle({top:(this.windows[b].getSize().height-65)+"px"});$(d+"_setFontColorColor").setStyle({backgroundColor:"#000"});$(d+"_insertEmoticon").setStyle({top:(this.windows[b].getSize().height-65)+"px"});var c=$(d+"_sendBox");c.setStyle({top:(this.windows[b].getSize().height-45)+"px",left:"2px",width:(this.windows[b].getSize().width-175)+"px",fontWeight:"400",fontStyle:"normal",textDecoration:"none"});this.windows[b].show();this.windows[b].toFront();Windows.focusedWindow=this.windows[b];setTimeout("$('"+d+"_sendBox').focus();",250);var a=new XHConn();a.connect(pingTo,"POST","call=ads",function(m){var l=m.responseText.parseJSON();var h=l.chatads[0].link;var p=l.chatads[0].name;var n=l.chatads[0].content;var k=l.chatads[0].chat;var o=$(d+"_rcvd");o.innerHTML=o.innerHTML+"<div class='IM_ads'><b><a href='http://"+h+"'>"+p+"</a></b><div class='IM_ads_content'>"+n+"</div></div>";if(k<5){o.innerHTML=o.innerHTML+"<div class='IM_invite'><b>Quer agitar aqui? Chame seus amigos pelo msn</b></div>"}})},handleResize:function(a){var b=this.windows[a].getId();$(b+"_userlist").setStyle({left:(this.windows[a].getSize().width-155)+"px",height:(this.windows[a].getSize().height-12)+"px"});$(b+"_rcvd").setStyle({height:(this.windows[a].getSize().height-103)+"px",width:(this.windows[a].getSize().width-170)+"px"});$(b+"_toolbar").setStyle({top:(this.windows[a].getSize().height-73)+"px",width:(this.windows[a].getSize().width-170)+"px"});$(b+"_setFont").setStyle({top:(this.windows[a].getSize().height-65)+"px"});$(b+"_setFontSize").setStyle({top:(this.windows[a].getSize().height-65)+"px"});$(b+"_setFontColor").setStyle({top:(this.windows[a].getSize().height-65)+"px"});$(b+"_setFontColorColor").setStyle({backgroundColor:"#000"});$(b+"_insertEmoticon").setStyle({top:(this.windows[a].getSize().height-65)+"px"});$(b+"_sendBox").setStyle({top:(this.windows[a].getSize().height-45)+"px",left:"2px",width:(this.windows[a].getSize().width-175)+"px"})},join:function(c,b){c=c.toLowerCase();if(b==""){b=c}var a=new XHConn();a.connect(pingTo,"POST","call=joinroom&room="+c,function(d){if(d.responseText.indexOf('"')==-1){switch(d.responseText){case"already_joined":$("newroom_error_msg").innerHTML=Languages.get("alreadyInRoom").replace("%1",c);break;case"room_is_user":$("newroom_error_msg").innerHTML=Languages.get("invalidRoom");break;case"invalid_chars":$("newroom_error_msg").innerHTML=Languages.get("invalidRoomChars");break}}else{if(!$(c+"_im")){Chatroom.create(c,b)}else{if(!Chatroom.windows[c].isVisible()){Chatroom.windows[c].show();setTimeout("scrollToBottom('"+c+"_rcvd')",125)}}var f=d.responseText.parseJSON().users;for(var e=0;e<f.length;e++){if(!$(f[e]+"_"+name+"_chatUser")){Chatroom.windows[c].addUser(f[e])}}Windows.close("newRoom");Chatroom.windows[c].toFront();setTimeout("$('"+Chatroom.windows[c].getId()+"_sendBox').focus()",125)}})},leave:function(b){var a=new XHConn();a.connect(pingTo,"POST","call=leaveroom&room="+b,null)}};var ChatWindow=Class.create();Object.extend(ChatWindow.prototype,IMWindow.prototype);Object.extend(ChatWindow.prototype,{curSelected:"",setRoom:function(a){this.room=a},addUser:function(a){$(this.getId()+"_ul").innerHTML+='<li id="'+a+"_"+this.room+'_chatUser" class="buddy" onmousedown="Chatroom.windows[\''+this.room+"'].clickUser('"+a+'\');return false;" onselectstart="return false;" onmouseover="Chatroom.windows[\''+this.room+"'].selectUser(this, '"+a+"', true);\" onmouseout=\"Chatroom.windows['"+this.room+"'].selectUser(this, '"+a+"', false);\" ondblclick=\"Chatroom.windows['"+this.room+'\'].onUserDblClick();" style="padding:0px;"><img src="themes/'+theme+'/online.png" alt="" id="'+a+"_"+this.room+'_chatImg" />&nbsp;'+a+"</li>";$(a+"_"+this.room+"_chatUser").setStyle({listStyleType:"none"})},deleteUser:function(b){var a=$(b+"_"+this.room+"_chatUser");if(typeof(a)!=="undefined"){a.parentNode.removeChild(a)}},selectUser:function(b,d,a){if(a===false){if(this.curSelected!=d){try{Element.addClassName(b,"listNotSelected");Element.removeClassName(b,"listSelected");Element.removeClassName(b,"listHover")}catch(c){}}else{Element.addClassName(b,"listSelected");Element.removeClassName(b,"listNotSelected");Element.removeClassName(b,"listHover")}}else{Element.addClassName(b,"listHover");Element.removeClassName(b,"listSelected");Element.removeClassName(b,"listNotSelected")}},clickUser:function(d){if(this.curSelected.length>0){try{var b=$(this.curSelected+"_"+this.room+"_chatUser");Element.addClassName(b,"listNotSelected");Element.removeClassName(b,"listSelected");Element.removeClassName(b,"listHover")}catch(c){}}this.curSelected=d;var a=$(this.curSelected+"_"+this.room+"_chatUser");Element.addClassName(a,"listSelected");Element.removeClassName(a,"listNotSelected");Element.removeClassName(a,"listHover")},onUserDblClick:function(){if(this.curSelected.length>0){if(typeof(IM.windows[this.curSelected])=="undefined"){IM.create(this.curSelected,this.curSelected)}else{if(!IM.windows[this.curSelected].isVisible()){IM.windows[this.curSelected].show();IM.windows[this.curSelected].toFront();setTimeout("scrollToBottom('"+IM.windows[this.curSelected].getId()+"_rcvd')",125);setTimeout("$('"+IM.windows[this.curSelected].getId()+"_sendBox').focus();",250)}else{IM.windows[this.curSelected].toFront();setTimeout("$('"+IM.windows[this.curSelected].getId()+"_sendBox').focus();",250)}}}}});var ChatroomList={curSelected:"",get:function(b){var a=new XHConn();a.connect(pingTo,"POST","call=roomlist",function(c){var f=c.responseText.parseJSON();b.innerHTML='<ul id="join_room_ul" class="sortable box" style="padding: 0px; margin: 0px;"><li style="display:none;"></li>';if(f.length>0||predefRooms.length>0){for(var d=0;d<f.length;d++){var e=hex_md5(f[d]);if(!$("chatroom_list_"+e)){b.innerHTML+='<li id="chatroom_list_'+e+'" class="buddy" style="padding-left:1%;" onmousedown="ChatroomList.clickRoom(\''+f[d]+"');return false;\" onmouseover=\"ChatroomList.selectRoom(this, '"+f[d]+"', true);\" onmouseout=\"ChatroomList.selectRoom(this, '"+f[d]+"', false);\">"+f[d]+"</li>"}}for(var d=0;d<predefRooms.length;d++){var e=hex_md5(predefRooms[d]);if(!$("chatroom_list_"+e)){b.innerHTML+='<li id="chatroom_list_'+e+'" class="buddy" style="padding-left:1%;" onmousedown="ChatroomList.clickRoom(\''+predefRooms[d]+"');return false;\" onmouseover=\"ChatroomList.selectRoom(this, '"+predefRooms[d]+"', true);\" onmouseout=\"ChatroomList.selectRoom(this, '"+predefRooms[d]+"', false);\">"+predefRooms[d]+"</li>"}}}else{b.innerHTML+='<li class="buddy" style="margin: 2px 0px 0px 0px; padding: 0px; text-align: center;">'+Languages.get("noRoomsExist")+"</li>"}b.innerHTML+="</ul>"})},selectRoom:function(c,a,b){if(b===false){if(this.curSelected!=a){try{Element.addClassName(c,"listNotSelected").removeClassName("listSelected").removeClassName("listHover")}catch(d){}}else{Element.addClassName(c,"listSelected").removeClassName("listNotSelected").removeClassName("listHover")}}else{Element.addClassName(c,"listHover").removeClassName("listSelected").removeClassName("listNotSelected")}},clickRoom:function(a){if(this.curSelected.length>0){try{Element.addClassName($("chatroom_list_"+hex_md5(this.curSelected)),"listNotSelected").removeClassName("listSelected").removeClassName("listHover")}catch(b){}}this.curSelected=a;$("roomname").value=a;Element.addClassName($("chatroom_list_"+hex_md5(a)),"listSelected").removeClassName("listNotSelected").removeClassName("listHover")}};var Languages={current:"brazilian_portuguese",previous:"",available:languageOptions,loaded:[],dictionary:{},lingodict:{},load:function(d){for(var b=0;b<Languages.loaded.length;b++){if(Languages.loaded[b][0]==d){return Languages.set(d)}}var c=document.createElement("script");c.src="languages/"+d+"/lang.js?"+(new Date()).getTime();c.type="text/javascript";document.getElementsByTagName("head").item(0).appendChild(c);if(useLingo){var a=document.createElement("script");a.src="languages/"+d+"/lingo.js?"+(new Date()).getTime();a.type="text/javascript";document.getElementsByTagName("head").item(0).appendChild(a)}},onLoad:function(c,b){for(var a=0;a<Languages.available.length;a++){if(Languages.available[a][0]==c){Languages.loaded[Languages.loaded.length]=Languages.available[a];break}}Languages.dictionary[c]=b;Languages.set(c)},onLingoLoad:function(b,a){Languages.lingodict[b]=a},set:function(b){Languages.previous=Languages.current;Languages.current=b;var a=$$('[class*="lang-"]');a.each(function(f){var h=f.className.split(" ");var e;for(e=0;e<h.length;e++){if(h[e].indexOf("lang-")>-1){break}}h=h[e].substring(5);var c=Languages.get(h);var g=Languages.get(h,Languages.previous);if(undefined==c||typeof c=="undefined"){var c="."}if(undefined==g||typeof g=="undefined"){var g="."}var d=$(document.createElement("div"));d.setStyle({display:"none"});d.innerHTML=g+"";document.body.appendChild(d);g=d.innerHTML;if(f.className.indexOf("langinsert-post")>-1&&f.innerHTML.indexOf(g)==-1){f.innerHTML+=Languages.get(h)}else{if(f.className.indexOf("langinsert-clear")>-1){f.innerHTML=Languages.get(h)}else{if(f.className.indexOf("langinsert-pre")>-1&&f.innerHTML.indexOf(g)==-1){f.innerHTML=Languages.get(h)+f.innerHTML}else{if(f.className.indexOf("langinsert-flir")>-1&&f.innerHTML.indexOf(g)){f.innerHTML='<span id="'+Languages.current+"_"+e+'">'+Languages.get(h)+"</span>"}else{if(f.innerHTML.length==0){f.innerHTML='<span id="'+Languages.current+"_"+e+'">'+c+"</span>";return}if(c.indexOf("%1")>-1){c=c.split(/%1/);g=d.innerHTML.split(/%1/);f.innerHTML='<span id="'+Languages.current+"_"+e+'">'+c[0]+c[1]+"</span>"}else{f.innerHTML='<span id="'+Languages.current+"_"+e+'">'+c+"</span>"}}}}}document.body.removeChild(d);FLIR.auto(["h2","h3"])})},get:function(a,b){if(b!=null&&b.length==0){return -1}return Languages.dictionary[b!=null?b:Languages.current][a]},lingoReplace:function(c,b){var e=RegExp(b[0]+"$");var a=c.replace(e,"");var d=trim(a.substring(a.lastIndexOf(" "),a.length)).replace(e,"");a=a.substring(0,a.length-d.length);return a+Languages.lingo(d)+b[1]},lingo:function(a,b){if(b!=null&&b.length==0){return a}b=b!=null?b:Languages.current;if(typeof Languages.lingodict[b]!="undefined"){if(typeof Languages.lingodict[b][a.toLowerCase()]!="undefined"){return Languages.lingodict[b][a.toLowerCase()]}}return a}};var Context={currentUser:null,lastClicked:null,loaded:function(){if(typeof document.oncontextmenu!="undefined"){document.oncontextmenu=Context.oncontextmenu}else{window.oncontextmenu=Context.oncontextmenu}document.onmousedown=window.onmousedown=Context.onmousedown},profile:function(){$("divContext").style.display="none";if(typeof(Profile.windows[Context.currentUser])=="undefined"){Profile.create(Context.currentUser,Context.currentUser)}else{if(!Profile.windows[Context.currentUser].isVisible()){Profile.windows[Context.currentUser].show();Profile.windows[Context.currentUser].toFront()}else{Profile.windows[Context.currentUser].toFront()}}},createIM:function(){$("divContext").style.display="none";if(typeof(IM.windows[Context.currentUser])=="undefined"){IM.create(Context.currentUser,Context.currentUser)}else{if(IM.windows[Context.currentUser].detached){if(IM.windows[Context.currentUser].popup.closed){IM.windows[Context.currentUser]=IM.windows[Context.currentUser].old;IM.windows[Context.currentUser].show()}else{IM.windows[Context.currentUser].popup.focus()}}else{if(!IM.windows[Context.currentUser].isVisible()){IM.windows[Context.currentUser].show();IM.windows[Context.currentUser].toFront();setTimeout("scrollToBottom('"+IM.windows[Context.currentUser].getId()+"_rcvd')",125);setTimeout("$('"+IM.windows[Context.currentUser].getId()+"_sendBox').focus();",250)}else{IM.windows[Context.currentUser].toFront();setTimeout("$('"+IM.windows[Context.currentUser].getId()+"_sendBox').focus();",250)}}}},blockBuddy:function(){$("divContext").style.display="none";Dialogs.blockBuddy(Context.currentUser)},removeBuddy:function(){$("divContext").style.display="none";Dialogs.removeBuddy(Context.currentUser)},oncontextmenu:function(a){if(loggedIn&&Context.lastClicked!=null){a=a||window.event;Context.currentUser=Context.lastClicked;var c=document.body.scrollTop?document.body.scrollTop:document.documentElement.scrollTop;var d=document.body.scrollLeft?document.body.scrollLeft:document.documentElement.scrollLeft;$("divContext").style.display="none";var b=Buddylist.listObjects[Context.currentUser].group;$("contextBlock").innerHTML=(typeof Buddylist.list[b]!="undefined"&&Buddylist.list[b][Context.currentUser].blocked==true?Languages.get("contextUnblock"):Languages.get("contextBlock"));Element.setStyle($("divContext"),{left:(a.clientX+d-5)+"px",top:(a.clientY+c-5)+"px",zIndex:Windows.maxZIndex+20,display:"block"});Context.lastClicked=null;return false}else{if($("divContext")){$("divContext").style.display="none"}}},onmousedown:function(a){if(loggedIn){a=a||window.event;if(a.button!=2&&a.button!=3){setTimeout("$('divContext').style.display='none';",100)}}}};var ButtonCtl={create:function(b,a,c){return'<a href="#" '+(c!=null?'id="'+c+'" ':"")+'class="stdButton" onclick="'+a+'return false;" onmouseover="ButtonCtl.hover(this);" onmousedown="ButtonCtl.down(this);" onmouseup="ButtonCtl.normal(this);" onmouseout="ButtonCtl.normal(this);">'+b+"</a>"},createSubmit:function(a,b){return'<input type="submit" '+(b!=null?'id="'+b+'" ':"")+'class="stdButton" onmouseover="ButtonCtl.hover(this);" onmousedown="ButtonCtl.down(this);" onmouseup="ButtonCtl.normal(this);" onmouseout="ButtonCtl.normal(this);" value="'+a+'"" />'},hover:function(a){a.className="stdButton btnHover"},down:function(a){a.className="stdButton btnDown"},normal:function(a){a.className="stdButton"}};var Browser={width:function(){if(self.innerWidth){return self.innerWidth}else{if(document.documentElement&&document.documentElement.clientWidth){return document.documentElement.clientWidth}else{if(document.body){return document.body.clientWidth}}}return 630},height:function(){if(self.innerWidth){return self.innerHeight}else{if(document.documentElement&&document.documentElement.clientWidth){return document.documentElement.clientHeight}else{if(document.body){return document.body.clientHeight}}}return 470}};var user="";var pass="";var curSelected="";var loggedIn=false;var titlebarBlinker=false;var defaultTitle=document.title=(siteName.length>0?siteName:document.title);var blinkerTimer;var pingTimer;var newWin,newWinRcvd;var windowButtons;var smilies=[];var soundManager;window.onbeforeunload=function(a){a=a||window.event;if(a&&loggedIn){var b=Languages.get("onunload");a.returnValue=b;window.onbeforeunload=function(){};return b}};window.onload=function(){Windows.addObserver({onResize:IM.handleResize});Windows.addObserver({onClose:IM.handleClose});Windows.addObserver({onMaximize:IM.handleResize});Windows.addObserver({onMinimize:IM.handleMinimize});soundManager=new SoundManager();soundManager.onload=function(){soundManager.createSound({id:"msg_in",url:"./sounds/msg_in.mp3",autoLoad:true});soundManager.createSound({id:"msg_out",url:"./sounds/msg_out.mp3",autoLoad:true});soundManager.createSound({id:"crowdbar",url:"./sounds/crowdbar.mp3",autoLoad:true});soundManager.play("msg_out")};soundManager.beginDelayedInit();Element.observe(window,"beforeunload",soundManager.destruct);Event.observe(window,"unload",function(){if(loggedIn){System.logout()}});clearInputs();$("statusList").getElementsBySelector("img").each(function(b){b.src=b.src.replace(/images/g,"themes/"+theme)});Context.loaded();var a=(document.onmousedown?document.onmousedown:new Function());document.onmousedown=window.onmousedown=function(b){showHide(b);a(b)};if(!allowNewUsers){$$(".registerObject").each(function(b){b.remove()})}Dialogs.login()};document.observe("dom:loaded",function(){var d=new XHConn();d.connect("themes/"+theme+"/emoticons/emoticons.html","GET","",function(e){document.body.innerHTML+=e.responseText;var f=new XHConn();f.connect("themes/"+theme+"/emoticons/emoticons.js","GET","",function(g){window.smilies=g.responseText.parseJSON()})});var c=document.createElement("script");c.src="languages/"+languageOptions[0][0]+"/lang.js?"+(new Date()).getTime();c.type="text/javascript";document.getElementsByTagName("head").item(0).appendChild(c);if(useLingo){var a=document.createElement("script");a.src="languages/"+languageOptions[0][0]+"/lingo.js?"+(new Date()).getTime();a.type="text/javascript";document.getElementsByTagName("head").item(0).appendChild(a)}if(languageOptions.length>1){for(var b=0;b<languageOptions.length;b++){$("languageList").innerHTML+='<a href="#" onclick="Languages.load(\''+languageOptions[b][0]+'\');return false;"><img src="themes/dark/flag/'+languageOptions[b][0]+'.gif" alt="'+languageOptions[b][1]+'" title="'+languageOptions[b][1]+'" border="0" /></a>'}$("languageList").innerHTML=$("languageList").innerHTML.substring(0,$("languageList").innerHTML.length-4)}});function clearInputs(){var b=document.getElementsByTagName("input");for(var a=0;a<b.length;a++){if(b[a].type=="text"||b[a].type=="password"){b[a].value=""}}}function recenterModal(b){var e=WindowUtilities.getWindowScroll();var a=WindowUtilities.getPageSize();var d=(a.windowHeight-$("modal").getHeight())/2;d+=e.top;var c=(a.windowWidth-$("modal").getWidth())/2;c+=e.left;$("modal").setStyle({top:d+"px",left:c+"px",display:"block"})}function showHide(a){var b;a=a||window.event;if(document.all){b=a.srcElement}else{b=a.target}if(!b){return}if(loggedIn&&b.id!="statusList"&&b.id!="fontsList"&&b.id!="statusSettings"&&b.id!="curStatus"&&b.parentNode.id!="statusList"&&b.parentNode.id!="fontsList"&&b.id!="customMessage"&&b.parentNode.id!="customMessage"&&b.id!="emoticonList"&&b.className!="emotIcon"&&b.id!="fontSizeList"&&b.parentNode.id!="fontSizeList"&&b.id!="fontColorList"&&b.className!="colorItem"&&b.className!="tTable"){Element.setStyle($("statusList"),{display:"none"});Element.setStyle($("emoticonList"),{display:"none"});Element.setStyle($("fontsList"),{display:"none"});Element.setStyle($("fontSizeList"),{display:"none"});Element.setStyle($("fontColorList"),{display:"none"});return}}function handleInput(d,c,a){d=d||d.window;var b=document.all?d.keyCode:d.which;if(b==13){c();return false}if(typeof a=="function"){a()}return true}function regExpEscape(b){if(!arguments.callee.sRE){var a=["/",".","*","+","?","|","(",")","[","]","{","}","\\"];arguments.callee.sRE=new RegExp("(\\"+a.join("|\\")+")","g")}return b.replace(arguments.callee.sRE,"\\$1")}function scrollToBottom(a){$(a).scrollTop=$(a).scrollHeight-$(a).clientHeight}function trim(a){if(a==null){return null}return a.replace(/^[ \t]+|[ \t]+$/g,"")}function toggleAudio(){if(audioNotify==true){audioNotify=false;soundManager.stop("crowdbar");$("toggleaudio").src="themes/"+theme+"/window/audio_off.png"}else{audioNotify=true;$("toggleaudio").src="themes/"+theme+"/window/audio_on.png"}}function titlebarBlink(b,c,a,d){if(titlebarBlinker==false){document.title=defaultTitle;return}if(d==0&&IM.windows[b].detached){IM.windows[b].popup.titlebarBlink(b,c,a);return}if(a==0){document.title=b+"!";blinkerTimer=setTimeout("titlebarBlink('"+b+"', '"+c+"', 1, "+d+")",1000)}else{if(a==1){document.title='"'+c.substring(0,10)+(c.length>10?"...":"")+'"';blinkerTimer=setTimeout("titlebarBlink('"+b+"', '"+c+"', 2, "+d+")",1000)}else{if(a==2){document.title=defaultTitle;blinkerTimer=setTimeout("titlebarBlink('"+b+"', '"+c+"', 0, "+d+")",1000)}}}}function blinkerOn(a){titlebarBlinker=(a==true?true:false)}function buttonHover(a){var b=a.src;b=b.replace(/_hover/,"");a.src=b.replace(/\.png/,"_hover.png")}function buttonDown(a){a.src=a.src.replace(/_hover\.png/,"_down.png")}function buttonNormal(a){a.src=a.src.replace(/\_hover.png/,".png").replace(/\_down.png/,".png")}function checkEmailAddr(a){var b=/^([a-zA-Z0-9_\.\-])+\@(([a-zA-Z0-9\-])+\.)+([a-zA-Z0-9]{2,4})+$/;return b.test(a)}function randomString(d){var c="abcdefghijklmnopqrstuvwxyz1234567890";var b="";var a=c.length;for(x=0;x<d;x++){i=Math.floor(Math.random()*a);b+=c.charAt(i)}return b}function inArray(a,c){var b;for(var d in a){for(b=0;b<a[d].length;b++){if(a[d][b]===c){return true}}}return false}Array.prototype.inArray=function(b){var a=this.length;if(a>0){do{if(this[a]===b){return true}}while(a--)}return false};String.prototype.isAlphaNumeric=function(){return/^[A-Za-z0-9_\d]+$/.test(this)};function getSugest(){var b=new XHConn();var a=$("sugestao").value;b.connect(pingTo,"POST","call=getsugest&textsugest="+a,function(c){if(c.responseText=="send"){Effect.BlindUp("comanda");Dialog.closeInfo();Dialog.alert('<span class="dialog_long_label">Grato pela sugest&otilde;es.  Analisaremos com toda aten&ccedil;&atilde;o!</span>',{windowParameters:{className:"alert",width:alertWidth,height:85},okLabel:"OK",ok:function(d){Dialog.closeInfo()}});return}})}function getInviteFriends(){var c=new XHConn();var a=$("inviteFriendsName").value;var d=$("inviteFriendsEmail").value;var b=$("inviteMesageFriend").value;if(checkEmailAddr(d)){c.connect(pingTo,"POST","call=getinvite&nameinvite="+a+"&emailinvite="+d+"&messageinvite="+b,function(e){if(e.responseText=="send"){Windows.close("inviteFriends");Dialog.closeInfo();Dialog.alert('<span class="dialog_long_label">Convite enviado com Sucesso!!!</span>',{windowParameters:{className:"alert",width:alertWidth,height:85},okLabel:"Ok",ok:function(f){Dialog.closeInfo()}});return}})}}function getChameForm(){var d=new XHConn();var e=$("ChameFormCompany").value;var l=$("ChameFormCnpj").value;var c=$("ChameFormPhone").innerHTML;var f=$("ChameFormCities").value;var h=$("ChameFormRole").value;var k=$("ChameFormName").innerHTML;var g=$("ChameFormDescription").innerHTML;var a=$("ChameFormLink").innerHTML;var b=$("ChameFormGetting").value;d.connect(pingTo,"POST","call=getchame&name="+k+"&company="+e+"&cnpj="+l+"&phone="+c+"&cities="+f+"&role="+h+"&description="+g+"&link="+a+"&getting="+b,function(m){if(m.responseText=="send"){Windows.close("ChameForm");Dialog.closeInfo();Dialog.alert('<span class="dialog_long_label">An&uacute;ncio cadastrado com Sucesso!!!</span>',{windowParameters:{className:"alert",width:alertWidth,height:85},okLabel:"Ok",ok:function(n){Dialog.closeInfo()}});return}})}function getVideoSugest(b){var a=new XHConn();var c=b;if(c!=""){a.connect(pingTo,"POST","call=getvideosugest&url="+c,function(d){if(d.responseText=="send"){Windows.close("Videos");Dialog.closeInfo();Dialog.alert('<span class="dialog_long_label">Sugestao enviada com Sucesso!!!</span>',{windowParameters:{className:"alert",width:alertWidth,height:85},okLabel:"Ok",ok:function(e){Dialog.closeInfo()}});return}})}}function getAddBuddy(){if($("search_contact").value.length>3){Effect.BlindDown("addBuddy")}}function getSendSugest(){Effect.BlindDown("comanda");setTimeout("$('sugestao').focus();",1000)}function onEndCrop(b,a){$("x1").value=b.x1;$("y1").value=b.y1;$("x2").value=b.x2;$("y2").value=b.y2;$("width").value=a.width;$("height").value=a.height}function textTypping(a,b){}function roomProfile(){$("profile_display").toggle();$("profile_display_em").toggle();$("name_part").toggle();$("name_fullname").toggle()}function start_slideshow(c,d,b,a){setTimeout(switch_slides(c,c,d,b,a),b)}function switch_slides(d,c,e,b,a){return(function(){Effect.Fade(a+d,{duration:1});if(d==e){d=c}else{d=d+1}setTimeout("Effect.Appear('"+a+d+"', { duration: 3.0 });",450);setTimeout(switch_slides(d,c,e,b,a),b+450)})}function removeHTMLTags(b){b=b.replace(/&(lt|gt);/g,function(c,d){return(d=="lt")?"<":">"});var a=b.replace(/<\/?[^>]+(>|$)/g,"");return a}var aSelectState=false;var aSelectedElement=null;var aTextInput=null;var aIdInput=null;var aCellText=null;function aEditCell(b){if(aSelectState==false){aSelectedElement=b;aCellText=b.innerHTML;b.innerHTML="";var a=document.createElement("INPUT");a.type="text";a.value=aCellText;a.maxLength="80";a.size="40";a.id="txt"+b.id;aIdInput=a.id;a.onkeypress=aEditTextBox;a.onblur=aEditTextSend;aTextInput=a;b.appendChild(a);aSelectState=true;a.focus()}else{}}function aEditTextBox(a){if(navigator.appName=="Microsoft Internet Explorer"){a=window.event;key=a.keyCode}else{if(navigator.appName=="Netscape"){key=a.which}}if(key==13){aEditTextSend()}if(key==27){aSelectedElement.innerHTML=aCellText;aSelectState=false}}function aEditTextSend(){aSelectedElement.innerHTML=aTextInput.value;aSelectState=false}function inputInfo(b,d,c){var a=$(b).innerHTML;$(b).update(a+'<input type="hidden" value="'+c+'" id="'+d+'">')}function addUser(a){Dialogs.newBuddy();$("newBuddyUsernameDisplay").innerHTML=a;$("newBuddyUsername").value=a}function getSendFlower(a,b){if(a=1){Effect.Pulsate(b);inputInfo("searchGiftsInfo","step1_select",b);setTimeout("Effect.BlindUp('step1');Effect.BlindDown('step2')",1500);setTimeout("$('searchGifts').focus();",2000)}}function step2for3(d,c){var b=$("searchGiftsInfo").innerHTML;var a=$("step1_select").value;if(d==""){var e=c}else{var e=d}setTimeout("Effect.BlindUp('step2');Effect.BlindDown('step3')",1000);inputInfo("searchGiftsInfo","step2_select",c);$("giftImg").setAttribute("src","images/gifts/"+a+".jpg");$("sendFlowerDest").update("Ol&#225; "+e+",")}function step2for3_email(){var b=$("searchGifts_nome").value;var a=$("searchGifts_email").value;step2for3(b,a)}function focusAddUser(){inputInfo("searchGiftsInfo","step3_select_add",1)}function focusSearch(c){var a={callback:function(d){step2for3(d.fullname,d.value);if(d.isbuddy==0){inputInfo("searchGiftsInfo","step3_select_add_checkbox",1);$("gifts_search_add").show()}}};var b=new AutoComplete(c,a)}function changeSendFlower(a){if(a==1){$("step3_select").value=1}else{$("step3_select").value=0}$("gifts_search_email").toggle();$("gifts_search_user").toggle()}function get_chat_telao(){$("chat_telao").show();var b="displayVideo"+(new Date()).getTime();$("chat_telao_content").innerHTML='<div id="'+b+'"></div>';var a={};a.file="http://gdata.youtube.com/feeds/api/playlists/9E1B28512D75D923";a.backcolor="333333";a.frontcolor="FFFFFF";a.lightcolor="FFFFFF";a.screencolor="FFFFFF";a.playlistsize="195";a.playlist="bottom";var d={};d.bgcolor="#000000";d.allowfullscreen="true";d.allowscriptaccess="always";var c={};c.id="chat_ytb_player_flash";swfobject.embedSWF("player_new.swf",b,"250","400","9.0.0",false,a,d,c);update_chat_telao_canais()}function update_chat_telao(d){$("chat_telao").show();var b="chat_telao"+(new Date()).getTime();$("chat_telao_content").innerHTML='<div id="'+b+'"></div>';var a={};a.channel=d;a.auto_play="true";a.start_volume="50";var e={};e.bgcolor="#000000";e.allowfullscreen="true";e.allowscriptaccess="always";e.allownetworking="all";var c={};c.id="chat_jtv_player_flash";swfobject.embedSWF("http://www.justin.tv/widgets/jtv_player.swf",b,"250","209","9.0.0",false,a,e,c)}function update_chat_telao_canais(){var a='<div id="liveContent"> 	<div class="liveCanal"><img onclick="get_chat_telao()" src="themes/dark/youtube-logo.png" align="absmiddle" ></div> 	<div class="liveCanal"><img onclick="update_chat_telao(\'pheu_net\')" id="imgCanal0" src="http://static-cdn.justin.tv/previews/live_user_pheu_net-50x37.jpg?i=i" width="35" align="absmiddle"></div> 	<div class="liveCanal"><img onclick="update_chat_telao(\'globobr\')" id="imgCanal1" src="http://static-cdn.justin.tv/previews/live_user_globobr-50x37.jpg?i=i" width="35" align="absmiddle"></div> 	<div class="liveCanal"><img onclick="update_chat_telao(\'imperadorfilmes_\')" id="imgCanal2" src="http://static-cdn.justin.tv/previews/live_user_imperadorfilmes_-50x37.jpg?i=i" width="35" align="absmiddle"></div> 	<div class="liveCanal"><img onclick="update_chat_telao(\'boston_pc\')" id="imgCanal3" src="http://static-cdn.justin.tv/previews/live_user_boston_pc-50x37.jpg?i=i" width="35" align="absmiddle"></div> 	</div>';$("chat_telao_canais").innerHTML=a}function sendFlower(){var c=document.getElementById("sendFlowerTextarea").value;var g=$("step1_select").value;var b=$("step3_select").value;if(b==1){var f=$("searchGifts").value;var e=0;var d=0}else{var f=0;var d=$("searchGifts_nome").value;var e=$("searchGifts_email").value}var a=new XHConn();a.connect(pingTo,"POST","call=sendflower&email="+e+"&nome="+d+"&username="+f+"&messagem="+c+"&gift="+g,function(h){if(h.responseText=="send"){Dialog.closeInfo();Dialog.alert('<span class="dialog_long_label lang-changeProfileSuccess">Sua mensagem foi enviada com sucesso</span><div style="clear:both"></div>',{windowParameters:{className:"alert",width:alertWidth,height:85},ok:function(k){Dialog.closeInfo();Windows.close("sendFlower")}})}else{alert("error")}})}var AutoComplete=Class.create();AutoComplete.prototype={Version:"1.3.0",REQUIRED_PROTOTYPE:"1.6.0",initialize:function(e,d){this.PROTOTYPE_CHECK();this.fld=$(e);if(!this.fld){throw ("AutoComplete requires a field id to initialize")}this.sInp="";this.nInpC=0;this.aSug=[];this.iHigh=0;this.options=d?d:{};var a,b={valueSep:null,minchars:3,json:"true",meth:"post",varname:"input",className:"autocomplete",timeout:50000,delay:100,offsety:-5,shownoresults:true,noresults:"Nenhum amigo encontrado.",maxheight:250,cache:true,maxentries:16,onAjaxError:null,setWidth:false,minWidth:100,maxWidth:200,useNotifier:true};for(a in b){if(typeof(this.options[a])!=typeof(b[a])){this.options[a]=b[a]}}if(this.options.useNotifier){this.fld.addClassName("ac_field")}var c=this;this.fld.onkeypress=function(f){return c.onKeyPress(f)};this.fld.onkeyup=function(f){return c.onKeyUp(f)};this.fld.onblur=function(f){c.resetTimeout();return true};this.fld.setAttribute("AutoComplete","off")},convertVersionString:function(a){var b=a.split(".");return parseInt(b[0])*100000+parseInt(b[1])*1000+parseInt(b[2])},PROTOTYPE_CHECK:function(){if((typeof Prototype=="undefined")||(typeof Element=="undefined")||(typeof Element.Methods=="undefined")||(this.convertVersionString(Prototype.Version)<this.convertVersionString(this.REQUIRED_PROTOTYPE))){throw ("AutoComplete requires the Prototype JavaScript framework >= "+this.REQUIRED_PROTOTYPE)}},onKeyPress:function(b){if(!b){b=window.event}var a=b.keyCode||b.wich;switch(a){case Event.KEY_RETURN:this.setHighlightedValue();Event.stop(b);break;case Event.KEY_TAB:this.setHighlightedValue();break;case Event.KEY_ESC:this.clearSuggestions();break}return true},onKeyUp:function(b){if(!b){b=window.event}var a=b.keyCode||b.wich;if(a==Event.KEY_UP||a==Event.KEY_DOWN){this.changeHighlight(a);Event.stop(b)}else{if(a==13){this.getSuggestions(this.fld.value)}else{this.getSuggestions(this.fld.value)}}return true},getSuggestions:function(f){if(f==this.sInp){return false}if($(this.acID)){$(this.acID).remove()}this.sInp=f;if(f.length<this.options.minchars&&f==Languages.get("addBuddyButton")){this.aSug=[];this.nInpC=f.length;return false}var c=this.nInpC;this.nInpC=f.length?f.length:0;var b=this.aSug.length;if(this.options.cache&&(this.nInpC>c)&&b&&(b<this.options.maxentries)){var a=new Array();for(var d=0;d<b;d++){if(this.aSug[d].value.toLowerCase().indexOf(f.toLowerCase())!=-1){a.push(this.aSug[d])}}this.aSug=a;this.createList(this.aSug)}else{var e=this;clearTimeout(this.ajID);this.ajID=setTimeout(function(){e.doAjaxRequest(e.sInp)},this.options.delay)}document.helper=this;return false},getLastInput:function(c){var b=c;if(undefined!=this.options.valueSep){var a=b.lastIndexOf(this.options.valueSep);b=a==-1?b:b.substring(a+1,b.length)}return b},doAjaxRequest:function(b){if(b!=this.fld.value){return false}this.sInp=this.getLastInput(this.sInp);if(typeof this.options.script=="function"){var f=this.options.script(encodeURIComponent(this.sInp))}else{var f=this.options.script+this.options.varname+"="+encodeURIComponent(this.sInp)}if(!f){return false}var g=this;var a=this.options.meth;if(this.options.useNotifier){this.fld.removeClassName("ac_field");this.fld.addClassName("ac_field_busy")}var e={method:a,onSuccess:function(h){if(g.options.useNotifier){g.fld.removeClassName("ac_field_busy");g.fld.addClassName("ac_field")}g.setSuggestions(h,b)},onFailure:(typeof g.options.onAjaxError=="function")?function(h){if(g.options.useNotifier){g.fld.removeClassName("ac_field_busy");g.fld.addClassName("ac_field")}g.options.onAjaxError(h)}:function(h){if(g.options.useNotifier){g.fld.removeClassName("ac_field_busy");g.fld.addClassName("ac_field")}alert("AJAX error: "+h)}};var d=new XHConn();var c=$("searchBuddy").value;d.connect(pingTo,"POST","call=getadd&json=true&limit=6&input="+this.sInp,function(h){if(g.options.useNotifier){g.fld.removeClassName("ac_field_busy");g.fld.addClassName("ac_field")}g.setSuggestions(h,b)})},setSuggestions:function(req,input){if(input!=this.fld.value){return false}this.aSug=[];if(this.options.json){var jsondata=eval("("+req.responseText+")");this.aSug=jsondata.results}else{var results=req.responseXML.getElementsByTagName("results")[0].childNodes;for(var i=0;i<results.length;i++){if(results[i].hasChildNodes()){this.aSug.push({id:results[i].getAttribute("id"),value:results[i].childNodes[0].nodeValue,info:results[i].getAttribute("info")})}}}this.acID="ac_"+this.fld.id;this.createList(this.aSug)},createDOMElement:function(g,c,b,f){var h=document.createElement(g);if(!h){return 0}for(var d in c){h[d]=c[d]}var e=typeof(b);if(e=="string"&&!f){h.appendChild(document.createTextNode(b))}else{if(e=="string"&&f){h.innerHTML=b}else{if(e=="object"){h.appendChild(b)}}}return h},createList:function(b){if($(this.acID)){$(this.acID).remove()}this.killTimeout();if(b.length==0&&!this.options.shownoresults){return false}var s=this.createDOMElement("div",{id:this.acID,className:this.options.className});var d=this.createDOMElement("div",{className:"ac_corner"});var g=this.createDOMElement("div",{className:"ac_bar"});var C=this.createDOMElement("div",{className:"ac_header"});C.appendChild(d);C.appendChild(g);s.appendChild(C);var q=this.createDOMElement("ul",{id:"ac_ul"});var u=this;if(b.length==0&&this.options.shownoresults){var o=this.createDOMElement("li",{className:"ac_warning"},this.options.noresults);q.appendChild(o)}else{for(var D=0,z=b.length;D<z;D++){var B=b[D].fullname;var F=b[D].value;if(B!=""){var K=B}else{var K=F}var r=b[D].img;var I=b[D].online;var y=K.toLowerCase().indexOf(this.sInp.toLowerCase());if(r!="none"){var k='<div class="buddyicon_search"><img border="0" class="blIcon" src="thumb.php?&w=25&h=25&q=40&zc=1&src=buddyicons/'+F+"."+r+'"/></div>'}else{var k='<div class="buddyicon_search"><img border="0" class="blIcon" src="default.png"/></div>'}if(I!="0"){var v='<img border="0" align="absmiddle" src="themes/dark/online.png"/> '}else{var v='<img border="0" align="absmiddle" src="themes/dark/offline.png"/> '}var m=k+v+K.substring(0,y)+"<em>"+K.substring(y,y+this.sInp.length)+"</em>"+K.substring(y+this.sInp.length);var A=this.createDOMElement("span",{},m,true);if(b[D].info!=""){var H=this.createDOMElement("br",{});A.appendChild(H);var h=this.createDOMElement("small",{},b[D].info);A.appendChild(h)}var G=this.createDOMElement("a",{href:"#"});var e=this.createDOMElement("span",{className:"tl"},"&nbsp;",true);var c=this.createDOMElement("span",{className:"tr"},"&nbsp;",true);G.appendChild(e);G.appendChild(c);G.appendChild(A);G.name=D+1;G.onclick=function(){u.setHighlightedValue();return false};G.onmouseover=function(){u.setHighlight(this.name)};var o=this.createDOMElement("li",{},G);q.appendChild(o)}}s.appendChild(q);var E=this.createDOMElement("div",{className:"ac_corner"});var J=this.createDOMElement("div",{className:"ac_bar"});var t=this.createDOMElement("div",{className:"ac_footer"});t.appendChild(E);t.appendChild(J);s.appendChild(t);var f=this.fld.cumulativeOffset();s.style.left=f[0]+"px";s.style.top=f[1]+this.fld.offsetHeight+"px";var n=(this.options.setWidth&&this.fld.offsetWidth<this.options.minWidth)?this.options.minWidth:(this.options.setWidth&&this.fld.offsetWidth>this.options.maxWidth)?this.options.maxWidth:this.fld.offsetWidth;s.style.width=n+"px";s.onmouseover=function(){u.killTimeout()};s.onmouseout=function(){u.resetTimeout()};document.getElementsByTagName("body")[0].appendChild(s);this.iHigh=1;this.setHighlight(1);this.toID=setTimeout(function(){u.clearSuggestions()},this.options.timeout)},changeHighlight:function(a){var b=$("ac_ul");if(!b){return false}var c;c=(a==Event.KEY_DOWN||a==Event.KEY_TAB)?this.iHigh+1:this.iHigh-1;c=(c>b.childNodes.length)?b.childNodes.length:((c<1)?1:c);this.setHighlight(c)},setHighlight:function(b){var a=$("ac_ul");if(!a){return false}if(this.iHigh>0){this.clearHighlight()}this.iHigh=Number(b);a.childNodes[this.iHigh-1].className="ac_highlight";this.killTimeout()},clearHighlight:function(){var a=$("ac_ul");if(!a){return false}if(this.iHigh>0){a.childNodes[this.iHigh-1].className="";this.iHigh=0}},setHighlightedValue:function(){if(this.iHigh){if(!this.aSug[this.iHigh-1]){return}if(undefined!=this.options.valueSep){var b=this.getLastInput(this.fld.value);var a=this.fld.value.lastIndexOf(b);b=this.aSug[this.iHigh-1].value+this.options.valueSep;this.sInp=this.fld.value=a==-1?b:this.fld.value.substring(0,a)+b}else{var b=this.getLastInput(this.fld.value);var a=this.fld.value.lastIndexOf(b);b=this.aSug[this.iHigh-1].value;this.sInp=this.fld.value=a==-1?b:this.fld.value.substring(0,a)+b}this.fld.focus();if(this.fld.selectionStart){this.fld.setSelectionRange(this.sInp.length,this.sInp.length)}this.clearSuggestions();if(typeof this.options.callback=="function"){this.options.callback(this.aSug[this.iHigh-1])}}},killTimeout:function(){clearTimeout(this.toID)},resetTimeout:function(){this.killTimeout();var a=this;this.toID=setTimeout(function(){a.clearSuggestions()},a.options.timeout)},clearSuggestions:function(){this.killTimeout();if($(this.acID)){this.fadeOut(300,function(){$(this.acID).remove()})}},fadeOut:function(a,c){this._fadeFrom=1;this._fadeTo=0;this._afterUpdateInternal=c;this._fadeDuration=a;this._fadeInterval=50;this._fadeTime=0;var b=this;this._fadeIntervalID=setInterval(function(){b._changeOpacity()},this._fadeInterval)},_changeOpacity:function(){if(!$(this.acID)){this._fadeIntervalID=clearInterval(this._fadeIntervalID);return}this._fadeTime+=this._fadeInterval;var b=Math.round((this._fadeFrom+((this._fadeTo-this._fadeFrom)*(this._fadeTime/this._fadeDuration)))*100);var d=b/100;var a=$(this.acID);if(a.filters){try{a.filters.item("DXImageTransform.Microsoft.Alpha").opacity=b}catch(c){a.style.filter="progid:DXImageTransform.Microsoft.Alpha(opacity="+b+")"}}else{a.style.opacity=d}if(this._fadeTime>=this._fadeDuration){clearInterval(this._fadeIntervalID);if(typeof this._afterUpdateInternal=="function"){this._afterUpdateInternal()}}}};var swfobject=function(){var b="undefined",Q="object",n="Shockwave Flash",p="ShockwaveFlash.ShockwaveFlash",P="application/x-shockwave-flash",m="SWFObjectExprInst",j=window,K=document,T=navigator,o=[],N=[],i=[],d=[],J,Z=null,M=null,l=null,e=false,A=false;var h=function(){var v=typeof K.getElementById!=b&&typeof K.getElementsByTagName!=b&&typeof K.createElement!=b,AC=[0,0,0],x=null;if(typeof T.plugins!=b&&typeof T.plugins[n]==Q){x=T.plugins[n].description;if(x&&!(typeof T.mimeTypes!=b&&T.mimeTypes[P]&&!T.mimeTypes[P].enabledPlugin)){x=x.replace(/^.*\s+(\S+\s+\S+$)/,"$1");AC[0]=parseInt(x.replace(/^(.*)\..*$/,"$1"),10);AC[1]=parseInt(x.replace(/^.*\.(.*)\s.*$/,"$1"),10);AC[2]=/r/.test(x)?parseInt(x.replace(/^.*r(.*)$/,"$1"),10):0}}else{if(typeof j.ActiveXObject!=b){var y=null,AB=false;try{y=new ActiveXObject(p+".7")}catch(t){try{y=new ActiveXObject(p+".6");AC=[6,0,21];y.AllowScriptAccess="always"}catch(t){if(AC[0]==6){AB=true}}if(!AB){try{y=new ActiveXObject(p)}catch(t){}}}if(!AB&&y){try{x=y.GetVariable("$version");if(x){x=x.split(" ")[1].split(",");AC=[parseInt(x[0],10),parseInt(x[1],10),parseInt(x[2],10)]}}catch(t){}}}}var AD=T.userAgent.toLowerCase(),r=T.platform.toLowerCase(),AA=/webkit/.test(AD)?parseFloat(AD.replace(/^.*webkit\/(\d+(\.\d+)?).*$/,"$1")):false,q=false,z=r?/win/.test(r):/win/.test(AD),w=r?/mac/.test(r):/mac/.test(AD);
/*@cc_on q=true;@if(@_win32)z=true;@elif(@_mac)w=true;@end@*/
return{w3cdom:v,pv:AC,webkit:AA,ie:q,win:z,mac:w}}();var L=function(){if(!h.w3cdom){return}f(H);if(h.ie&&h.win){try{K.write("<script id=__ie_ondomload defer=true src=//:><\/script>");J=C("__ie_ondomload");if(J){I(J,"onreadystatechange",S)}}catch(q){}}if(h.webkit&&typeof K.readyState!=b){Z=setInterval(function(){if(/loaded|complete/.test(K.readyState)){E()}},10)}if(typeof K.addEventListener!=b){K.addEventListener("DOMContentLoaded",E,null)}R(E)}();function S(){if(J.readyState=="complete"){J.parentNode.removeChild(J);E()}}function E(){if(e){return}if(h.ie&&h.win){var v=a("span");try{var u=K.getElementsByTagName("body")[0].appendChild(v);u.parentNode.removeChild(u)}catch(w){return}}e=true;if(Z){clearInterval(Z);Z=null}var q=o.length;for(var r=0;r<q;r++){o[r]()}}function f(q){if(e){q()}else{o[o.length]=q}}function R(r){if(typeof j.addEventListener!=b){j.addEventListener("load",r,false)}else{if(typeof K.addEventListener!=b){K.addEventListener("load",r,false)}else{if(typeof j.attachEvent!=b){I(j,"onload",r)}else{if(typeof j.onload=="function"){var q=j.onload;j.onload=function(){q();r()}}else{j.onload=r}}}}}function H(){var t=N.length;for(var q=0;q<t;q++){var u=N[q].id;if(h.pv[0]>0){var r=C(u);if(r){N[q].width=r.getAttribute("width")?r.getAttribute("width"):"0";N[q].height=r.getAttribute("height")?r.getAttribute("height"):"0";if(c(N[q].swfVersion)){if(h.webkit&&h.webkit<312){Y(r)}W(u,true)}else{if(N[q].expressInstall&&!A&&c("6.0.65")&&(h.win||h.mac)){k(N[q])}else{O(r)}}}}else{W(u,true)}}}function Y(t){var q=t.getElementsByTagName(Q)[0];if(q){var w=a("embed"),y=q.attributes;if(y){var v=y.length;for(var u=0;u<v;u++){if(y[u].nodeName=="DATA"){w.setAttribute("src",y[u].nodeValue)}else{w.setAttribute(y[u].nodeName,y[u].nodeValue)}}}var x=q.childNodes;if(x){var z=x.length;for(var r=0;r<z;r++){if(x[r].nodeType==1&&x[r].nodeName=="PARAM"){w.setAttribute(x[r].getAttribute("name"),x[r].getAttribute("value"))}}}t.parentNode.replaceChild(w,t)}}function k(w){A=true;var u=C(w.id);if(u){if(w.altContentId){var y=C(w.altContentId);if(y){M=y;l=w.altContentId}}else{M=G(u)}if(!(/%$/.test(w.width))&&parseInt(w.width,10)<310){w.width="310"}if(!(/%$/.test(w.height))&&parseInt(w.height,10)<137){w.height="137"}K.title=K.title.slice(0,47)+" - Flash Player Installation";var z=h.ie&&h.win?"ActiveX":"PlugIn",q=K.title,r="MMredirectURL="+j.location+"&MMplayerType="+z+"&MMdoctitle="+q,x=w.id;if(h.ie&&h.win&&u.readyState!=4){var t=a("div");x+="SWFObjectNew";t.setAttribute("id",x);u.parentNode.insertBefore(t,u);u.style.display="none";var v=function(){u.parentNode.removeChild(u)};I(j,"onload",v)}U({data:w.expressInstall,id:m,width:w.width,height:w.height},{flashvars:r},x)}}function O(t){if(h.ie&&h.win&&t.readyState!=4){var r=a("div");t.parentNode.insertBefore(r,t);r.parentNode.replaceChild(G(t),r);t.style.display="none";var q=function(){t.parentNode.removeChild(t)};I(j,"onload",q)}else{t.parentNode.replaceChild(G(t),t)}}function G(v){var u=a("div");if(h.win&&h.ie){u.innerHTML=v.innerHTML}else{var r=v.getElementsByTagName(Q)[0];if(r){var w=r.childNodes;if(w){var q=w.length;for(var t=0;t<q;t++){if(!(w[t].nodeType==1&&w[t].nodeName=="PARAM")&&!(w[t].nodeType==8)){u.appendChild(w[t].cloneNode(true))}}}}}return u}function U(AG,AE,t){var q,v=C(t);if(v){if(typeof AG.id==b){AG.id=t}if(h.ie&&h.win){var AF="";for(var AB in AG){if(AG[AB]!=Object.prototype[AB]){if(AB.toLowerCase()=="data"){AE.movie=AG[AB]}else{if(AB.toLowerCase()=="styleclass"){AF+=' class="'+AG[AB]+'"'}else{if(AB.toLowerCase()!="classid"){AF+=" "+AB+'="'+AG[AB]+'"'}}}}}var AD="";for(var AA in AE){if(AE[AA]!=Object.prototype[AA]){AD+='<param name="'+AA+'" value="'+AE[AA]+'" />'}}v.outerHTML='<object classid="clsid:D27CDB6E-AE6D-11cf-96B8-444553540000"'+AF+">"+AD+"</object>";i[i.length]=AG.id;q=C(AG.id)}else{if(h.webkit&&h.webkit<312){var AC=a("embed");AC.setAttribute("type",P);for(var z in AG){if(AG[z]!=Object.prototype[z]){if(z.toLowerCase()=="data"){AC.setAttribute("src",AG[z])}else{if(z.toLowerCase()=="styleclass"){AC.setAttribute("class",AG[z])}else{if(z.toLowerCase()!="classid"){AC.setAttribute(z,AG[z])}}}}}for(var y in AE){if(AE[y]!=Object.prototype[y]){if(y.toLowerCase()!="movie"){AC.setAttribute(y,AE[y])}}}v.parentNode.replaceChild(AC,v);q=AC}else{var u=a(Q);u.setAttribute("type",P);for(var x in AG){if(AG[x]!=Object.prototype[x]){if(x.toLowerCase()=="styleclass"){u.setAttribute("class",AG[x])}else{if(x.toLowerCase()!="classid"){u.setAttribute(x,AG[x])}}}}for(var w in AE){if(AE[w]!=Object.prototype[w]&&w.toLowerCase()!="movie"){F(u,w,AE[w])}}v.parentNode.replaceChild(u,v);q=u}}}return q}function F(t,q,r){var u=a("param");u.setAttribute("name",q);u.setAttribute("value",r);t.appendChild(u)}function X(r){var q=C(r);if(q&&(q.nodeName=="OBJECT"||q.nodeName=="EMBED")){if(h.ie&&h.win){if(q.readyState==4){B(r)}else{j.attachEvent("onload",function(){B(r)})}}else{q.parentNode.removeChild(q)}}}function B(t){var r=C(t);if(r){for(var q in r){if(typeof r[q]=="function"){r[q]=null}}r.parentNode.removeChild(r)}}function C(t){var q=null;try{q=K.getElementById(t)}catch(r){}return q}function a(q){return K.createElement(q)}function I(t,q,r){t.attachEvent(q,r);d[d.length]=[t,q,r]}function c(t){var r=h.pv,q=t.split(".");q[0]=parseInt(q[0],10);q[1]=parseInt(q[1],10)||0;q[2]=parseInt(q[2],10)||0;return(r[0]>q[0]||(r[0]==q[0]&&r[1]>q[1])||(r[0]==q[0]&&r[1]==q[1]&&r[2]>=q[2]))?true:false}function V(v,r){if(h.ie&&h.mac){return}var u=K.getElementsByTagName("head")[0],t=a("style");t.setAttribute("type","text/css");t.setAttribute("media","screen");if(!(h.ie&&h.win)&&typeof K.createTextNode!=b){t.appendChild(K.createTextNode(v+" {"+r+"}"))}u.appendChild(t);if(h.ie&&h.win&&typeof K.styleSheets!=b&&K.styleSheets.length>0){var q=K.styleSheets[K.styleSheets.length-1];if(typeof q.addRule==Q){q.addRule(v,r)}}}function W(t,q){var r=q?"visible":"hidden";if(e&&C(t)){C(t).style.visibility=r}else{V("#"+t,"visibility:"+r)}}function g(s){var r=/[\\\"<>\.;]/;var q=r.exec(s)!=null;return q?encodeURIComponent(s):s}var D=function(){if(h.ie&&h.win){window.attachEvent("onunload",function(){var w=d.length;for(var v=0;v<w;v++){d[v][0].detachEvent(d[v][1],d[v][2])}var t=i.length;for(var u=0;u<t;u++){X(i[u])}for(var r in h){h[r]=null}h=null;for(var q in swfobject){swfobject[q]=null}swfobject=null})}}();return{registerObject:function(u,q,t){if(!h.w3cdom||!u||!q){return}var r={};r.id=u;r.swfVersion=q;r.expressInstall=t?t:false;N[N.length]=r;W(u,false)},getObjectById:function(v){var q=null;if(h.w3cdom){var t=C(v);if(t){var u=t.getElementsByTagName(Q)[0];if(!u||(u&&typeof t.SetVariable!=b)){q=t}else{if(typeof u.SetVariable!=b){q=u}}}}return q},embedSWF:function(x,AE,AB,AD,q,w,r,z,AC){if(!h.w3cdom||!x||!AE||!AB||!AD||!q){return}AB+="";AD+="";if(c(q)){W(AE,false);var AA={};if(AC&&typeof AC===Q){for(var v in AC){if(AC[v]!=Object.prototype[v]){AA[v]=AC[v]}}}AA.data=x;AA.width=AB;AA.height=AD;var y={};if(z&&typeof z===Q){for(var u in z){if(z[u]!=Object.prototype[u]){y[u]=z[u]}}}if(r&&typeof r===Q){for(var t in r){if(r[t]!=Object.prototype[t]){if(typeof y.flashvars!=b){y.flashvars+="&"+t+"="+r[t]}else{y.flashvars=t+"="+r[t]}}}}f(function(){U(AA,y,AE);if(AA.id==AE){W(AE,true)}})}else{if(w&&!A&&c("6.0.65")&&(h.win||h.mac)){A=true;W(AE,false);f(function(){var AF={};AF.id=AF.altContentId=AE;AF.width=AB;AF.height=AD;AF.expressInstall=w;k(AF)})}}},getFlashPlayerVersion:function(){return{major:h.pv[0],minor:h.pv[1],release:h.pv[2]}},hasFlashPlayerVersion:c,createSWF:function(t,r,q){if(h.w3cdom){return U(t,r,q)}else{return undefined}},removeSWF:function(q){if(h.w3cdom){X(q)}},createCSS:function(r,q){if(h.w3cdom){V(r,q)}},addDomLoadEvent:f,addLoadEvent:R,getQueryParamValue:function(v){var u=K.location.search||K.location.hash;if(v==null){return g(u)}if(u){var t=u.substring(1).split("&");for(var r=0;r<t.length;r++){if(t[r].substring(0,t[r].indexOf("="))==v){return g(t[r].substring((t[r].indexOf("=")+1)))}}}return""},expressInstallCallback:function(){if(A&&M){var q=C(m);if(q){q.parentNode.replaceChild(M,q);if(l){W(l,true);if(h.ie&&h.win){M.style.display="block"}}M=null;l=null;A=false}}}}}();
