eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('c=J(1H,3v,3w,3x){o.2W=17;o.2l=17;o.2X=17;o.4b=17;o.4N=17;o.26=17;o.3w=3w||17;o.3x=3x||17;o.3y=1a;o.2Y=1a;o.2E=7z;o.2F=7A;o.4c=c.1n["7B"];o.4O=c.1n["7C"];o.2a=1l;o.2m=1l;o.1H=1s 1H=="67"?1H:c.7D;o.4P=1a;o.3v=3v;o.2b=17;o.4Q=1a;o.68=1l;o.4R=2;o.69=1l;o.20=17;o.1D=17;o.1t=17;o.2u=17;o.4S=17;o.2Z=17;o.4d=17;o.2c=17;o.4e=17;o.2d=17;o.4f=17;o.33=1a;v(1s c.4g=="1I"){v(1s c.4T=="1I")c.4T=3;q 1N=1g 34();1h(q i=8;i>0;){1N[--i]=c.4U[i].2n(0,c.4T)}c.4g=1N;v(1s c.4V=="1I")c.4V=3;1N=1g 34();1h(q i=12;i>0;){1N[--i]=c.35[i].2n(0,c.4V)}c.4h=1N}};c.1Q=17;c.1E=(/6a/i.1R(3z.3A)&&!/6b/i.1R(3z.3A));c.4W=(c.1E&&/6a 5\\.0/i.1R(3z.3A));c.6c=/6b/i.1R(3z.3A);c.4i=/7E|7F|7G/i.1R(3z.3A);c.2G=J(D){q 4X=0,4Y=0;q 4Z=/^1k$/i.1R(D.6d);v(4Z&&D.3B)4X=D.3B;v(4Z&&D.3C)4Y=D.3C;q r={x:D.3D-4X,y:D.51-4Y};v(D.6e){q 1F=o.2G(D.6e);r.x+=1F.x;r.y+=1F.y}Q r};c.52=J(D,3E){q 2v=3E.7H;v(!2v){q 2w=3E.2w;v(2w=="4j"){2v=3E.7I}O v(2w=="6f"){2v=3E.7J}}3F(2v){v(2v==D){Q 1l}2v=2v.1G}Q 1a};c.1i=J(D,14){v(!(D&&D.14)){Q}q 4k=D.14.6g(" ");q 1N=1g 34();1h(q i=4k.1o;i>0;){v(4k[--i]!=14){1N[1N.1o]=4k[i]}}D.14=1N.7K(" ")};c.1S=J(D,14){c.1i(D,14);D.14+=" "+14};c.2H=J(N){q f=c.1E?1p.21.6h:N.7L;3F(f.6i!=1||/^1k$/i.1R(f.6d))f=f.1G;Q f};c.3G=J(N){q f=c.1E?1p.21.6h:N.1T;3F(f.6i!=1)f=f.1G;Q f};c.2e=J(N){N||(N=1p.21);v(c.1E){N.7M=1l;N.7N=1a}O{N.7O();N.7P()}Q 1a};c.1J=J(D,2x,2I){v(D.6j){D.6j("3H"+2x,2I)}O v(D.6k){D.6k(2x,2I,1l)}O{D["3H"+2x]=2I}};c.2o=J(D,2x,2I){v(D.6l){D.6l("3H"+2x,2I)}O v(D.6m){D.6m(2x,2I,1l)}O{D["3H"+2x]=17}};c.1e=J(2w,2J){q D=17;v(1c.6n){D=1c.6n("6o://7Q.7R.7S/7T/7U",2w)}O{D=1c.1e(2w)}v(1s 2J!="1I"){2J.2K(D)}Q D};c.36=J(D){3a(c){1J(D,"4j",6p);1J(D,"4l",6q);1J(D,"6f",6r);v(1E){1J(D,"7V",6s);D.7W("6t",1l)}}};c.53=J(D){v(1s D.1z!="1I"){Q D}O v(1s D.1G.1z!="1I"){Q D.1G}Q 17};c.54=J(D){v(1s D.19!="1I"){Q D}O v(1s D.1G.19!="1I"){Q D.1G}Q 17};c.6u=J(){q E=c.1Q;v(!E){Q 1a}q E=E;q 1K=E.2W;q 55=E.2Z;v(E.2c){c.1i(E.2c,"1u")}v(E.4e){c.1i(E.4e,"2y")}q 1A=E.2Z.3I("1k")[E.F.1q()];c.1S(1A,"2y");E.4e=1A;q s=55.1m;s.1U="3J";v(1K.1f<0)s.2L=1K.3D+"2f";O{q 4m=55.22;v(1s 4m=="1I")4m=50;s.2L=(1K.3D+1K.22-4m)+"2f"}s.3K=(1K.51+1K.2p)+"2f"};c.56=J(57){q E=c.1Q;v(!E){Q 1a}q E=E;q 1K=E.2W;q 4n=E.4d;v(E.2d){c.1i(E.2d,"1u")}v(E.4f){c.1i(E.4f,"2y")}E.4f=17;q Y=E.F.1v()+(57?1:-1);q 2g=4n.3L;q 3M=1a;1h(q i=12;i>0;--i){v(Y>=E.2E&&Y<=E.2F){2g.1j=Y;2g.19=Y;2g.1m.1U="3J";3M=1l}O{2g.1m.1U="2M"}2g=2g.3b;Y+=57?E.4R:-E.4R}v(3M){q s=4n.1m;s.1U="3J";v(1K.1f<0)s.2L=1K.3D+"2f";O{q 4o=4n.22;v(1s 4o=="1I")4o=50;s.2L=(1K.3D+1K.22-4o)+"2f"}s.3K=(1K.51+1K.2p)+"2f"}};c.4p=J(N){q E=c.1Q;v(!E){Q 1a}v(E.26){58(E.26)}q D=E.2W;v(!D){Q 1a}q 1T=c.3G(N);N||(N=1p.21);c.1i(D,"2y");v(1T==D||1T.1G==D){c.2h(D,N)}q 1A=c.53(1T);q F=17;v(1A){F=1g 16(E.F);v(1A.1z!=F.1q()){F.2i(1A.1z);E.1r(F);E.33=1a;E.3N()}}O{q 19=c.54(1T);v(19){F=1g 16(E.F);v(19.19!=F.1v()){F.25(19.19);E.1r(F);E.33=1a;E.3N()}}}3a(c){2o(1c,"4q",4p);2o(1c,"4j",3O);2o(1c,"3P",3O);E.6v();1Q=17;Q 2e(N)}};c.3O=J(N){q E=c.1Q;v(!E){Q}q D=E.2W;q 1T=c.3G(N);v(1T==D||1T.1G==D){c.1S(D,"1u 2y");c.1S(D.1G,"3Q")}O{v(1s D.1f=="1I"||(D.1f!=50&&(D.1f==0||2N.6w(D.1f)>2)))c.1i(D,"2y");c.1i(D,"1u");c.1i(D.1G,"3Q")}N||(N=1p.21);v(D.1f==50&&1T!=D){q 3c=c.2G(D);q w=D.22;q x=N.4r;q 3d;q 5a=1l;v(x>3c.x+w){3d=x-3c.x-w;5a=1a}O 3d=3c.x-x;v(3d<0)3d=0;q 1O=D.3e;q 4s=D.6x;q 6y=2N.4t(3d/10)%1O.1o;1h(q i=1O.1o;--i>=0;)v(1O[i]==4s)18;3F(6y-->0)v(5a){v(--i<0)i=1O.1o-1}O v(++i>=1O.1o)i=0;q 4u=1O[i];D.1j=4u;E.4v()}q 1A=c.53(1T);v(1A){v(1A.1z!=E.F.1q()){v(E.2c){c.1i(E.2c,"1u")}c.1S(1A,"1u");E.2c=1A}O v(E.2c){c.1i(E.2c,"1u")}}O{v(E.2c){c.1i(E.2c,"1u")}q 19=c.54(1T);v(19){v(19.19!=E.F.1v()){v(E.2d){c.1i(E.2d,"1u")}c.1S(19,"1u");E.2d=19}O v(E.2d){c.1i(E.2d,"1u")}}O v(E.2d){c.1i(E.2d,"1u")}}Q c.2e(N)};c.6z=J(N){v(c.3G(N)==c.2H(N)){Q c.2e(N)}};c.5b=J(N){q E=c.1Q;v(!(E&&E.3y)){Q 1a}q 2z;q 2A;v(c.1E){2A=1p.21.5c+1c.2q.3C;2z=1p.21.4r+1c.2q.3B}O{2z=N.7X;2A=N.7Y}E.3f();q 3g=E.1t.1m;3g.2L=(2z-E.6A)+"2f";3g.3K=(2A-E.6B)+"2f";Q c.2e(N)};c.5d=J(N){q E=c.1Q;v(!E){Q 1a}E.3y=1a;3a(c){2o(1c,"3P",5b);2o(1c,"4q",5d);4p(N)}E.3f()};c.6q=J(N){q D=c.2H(N);v(D.1V){Q 1a}q E=D.1x;E.2W=D;c.1Q=E;v(D.1f!=4w)3a(c){v(D.1f==50){D.6x=D.1j;1J(1c,"3P",3O)}O 1J(1c,c.4W?"3P":"4j",3O);1S(D,"1u 2y");1J(1c,"4q",4p)}O v(E.2a){E.6C(N)}v(D.1f==-1||D.1f==1){v(E.26)58(E.26);E.26=5e("c.6u()",6D)}O v(D.1f==-2||D.1f==2){v(E.26)58(E.26);E.26=5e((D.1f>0)?"c.56(1l)":"c.56(1a)",6D)}O{E.26=17}Q c.2e(N)};c.6s=J(N){c.2h(c.2H(N),N||1p.21);v(c.1E){1c.7Z.80()}};c.6p=J(N){q D=c.2H(N);v(c.52(D,N)||c.1Q||D.1V){Q 1a}v(D.1w){v(D.1w.2n(0,1)=="6E"){D.1w=D.3R.3S(D.1x.4O)+D.1w.2n(1)}D.1x.5f.1j=D.1w}v(D.1f!=4w){c.1S(D,"1u");v(D.3R){c.1S(D.1G,"3Q")}}Q c.2e(N)};c.6r=J(N){3a(c){q D=2H(N);v(52(D,N)||1Q||D.1V)Q 1a;1i(D,"1u");v(D.3R)1i(D.1G,"3Q");v(D.1x)D.1x.5f.1j=1n["6F"];Q 2e(N)}};c.2h=J(D,N){q E=D.1x;q 3T=1a;q 3U=1a;q F=17;v(1s D.1f=="1I"){v(E.2l){c.1i(E.2l,"3h");c.1S(D,"3h");3T=(E.2l==D);v(!3T){E.2l=D}}E.F.5g(D.3R);F=E.F;q 5h=!(E.33=!D.4x);v(!5h&&!E.2l)E.6G(1g 16(F));O 3U=!D.1V;v(5h)E.3i(E.1H,F)}O{v(D.1f==6H){c.1i(D,"1u");E.3V();Q}F=1g 16(E.F);v(D.1f==0)F.5g(1g 16());E.33=1a;q 19=F.1v();q 1A=F.1q();J 2i(m){q 3W=F.1B();q 5i=F.5j(m);v(3W>5i){F.1r(5i)}F.2i(m)};2O(D.1f){X 5k:c.1i(D,"1u");q 2B=c.1n["81"];v(1s 2B!="1I"){2B+=E.4Q?c.1n["82"]:""}O{2B="83 5l 84 1W 2B 85 86 87 6I o 6J.\\n"+"88 5m 89 o 6J 5l 5m 8a 8b 8c 8d\\n"+"6K 8e 8f 6L \\"8g\\" 8h 5n 5o 1x-8i.8j\\n"+"5l 8k 6M 8l 5n <8m@8n.6N> 5n 8o 6M 6I 6K 8p  ;-)\\n\\n"+"8q 5m!\\n"+"6o://8r.6N/8s/1x.8t\\n"}8u(2B);Q;X-2:v(19>E.2E){F.25(19-1)}18;X-1:v(1A>0){2i(1A-1)}O v(19-->E.2E){F.25(19);2i(11)}18;X 1:v(1A<11){2i(1A+1)}O v(19<E.2F){F.25(19+1);2i(0)}18;X 2:v(19<E.2F){F.25(19+1)}18;X 2C:E.6O(D.3X);Q;X 50:q 1O=D.3e;q 4s=D.1j;1h(q i=1O.1o;--i>=0;)v(1O[i]==4s)18;v(N&&N.8v){v(--i<0)i=1O.1o-1}O v(++i>=1O.1o)i=0;q 4u=1O[i];D.1j=4u;E.4v();Q;X 0:v((1s E.2X=="J")&&E.2X(F,F.1v(),F.1q(),F.1B())){Q 1a}18}v(!F.5p(E.F)){E.1r(F);3U=1l}O v(D.1f==0)3U=3T=1l}v(3U){N&&E.3N()}v(3T){c.1i(D,"1u");N&&E.3V()}};c.1b.8w=J(5q){q 2J=17;v(!5q){2J=1c.3I("2q")[0];o.2a=1l}O{2J=5q;o.2a=1a}o.F=o.3v?1g 16(o.3v):1g 16();q 1D=c.1e("1D");o.1D=1D;1D.8x=0;1D.8y=0;1D.1x=o;c.1J(1D,"4l",c.6z);q 1k=c.1e("1k");o.1t=1k;1k.14="1x";v(o.2a){1k.1m.6P="6Q";1k.1m.1U="2M"}1k.2K(1D);q 3Y=c.1e("3Y",1D);q G=17;q 1d=17;q E=o;q 2j=J(2B,6R,1f){G=c.1e("2r",1d);G.4y=6R;G.14="8z";v(1f!=0&&2N.6w(1f)<=2)G.14+=" 8A";c.36(G);G.1x=E;G.1f=1f;G.1j="<1k 6t=\'3H\'>"+2B+"</1k>";Q G};1d=c.1e("2P",3Y);q 4z=6;(o.2a)&&--4z;(o.2m)&&++4z;2j("?",1,5k).1w=c.1n["8B"];o.2Q=2j("",4z,4w);o.2Q.14="2Q";v(o.2a){o.2Q.1w=c.1n["6S"];o.2Q.1m.6T="6U";2j("&#8C;",1,6H).1w=c.1n["8D"]}1d=c.1e("2P",3Y);1d.14="8E";o.5r=2j("&#8F;",1,-2);o.5r.1w=c.1n["8G"];o.5s=2j("&#8H;",1,-1);o.5s.1w=c.1n["8I"];o.5t=2j(c.1n["8J"],o.2m?4:3,0);o.5t.1w=c.1n["8K"];o.5u=2j("&#8L;",1,1);o.5u.1w=c.1n["8M"];o.5v=2j("&#8N;",1,2);o.5v.1w=c.1n["8O"];1d=c.1e("2P",3Y);1d.14="8P";v(o.2m){G=c.1e("2r",1d);G.14="6V 3j";G.1j=c.1n["8Q"]}1h(q i=7;i>0;--i){G=c.1e("2r",1d);v(!i){G.1f=2C;G.1x=o;c.36(G)}}o.4S=(o.2m)?1d.3L.3b:1d.3L;o.5w();q 2u=c.1e("2u",1D);o.2u=2u;1h(i=6;i>0;--i){1d=c.1e("2P",2u);v(o.2m){G=c.1e("2r",1d)}1h(q j=7;j>0;--j){G=c.1e("2r",1d);G.1x=o;c.36(G)}}v(o.4Q){1d=c.1e("2P",2u);1d.14="3k";G=c.1e("2r",1d);G.14="3k";G.4y=2;G.1j=c.1n["8R"]||"&5x;";G=c.1e("2r",1d);G.14="3k";G.4y=o.2m?4:3;(J(){J 4A(14,6W,4B,5y){q 1X=c.1e("3Z",G);1X.14=14;1X.1j=6W;1X.1x=E;1X.1w=c.1n["8S"];1X.1f=50;1X.3e=[];v(1s 4B!="67")1X.3e=4B;O{1h(q i=4B;i<=5y;++i){q 4C;v(i<10&&5y>=10)4C=\'0\'+i;O 4C=\'\'+i;1X.3e[1X.3e.1o]=4C}}c.36(1X);Q 1X};q 1Y=E.F.3l();q 3m=E.F.3n();q 2R=!E.68;q 1C=(1Y>12);v(2R&&1C)1Y-=12;q H=4A("8T",1Y,2R?1:0,2R?12:23);q 3Z=c.1e("3Z",G);3Z.1j=":";3Z.14="8U";q M=4A("8V",3m,0,59);q 41=17;G=c.1e("2r",1d);G.14="3k";G.4y=2;v(2R)41=4A("8W",1C?"1C":"3o",["3o","1C"]);O G.1j="&5x;";E.5z=J(){q 1C,1Y=o.F.3l(),3m=o.F.3n();v(2R){1C=(1Y>=12);v(1C)1Y-=12;v(1Y==0)1Y=12;41.1j=1C?"1C":"3o"}H.1j=(1Y<10)?("0"+1Y):1Y;M.1j=(3m<10)?("0"+3m):3m};E.4v=J(){q F=o.F;q h=1Z(H.1j,10);v(2R){v(/1C/i.1R(41.1j)&&h<12)h+=12;O v(/3o/i.1R(41.1j)&&h==12)h=0}q d=F.1B();q m=F.1q();q y=F.1v();F.8X(h);F.8Y(1Z(M.1j,10));F.25(y);F.2i(m);F.1r(d);o.33=1a;o.3N()}})()}O{o.5z=o.4v=J(){}}q 5A=c.1e("5A",1D);1d=c.1e("2P",5A);1d.14="8Z";G=2j(c.1n["6F"],o.2m?8:7,4w);G.14="1w";v(o.2a){G.1w=c.1n["6S"];G.1m.6T="6U"}o.5f=G;1k=c.1e("1k",o.1t);o.2Z=1k;1k.14="6X";1h(i=0;i<c.35.1o;++i){q 42=c.1e("1k");42.14=c.1E?"4D-6Y":"4D";42.1z=i;42.1j=c.4h[i];1k.2K(42)}1k=c.1e("1k",o.1t);o.4d=1k;1k.14="6X";1h(i=12;i>0;--i){q 2g=c.1e("1k");2g.14=c.1E?"4D-6Y":"4D";1k.2K(2g)}o.3i(o.1H,o.F);2J.2K(o.1t)};c.43=J(N){q E=1p.3p;v(!E||E.20)Q 1a;(c.1E)&&(N=1p.21);q 2D=(c.1E||N.2w=="5B"),K=N.90;v(N.91){2O(K){X 37:2D&&c.2h(E.5s);18;X 38:2D&&c.2h(E.5r);18;X 39:2D&&c.2h(E.5u);18;X 40:2D&&c.2h(E.5v);18;6Z:Q 1a}}O 2O(K){X 32:c.2h(E.5t);18;X 27:2D&&E.3V();18;X 37:X 38:X 39:X 40:v(2D){q 5C,x,y,2s,D,4E;5C=K==37||K==38;4E=(K==37||K==39)?1:7;J 4F(){D=E.2l;q p=D.3c;x=p&15;y=p>>4;2s=E.2b[y][x]};4F();J 5D(){q F=1g 16(E.F);F.1r(F.1B()-4E);E.1r(F)};J 5E(){q F=1g 16(E.F);F.1r(F.1B()+4E);E.1r(F)};3F(1){2O(K){X 37:v(--x>=0)2s=E.2b[y][x];O{x=6;K=38;44}18;X 38:v(--y>=0)2s=E.2b[y][x];O{5D();4F()}18;X 39:v(++x<7)2s=E.2b[y][x];O{x=0;K=40;44}18;X 40:v(++y<E.2b.1o)2s=E.2b[y][x];O{5E();4F()}18}18}v(2s){v(!2s.1V)c.2h(2s);O v(5C)5D();O 5E()}}18;X 13:v(2D)c.2h(E.2l,N);18;6Z:Q 1a}Q c.2e(N)};c.1b.3i=J(1H,F){q 1P=1g 16(),70=1P.1v(),71=1P.1q(),72=1P.1B();o.1D.1m.2S="2Y";q 19=F.1v();v(19<o.2E){19=o.2E;F.25(19)}O v(19>o.2F){19=o.2F;F.25(19)}o.1H=1H;o.F=1g 16(F);q 1z=F.1q();q 73=F.1B();q 92=F.5j();F.1r(1);q 4G=(F.4H()-o.1H)%7;v(4G<0)4G+=7;F.1r(-4G);F.1r(F.1B()+1);q 1d=o.2u.3L;q 93=c.4h[1z];q 2b=o.2b=1g 34();q 3q=c.1n["74"];q 5F=o.20?(o.5G={}):17;1h(q i=0;i<6;++i,1d=1d.3b){q G=1d.3L;v(o.2m){G.14="3W 3j";G.1j=F.5H();G=G.3b}1d.14="94";q 5I=1a,2t,75=2b[i]=[];1h(q j=0;j<7;++j,G=G.3b,F.1r(2t+1)){2t=F.1B();q 76=F.4H();G.14="3W";G.3c=i<<4|j;75[j]=G;q 5J=(F.1q()==1z);v(!5J){v(o.4P){G.14+=" 95";G.4x=1l}O{G.14="96";G.1j="&5x;";G.1V=1l;44}}O{G.4x=1a;5I=1l}G.1V=1a;G.1j=o.4N?o.4N(F,2t):2t;v(5F)5F[F.3S("%Y%m%d")]=G;v(o.2X){q 4I=o.2X(F,19,1z,2t);v(o.4b){q 5K=o.4b(F,19,1z,2t);v(5K)G.2Q=5K}v(4I===1l){G.14+=" 1V";G.1V=1l}O{v(/1V/i.1R(4I))G.1V=1l;G.14+=" "+4I}}v(!G.1V){G.3R=1g 16(F);G.1w="6E";v(!o.20&&5J&&2t==73&&o.69){G.14+=" 3h";o.2l=G}v(F.1v()==70&&F.1q()==71&&2t==72){G.14+=" 1P";G.1w+=c.1n["97"]}v(3q.77(76.78())!=-1)G.14+=G.4x?" 98":" 3q"}}v(!(5I||o.4P))1d.14="99"}o.2Q.1j=c.35[1z]+", "+19;o.5z();o.1D.1m.2S="9a";o.79()};c.1b.79=J(){v(o.20){1h(q i 6L o.20){q G=o.5G[i];q d=o.20[i];v(!d)44;v(G)G.14+=" 3h"}}};c.1b.6G=J(F){v(o.20){q 45=F.3S("%Y%m%d");q G=o.5G[45];v(G){q d=o.20[45];v(!d){c.1S(G,"3h");o.20[45]=F}O{c.1i(G,"3h");9b o.20[45]}}}};c.1b.9c=J(4J){o.4b=4J};c.1b.1r=J(F){v(!F.5p(o.F)){o.3i(o.1H,F)}};c.1b.9d=J(){o.3i(o.1H,o.F)};c.1b.6O=J(1H){o.3i(1H,o.F);o.5w()};c.1b.9e=c.1b.9f=J(4J){o.2X=4J};c.1b.9g=J(a,z){o.2E=a;o.2F=z};c.1b.3N=J(){v(o.3w){o.3w(o,o.F.3S(o.4c))}};c.1b.3V=J(){v(o.3x){o.3x(o)}o.3f()};c.1b.9h=J(){q D=o.1t.1G;D.5L(o.1t);c.1Q=17;1p.3p=17};c.1b.9i=J(7a){q D=o.1t;D.1G.5L(D);7a.2K(D)};c.5M=J(N){q 1x=1p.3p;v(!1x){Q 1a}q D=c.1E?c.2H(N):c.3G(N);1h(;D!=17&&D!=1x.1t;D=D.1G);v(D==17){1p.3p.3V();Q c.2e(N)}};c.1b.3M=J(){q 5N=o.1D.3I("2P");1h(q i=5N.1o;i>0;){q 1d=5N[--i];c.1i(1d,"3Q");q 5O=1d.3I("2r");1h(q j=5O.1o;j>0;){q G=5O[--j];c.1i(G,"1u");c.1i(G,"2y")}}o.1t.1m.1U="3J";o.2Y=1a;v(o.2a){1p.3p=o;c.1J(1c,"7b",c.43);c.1J(1c,"5B",c.43);c.1J(1c,"4l",c.5M)}o.3f()};c.1b.9j=J(){v(o.2a){c.2o(1c,"7b",c.43);c.2o(1c,"5B",c.43);c.2o(1c,"4l",c.5M)}o.1t.1m.1U="2M";o.2Y=1l;o.3f()};c.1b.5P=J(x,y){q s=o.1t.1m;s.2L=x+"2f";s.3K=y+"2f";o.3M()};c.1b.9k=J(D,3r){q 3s=o;q p=c.2G(D);v(!3r||1s 3r!="9l"){o.5P(p.x,p.y+D.2p);Q 1l}J 7c(1W){v(1W.x<0)1W.x=0;v(1W.y<0)1W.y=0;q 46=1c.1e("1k");q s=46.1m;s.6P="6Q";s.9m=s.9n=s.5Q=s.5R="9o";1c.2q.2K(46);q 2T=c.2G(46);1c.2q.5L(46);v(c.1E){2T.y+=1c.2q.3C;2T.x+=1c.2q.3B}O{2T.y+=1p.7d;2T.x+=1p.7e}q 1F=1W.x+1W.5Q-2T.x;v(1F>0)1W.x-=1F;1F=1W.y+1W.5R-2T.y;v(1F>0)1W.y-=1F};o.1t.1m.1U="3J";c.5S=J(){q w=3s.1t.22;q h=3s.1t.2p;3s.1t.1m.1U="2M";q 7f=3r.2n(0,1);q 5T="l";v(3r.1o>1){5T=3r.2n(1,1)}2O(7f){X"T":p.y-=h;18;X"B":p.y+=D.2p;18;X"C":p.y+=(D.2p-h)/2;18;X"t":p.y+=D.2p-h;18;X"b":18}2O(5T){X"L":p.x-=w;18;X"R":p.x+=D.22;18;X"C":p.x+=(D.22-w)/2;18;X"l":p.x+=D.22-w;18;X"r":18}p.5Q=w;p.5R=h+40;3s.2Z.1m.1U="2M";7c(p);3s.5P(p.x,p.y)};v(c.4i)5e("c.5S()",10);O c.5S()};c.1b.9p=J(1L){o.4c=1L};c.1b.9q=J(1L){o.4O=1L};c.1b.5U=J(1L,3t){v(!3t)3t=o.4c;o.1r(16.5U(1L,3t))};c.1b.3f=J(){v(!c.1E&&!c.6c)Q;J 5V(47){q 2U=47.1m.2S;v(!2U){v(1c.5W&&1s(1c.5W.7g)=="J"){v(!c.4i)2U=1c.5W.7g(47,"").9r("2S");O 2U=\'\'}O v(47.7h){2U=47.7h.2S}O 2U=\'\'}Q 2U};q 5X=1g 34("9s","9t","9u");q D=o.1t;q p=c.2G(D);q 5Y=p.x;q 7i=D.22+5Y;q 5Z=p.y;q 7j=D.2p+5Z;1h(q k=5X.1o;k>0;){q 1N=1c.3I(5X[--k]);q 1M=17;1h(q i=1N.1o;i>0;){1M=1N[--i];p=c.2G(1M);q 61=p.x;q 7k=1M.22+61;q 62=p.y;q 7l=1M.2p+62;v(o.2Y||(61>7i)||(7k<5Y)||(62>7j)||(7l<5Z)){v(!1M.48){1M.48=5V(1M)}1M.1m.2S=1M.48}O{v(!1M.48){1M.48=5V(1M)}1M.1m.2S="2Y"}}}};c.1b.5w=J(){q 3X=o.1H;q G=o.4S;q 3q=c.1n["74"];1h(q i=0;i<7;++i){G.14="3W 6V";q 4K=(i+3X)%7;v(i){G.1w=c.1n["9v"].63("%s",c.4U[4K]);G.1f=2C;G.1x=o;G.3X=4K;c.36(G)}v(3q.77(4K.78())!=-1){c.1S(G,"3q")}G.1j=c.4g[(i+3X)%7];G=G.3b}};c.1b.6v=J(){o.2Z.1m.1U="2M";o.4d.1m.1U="2M"};c.1b.6C=J(N){v(o.3y){Q}o.3y=1l;q 2z;q 2A;v(c.1E){2A=1p.21.5c+1c.2q.3C;2z=1p.21.4r+1c.2q.3B}O{2A=N.5c+1p.7d;2z=N.4r+1p.7e}q 3g=o.1t.1m;o.6A=2z-1Z(3g.2L);o.6B=2A-1Z(3g.3K);3a(c){1J(1c,"3P",5b);1J(1c,"4q",5d)}};16.7m=1g 34(31,28,31,30,31,30,31,31,30,31,30,31);16.7n=7o;16.7p=60*16.7n;16.7q=60*16.7p;16.64=24*16.7q;16.9w=7*16.64;16.5U=J(1L,3t){q 1P=1g 16();q y=0;q m=-1;q d=0;q a=1L.6g(/\\W+/);q b=3t.5o(/%./g);q i=0,j=0;q 1y=0;q 2k=0;1h(i=0;i<a.1o;++i){v(!a[i])44;2O(b[i]){X"%d":X"%e":d=1Z(a[i],10);18;X"%m":m=1Z(a[i],10)-1;18;X"%Y":X"%y":y=1Z(a[i],10);(y<2C)&&(y+=(y>29)?7r:7s);18;X"%b":X"%B":1h(j=0;j<12;++j){v(c.35[j].2n(0,a[i].1o).4L()==a[i].4L()){m=j;18}}18;X"%H":X"%I":X"%k":X"%l":1y=1Z(a[i],10);18;X"%P":X"%p":v(/1C/i.1R(a[i])&&1y<12)1y+=12;O v(/3o/i.1R(a[i])&&1y>=12)1y-=12;18;X"%M":2k=1Z(a[i],10);18}}v(49(y))y=1P.1v();v(49(m))m=1P.1q();v(49(d))d=1P.1B();v(49(1y))1y=1P.3l();v(49(2k))2k=1P.3n();v(y!=0&&m!=-1&&d!=0)Q 1g 16(y,m,d,1y,2k,0);y=0;m=-1;d=0;1h(i=0;i<a.1o;++i){v(a[i].9x(/[a-9y-Z]+/)!=-1){q t=-1;1h(j=0;j<12;++j){v(c.35[j].2n(0,a[i].1o).4L()==a[i].4L()){t=j;18}}v(t!=-1){v(m!=-1){d=m+1}m=t}}O v(1Z(a[i],10)<=12&&m==-1){m=a[i]-1}O v(1Z(a[i],10)>31&&y==0){y=1Z(a[i],10);(y<2C)&&(y+=(y>29)?7r:7s)}O v(d==0){d=a[i]}}v(y==0)y=1P.1v();v(m!=-1&&d!=0)Q 1g 16(y,m,d,1y,2k,0);Q 1P};16.1b.5j=J(1z){q 19=o.1v();v(1s 1z=="1I"){1z=o.1q()}v(((0==(19%4))&&((0!=(19%2C))||(0==(19%5k))))&&1z==1){Q 29}O{Q 16.7m[1z]}};16.1b.7t=J(){q 7u=1g 16(o.1v(),o.1q(),o.1B(),0,0,0);q 7v=1g 16(o.1v(),0,0,0,0,0);q 3k=7u-7v;Q 2N.4t(3k/16.64)};16.1b.5H=J(){q d=1g 16(o.1v(),o.1q(),o.1B(),0,0,0);q 7w=d.4H();d.1r(d.1B()-(7w+6)%7+3);q 7x=d.7y();d.2i(0);d.1r(4);Q 2N.9z((7x-d.7y())/(7*9A))+1};16.1b.5p=J(F){Q((o.1v()==F.1v())&&(o.1q()==F.1q())&&(o.1B()==F.1B())&&(o.3l()==F.3l())&&(o.3n()==F.3n()))};16.1b.5g=J(F){q 1F=1g 16(F);o.1r(1);o.25(1F.1v());o.2i(1F.1q());o.1r(1F.1B())};16.1b.3S=J(1L){q m=o.1q();q d=o.1B();q y=o.1v();q 3j=o.5H();q w=o.4H();q s={};q 1y=o.3l();q 1C=(1y>=12);q 2V=(1C)?(1y-12):1y;q 3u=o.7t();v(2V==0)2V=12;q 2k=o.3n();q 4M=o.9B();s["%a"]=c.4g[w];s["%A"]=c.4U[w];s["%b"]=c.4h[m];s["%B"]=c.35[m];s["%C"]=1+2N.4t(y/2C);s["%d"]=(d<10)?("0"+d):d;s["%e"]=d;s["%H"]=(1y<10)?("0"+1y):1y;s["%I"]=(2V<10)?("0"+2V):2V;s["%j"]=(3u<2C)?((3u<10)?("9C"+3u):("0"+3u)):3u;s["%k"]=1y;s["%l"]=2V;s["%m"]=(m<9)?("0"+(1+m)):(1+m);s["%M"]=(2k<10)?("0"+2k):2k;s["%n"]="\\n";s["%p"]=1C?"9D":"9E";s["%P"]=1C?"1C":"3o";s["%s"]=2N.4t(o.9F()/7o);s["%S"]=(4M<10)?("0"+4M):4M;s["%t"]="\\t";s["%U"]=s["%W"]=s["%V"]=(3j<10)?("0"+3j):3j;s["%u"]=w+1;s["%w"]=w;s["%y"]=(\'\'+y).2n(2,2);s["%Y"]=y;s["%%"]="%";q 4a=/%./g;v(!c.4W&&!c.4i)Q 1L.63(4a,J(65){Q s[65]||65});q a=1L.5o(4a);1h(q i=0;i<a.1o;i++){q 1F=s[a[i]];v(1F){4a=1g 9G(a[i],\'g\');1L=1L.63(4a,1F)}}Q 1L};16.1b.66=16.1b.25;16.1b.25=J(y){q d=1g 16(o);d.66(y);v(d.1q()!=o.1q())o.1r(28);o.66(y)};1p.3p=17;',62,601,'||||||||||||Calendar||||||||||||this||var|||||if||||||||el|cal|date|cell|||function||||ev|else||return|||||||case|||||||className||Date|null|break|year|false|prototype|document|row|createElement|navtype|new|for|removeClass|innerHTML|div|true|style|_TT|length|window|getMonth|setDate|typeof|element|hilite|getFullYear|ttip|calendar|hr|month|mon|getDate|pm|table|is_ie|tmp|parentNode|firstDayOfWeek|undefined|addEvent|cd|str|cc|ar|range|today|_C|test|addClass|target|display|disabled|box|part|hrs|parseInt|multiple|event|offsetWidth|||setFullYear|timeout||||isPopup|ar_days|hilitedMonth|hilitedYear|stopEvent|px|yr|cellClick|setMonth|hh|min|currentDateEl|weekNumbers|substr|removeEvent|offsetHeight|body|td|ne|iday|tbody|related|type|evname|active|posX|posY|text|100|act|minYear|maxYear|getAbsolutePos|getElement|func|parent|appendChild|left|none|Math|switch|tr|title|t12|visibility|br|value|ir|activeDiv|getDateStatus|hidden|monthsCombo||||dateClicked|Array|_MN|_add_evs||||with|nextSibling|pos|dx|_range|hideShowCovered|st|selected|_init|wn|time|getHours|mins|getMinutes|am|_dynarch_popupCalendar|weekend|opts|self|fmt|dy|dateStr|onSelected|onClose|dragging|navigator|userAgent|scrollLeft|scrollTop|offsetLeft|evt|while|getTargetElement|on|getElementsByTagName|block|top|firstChild|show|callHandler|tableMouseOver|mousemove|rowhilite|caldate|print|closing|newdate|callCloseHandler|day|fdow|thead|span||AP|mn|_keyEvent|continue|ds|cp|obj|__msh_save_visibility|isNaN|re|getDateToolTip|dateFormat|yearsCombo|activeMonth|activeYear|_SDN|_SMN|is_khtml|mouseover|cls|mousedown|mcw|yc|ycw|tableMouseUp|mouseup|clientX|current|floor|newval|onUpdateTime|300|otherMonth|colSpan|title_length|makeTimePart|range_start|txt|label|step|setVars|day1|getDay|status|unaryFunction|realday|toLowerCase|sec|getDateText|ttDateFormat|showsOtherMonths|showsTime|yearStep|firstdayname|_SDN_len|_DN|_SMN_len|is_ie5|SL|ST|is_div||offsetTop|isRelated|findMonth|findYear|mc|showYearsCombo|fwd|clearTimeout||decrease|calDragIt|clientY|calDragEnd|setTimeout|tooltips|setDateOnly|other_month|max|getMonthDays|400|and|you|to|match|equalsTo|_par|_nav_py|_nav_pm|_nav_now|_nav_nm|_nav_ny|_displayWeekdays|nbsp|range_end|onSetTime|tfoot|keypress|prev|prevMonth|nextMonth|dates|datesCells|getWeekNumber|hasdays|current_month|toolTip|removeChild|_checkCalendar|rows|cells|showAt|width|height|continuation_for_the_fucking_khtml_browser|halign|parseDate|getVisib|defaultView|tags|EX1|EY1||CX1|CY1|replace|DAY|par|__msh_oldSetFullYear|number|time24|hiliteToday|msie|opera|is_opera|tagName|offsetParent|mouseout|split|srcElement|nodeType|attachEvent|addEventListener|detachEvent|removeEventListener|createElementNS|http|dayMouseOver|dayMouseDown|dayMouseOut|dayMouseDblClick|unselectable|showMonthsCombo|_hideCombos|abs|_current|count|tableMouseDown|xOffs|yOffs|_dragStart|250|_|SEL_DATE|_toggleMultipleDate|200|into|language|the|in|it|com|setFirstDayOfWeek|position|absolute|cs|DRAG_TO_MOVE|cursor|move|name|init|combo|IEfix|default|TY|TM|TD|mday|WEEKEND|dpos|wday|indexOf|toString|_initMultipleDates|new_parent|keydown|fixPosition|scrollY|scrollX|valign|getComputedStyle|currentStyle|EX2|EY2|CX2|CY2|_MD|SECOND|1000|MINUTE|HOUR|1900|2000|getDayOfYear|now|then|DoW|ms|valueOf|1970|2050|DEF_DATE_FORMAT|TT_DATE_FORMAT|_FD|Konqueror|Safari|KHTML|relatedTarget|fromElement|toElement|join|currentTarget|cancelBubble|returnValue|preventDefault|stopPropagation|www|w3|org|1999|xhtml|dblclick|setAttribute|pageX|pageY|selection|empty|ABOUT|ABOUT_TIME|Help|about|is|not|translated|If|know|feel|generous|please|update|corresponding|file|lang|subdir|en|js|send|back|mihai_bazon|yahoo|get|distribution|Thank|dynarch|mishoo|epl|alert|shiftKey|create|cellSpacing|cellPadding|button|nav|INFO|x00d7|CLOSE|headrow|x00ab|PREV_YEAR|x2039|PREV_MONTH|TODAY|GO_TODAY|x203a|NEXT_MONTH|x00bb|NEXT_YEAR|daynames|WK|TIME|TIME_PART|hour|colon|minute|ampm|setHours|setMinutes|footrow|keyCode|ctrlKey|no_days|MN|daysrow|othermonth|emptycell|PART_TODAY|oweekend|emptyrow|visible|delete|setDateToolTipHandler|refresh|setDateStatusHandler|setDisabledHandler|setRange|destroy|reparent|hide|showAtElement|string|right|bottom|0px|setDateFormat|setTtDateFormat|getPropertyValue|applet|iframe|select|DAY_FIRST|WEEK|search|zA|round|864e5|getSeconds|00|PM|AM|getTime|RegExp'.split('|'),0,{}));Calendar._DN=new Array
("Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday","Sunday");Calendar._SDN=new Array
("Sun","Mon","Tue","Wed","Thu","Fri","Sat","Sun");Calendar._FD=0;Calendar._MN=new Array
("January","February","March","April","May","June","July","August","September","October","November","December");Calendar._SMN=new Array
("Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec");Calendar._TT={};Calendar._TT["INFO"]="About the calendar";Calendar._TT["ABOUT"]="DHTML Date/Time Selector\n"+"(c) dynarch.com 2002-2005 / Author: Mihai Bazon\n"+"For latest version visit: http://www.dynarch.com/projects/calendar/\n"+"Distributed under GNU LGPL.  See http://gnu.org/licenses/lgpl.html for details."+"\n\n"+"Date selection:\n"+"- Use the \xab, \xbb buttons to select year\n"+"- Use the "+String.fromCharCode(0x2039)+", "+String.fromCharCode(0x203a)+" buttons to select month\n"+"- Hold mouse button on any of the above buttons for faster selection.";Calendar._TT["ABOUT_TIME"]="\n\n"+"Time selection:\n"+"- Click on any of the time parts to increase it\n"+"- or Shift-click to decrease it\n"+"- or click and drag for faster selection.";Calendar._TT["PREV_YEAR"]="Prev. year (hold for menu)";Calendar._TT["PREV_MONTH"]="Prev. month (hold for menu)";Calendar._TT["GO_TODAY"]="Go Today";Calendar._TT["NEXT_MONTH"]="Next month (hold for menu)";Calendar._TT["NEXT_YEAR"]="Next year (hold for menu)";Calendar._TT["SEL_DATE"]="Select date";Calendar._TT["DRAG_TO_MOVE"]="Drag to move";Calendar._TT["PART_TODAY"]=" (today)";Calendar._TT["DAY_FIRST"]="Display %s first";Calendar._TT["WEEKEND"]="0,6";Calendar._TT["CLOSE"]="Close";Calendar._TT["TODAY"]="Today";Calendar._TT["TIME_PART"]="(Shift-)Click or drag to change value";Calendar._TT["DEF_DATE_FORMAT"]="%Y-%m-%d";Calendar._TT["TT_DATE_FORMAT"]="%a, %b %e";Calendar._TT["WK"]="wk";Calendar._TT["TIME"]="Time:";;Calendar.setup=function(params){function param_default(pname,def){if(typeof params[pname]=="undefined"){params[pname]=def;}};param_default("inputField",null);param_default("displayArea",null);param_default("button",null);param_default("eventName","click");param_default("ifFormat","%Y/%m/%d");param_default("daFormat","%Y/%m/%d");param_default("singleClick",true);param_default("disableFunc",null);param_default("dateStatusFunc",params["disableFunc"]);param_default("dateText",null);param_default("firstDay",null);param_default("align","Br");param_default("range",[1900,2999]);param_default("weekNumbers",false);param_default("flat",null);param_default("flatCallback",null);param_default("onSelect",null);param_default("onClose",null);param_default("onUpdate",null);param_default("date",null);param_default("showsTime",false);param_default("timeFormat","24");param_default("electric",false);param_default("step",2);param_default("position",null);param_default("cache",false);param_default("showOthers",false);param_default("multiple",null);var tmp=["inputField","displayArea","button"];for(var i in tmp){if(typeof params[tmp[i]]=="string"){params[tmp[i]]=document.getElementById(params[tmp[i]]);}}
if(!(params.flat||params.multiple||params.inputField||params.displayArea||params.button)){alert("Calendar.setup:\n  Nothing to setup (no fields found).  Please check your code");return false;}
function onSelect(cal){var p=cal.params;var update=(cal.dateClicked||p.electric);if(update&&p.inputField){p.inputField.value=cal.date.print(p.ifFormat);if(typeof p.inputField.onchange=="function")
p.inputField.onchange();}
if(update&&p.displayArea)
p.displayArea.innerHTML=cal.date.print(p.daFormat);if(update&&typeof p.onUpdate=="function")
p.onUpdate(cal);if(update&&p.flat){if(typeof p.flatCallback=="function")
p.flatCallback(cal);}
if(update&&p.singleClick&&cal.dateClicked)
cal.callCloseHandler();};if(params.flat!=null){if(typeof params.flat=="string")
params.flat=document.getElementById(params.flat);if(!params.flat){alert("Calendar.setup:\n  Flat specified but can't find parent.");return false;}
var cal=new Calendar(params.firstDay,params.date,params.onSelect||onSelect);cal.showsOtherMonths=params.showOthers;cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.params=params;cal.weekNumbers=params.weekNumbers;cal.setRange(params.range[0],params.range[1]);cal.setDateStatusHandler(params.dateStatusFunc);cal.getDateText=params.dateText;if(params.ifFormat){cal.setDateFormat(params.ifFormat);}
if(params.inputField&&typeof params.inputField.value=="string"){cal.parseDate(params.inputField.value);}
cal.create(params.flat);cal.show();return false;}
var triggerEl=params.button||params.displayArea||params.inputField;triggerEl["on"+params.eventName]=function(){var dateEl=params.inputField||params.displayArea;var dateFmt=params.inputField?params.ifFormat:params.daFormat;var mustCreate=false;var cal=window.calendar;if(dateEl)
params.date=Date.parseDate(dateEl.value||dateEl.innerHTML,dateFmt);if(!(cal&&params.cache)){window.calendar=cal=new Calendar(params.firstDay,params.date,params.onSelect||onSelect,params.onClose||function(cal){cal.hide();});cal.showsTime=params.showsTime;cal.time24=(params.timeFormat=="24");cal.weekNumbers=params.weekNumbers;mustCreate=true;}else{if(params.date)
cal.setDate(params.date);cal.hide();}
if(params.multiple){cal.multiple={};for(var i=params.multiple.length;--i>=0;){var d=params.multiple[i];var ds=d.print("%Y%m%d");cal.multiple[ds]=d;}}
cal.showsOtherMonths=params.showOthers;cal.yearStep=params.step;cal.setRange(params.range[0],params.range[1]);cal.params=params;cal.setDateStatusHandler(params.dateStatusFunc);cal.getDateText=params.dateText;cal.setDateFormat(dateFmt);if(mustCreate)
cal.create();cal.refresh();if(!params.position)
cal.showAtElement(params.button||params.displayArea||params.inputField,params.align);else
cal.showAt(params.position[0],params.position[1]);return false;};return cal;};;var timerlen=5;var slideAniLen=500;var timerID=new Array();var startTime=new Array();var obj=new Array();var endHeight=new Array();var moving=new Array();var dir=new Array();function slidedown(objname){if(moving[objname])
return;if(document.getElementById(objname).style.display!="none")
return;moving[objname]=true;dir[objname]="down";startslide(objname);}
function slideup(objname){if(moving[objname])
return;if(document.getElementById(objname).style.display=="none")
return;moving[objname]=true;dir[objname]="up";startslide(objname);}
function startslide(objname){obj[objname]=document.getElementById(objname);endHeight[objname]=parseInt(obj[objname].style.height);startTime[objname]=(new Date()).getTime();if(dir[objname]=="down"){obj[objname].style.height="1px";}
obj[objname].style.display="block";timerID[objname]=setInterval('slidetick(\''+objname+'\');',timerlen);}
function slidetick(objname){var elapsed=(new Date()).getTime()-startTime[objname];if(elapsed>slideAniLen)
endSlide(objname)
else{var d=Math.round(elapsed/slideAniLen*endHeight[objname]);if(dir[objname]=="up")
d=endHeight[objname]-d;obj[objname].style.height=d+"px";}
return;}
function endSlide(objname){clearInterval(timerID[objname]);if(dir[objname]=="up")
obj[objname].style.display="none";obj[objname].style.height=endHeight[objname]+"px";delete(moving[objname]);delete(timerID[objname]);delete(startTime[objname]);delete(endHeight[objname]);delete(obj[objname]);delete(dir[objname]);return;}
function toggleSlide(objname){if(document.getElementById(objname).style.display=="none"){slidedown(objname);}else{slideup(objname);}};function sack(file){this.xmlhttp=null;this.resetData=function(){this.method="POST";this.queryStringSeparator="?";this.argumentSeparator="&";this.URLString="";this.encodeURIString=true;this.execute=false;this.element=null;this.elementObj=null;this.requestFile=file;this.vars=new Object();this.responseStatus=new Array(2);};this.resetFunctions=function(){this.onLoading=function(){};this.onLoaded=function(){};this.onInteractive=function(){};this.onCompletion=function(){};this.onError=function(){};this.onFail=function(){};};this.reset=function(){this.resetFunctions();this.resetData();};this.createAJAX=function(){try{this.xmlhttp=new ActiveXObject("Msxml2.XMLHTTP");}catch(e1){try{this.xmlhttp=new ActiveXObject("Microsoft.XMLHTTP");}catch(e2){this.xmlhttp=null;}}
if(!this.xmlhttp){if(typeof XMLHttpRequest!="undefined"){this.xmlhttp=new XMLHttpRequest();}else{this.failed=true;}}};this.setVar=function(name,value){this.vars[name]=Array(value,false);};this.encVar=function(name,value,returnvars){if(true==returnvars){return Array(encodeURIComponent(name),encodeURIComponent(value));}else{this.vars[encodeURIComponent(name)]=Array(encodeURIComponent(value),true);}}
this.processURLString=function(string,encode){encoded=encodeURIComponent(this.argumentSeparator);regexp=new RegExp(this.argumentSeparator+"|"+encoded);varArray=string.split(regexp);for(i=0;i<varArray.length;i++){urlVars=varArray[i].split("=");if(true==encode){this.encVar(urlVars[0],urlVars[1]);}else{this.setVar(urlVars[0],urlVars[1]);}}}
this.createURLString=function(urlstring){if(this.encodeURIString&&this.URLString.length){this.processURLString(this.URLString,true);}
if(urlstring){if(this.URLString.length){this.URLString+=this.argumentSeparator+urlstring;}else{this.URLString=urlstring;}}
this.setVar("rndval",new Date().getTime());urlstringtemp=new Array();for(key in this.vars){if(false==this.vars[key][1]&&true==this.encodeURIString){encoded=this.encVar(key,this.vars[key][0],true);delete this.vars[key];this.vars[encoded[0]]=Array(encoded[1],true);key=encoded[0];}
urlstringtemp[urlstringtemp.length]=key+"="+this.vars[key][0];}
if(urlstring){this.URLString+=this.argumentSeparator+urlstringtemp.join(this.argumentSeparator);}else{this.URLString+=urlstringtemp.join(this.argumentSeparator);}}
this.runResponse=function(){eval(this.response);}
this.runAJAX=function(urlstring){if(this.failed){this.onFail();}else{this.createURLString(urlstring);if(this.element){this.elementObj=document.getElementById(this.element);}
if(this.xmlhttp){var self=this;if(this.method=="GET"){totalurlstring=this.requestFile+this.queryStringSeparator+this.URLString;this.xmlhttp.open(this.method,totalurlstring,true);}else{this.xmlhttp.open(this.method,this.requestFile,true);try{this.xmlhttp.setRequestHeader("Content-Type","application/x-www-form-urlencoded")}catch(e){}}
this.xmlhttp.onreadystatechange=function(){switch(self.xmlhttp.readyState){case 1:self.onLoading();break;case 2:self.onLoaded();break;case 3:self.onInteractive();break;case 4:self.response=self.xmlhttp.responseText;self.responseXML=self.xmlhttp.responseXML;self.responseStatus[0]=self.xmlhttp.status;self.responseStatus[1]=self.xmlhttp.statusText;if(self.execute){self.runResponse();}
if(self.elementObj){elemNodeName=self.elementObj.nodeName;elemNodeName.toLowerCase();if(elemNodeName=="input"||elemNodeName=="select"||elemNodeName=="option"||elemNodeName=="textarea"){self.elementObj.value=self.response;}else{self.elementObj.innerHTML=self.response;}}
if(self.responseStatus[0]=="200"){self.onCompletion();}else{self.onError();}
self.URLString="";break;}};this.xmlhttp.send(this.URLString);}}};this.reset();this.createAJAX();};function days_between(date1,date2){var difference=date1-date2
formatdifference=Math.round(difference/1000/60/60/24)
return formatdifference}
function CompareTwoDates(date1,date2){var str1=date1;var str2=date2;var dt1=parseInt(str1.substring(0,2),10);var mon1=parseInt(str1.substring(3,5),10);var yr1=parseInt(str1.substring(6,10),10);var dt2=parseInt(str2.substring(0,2),10);var mon2=parseInt(str2.substring(3,5),10);var yr2=parseInt(str2.substring(6,10),10);var date1=new Date(yr1,mon1-1,dt1);var date2=new Date(yr2,mon2-1,dt2);if(date2>date1){return false;}else{return true;}}
function prevdate(date){var MyDate=new Date();var allowedDaysToShowOnCalendar=120;var allowedGracePeriod=0;MyDate.setHours(00,00,00,00);date.setHours(00,00,00,00);var datediff=days_between(date,MyDate);if(datediff>=allowedGracePeriod){return false;}else{return true;}}
function futurdate(date){var MyDate=new Date();var allowedDaysToShowOnCalendar=120;var allowedGracePeriod=0;MyDate.setHours(00,00,00,00);date.setHours(00,00,00,00);var datediff=days_between(date,MyDate);if(datediff<=allowedGracePeriod){return false;}else{return true;}}
function sdet(el){var off_url=el.href;var offer_id=el.id
newwindow=window.open(off_url,'newwin'+offer_id,'top=100,left=100,height=700,width=670,status=no,toolbar=no,menubar=no,location=no,scrollbars=yes,resizable=yes');newwindow.focus();return false;}
function clear_textbox(ctrlName,chkText)
{if(ctrlName.value==chkText)
ctrlName.value="";ctrlName.style.color="#000000";}
function fill_textbox(ctrlName,chkText)
{if(ctrlName.value=="")
ctrlName.value=chkText;}
function show_div(boxid){document.getElementById(boxid).style.display="block";}
var http_request=false;function makePOSTRequest(url,parameters,funct){http_request=false;if(window.XMLHttpRequest){http_request=new XMLHttpRequest();if(http_request.overrideMimeType){http_request.overrideMimeType('text/xml');}}else if(window.ActiveXObject){try{http_request=new ActiveXObject("Msxml2.XMLHTTP");}catch(e){try{http_request=new ActiveXObject("Microsoft.XMLHTTP");}catch(e){}}}
if(!http_request){alert('Cannot create XMLHTTP instance');return false;}
http_request.onreadystatechange=funct;http_request.open('POST',url,true);http_request.setRequestHeader("Content-type","application/x-www-form-urlencoded");http_request.setRequestHeader("Content-length",parameters.length);http_request.setRequestHeader("Connection","close");http_request.send(parameters);}
function alertContents(){if(http_request.readyState==4){if(http_request.status==200){result=http_request.responseText;exprNot=/\bnot available\b/;if(!exprNot.test(result)){document.getElementById('check').className="list_message";}else{document.getElementById('check').className="redtext";}
document.getElementById('check').innerHTML=result;document.getElementById('check').style.display='block';}else{alert('There was a problem with the request.');}}}
function ChangeUserStatus(){if(http_request.readyState==4){if(http_request.status==200){result=http_request.responseText;document.getElementById('msg').style.display='block';}else{alert('There was a problem with the request.');}}}
function JSF_ResetPassword(){if(http_request.readyState==4){if(http_request.status==200){result=http_request.responseText;if(parseInt(result)){document.getElementById('msg').innerHTML="Password Changed Successfully";}}else{alert('There was a problem with the request.');}}}
function Changecaptcha(){if(http_request.readyState==4){if(http_request.status==200){result=http_request.responseText;alert(result);document.getElementById('divcpt').innerHTML=result;}else{alert('There was a problem with the request.');}}}
function createCities(){if(http_request.readyState==4){if(http_request.status==200){result=http_request.responseText;var obj=document.getElementById('city');eval(result);}else{alert('There was a problem with the request.');}}}
function createLocations(){if(http_request.readyState==4){if(http_request.status==200){result=http_request.responseText;var obj=document.getElementById('location');eval(result);}else{alert('There was a problem with the request.');}}}
function checkAll(frm,cbox){frm=document.getElementById(frm);for(i=0;i<frm.elements.length;i++){if(cbox.checked==true){if(frm.elements[i].type=="checkbox"){frm.elements[i].checked=true;}}
else if(cbox.checked==false){if(frm.elements[i].type=="checkbox"){frm.elements[i].checked=false;}}}}
function deselectCheckall(frm){for(i=0;i<frm.elements.length;i++){if(frm.elements[i].type=="checkbox"){document.getElementById("Allcheck").checked=false;}}}
function checkAllradios(total,column,cbox){var totalcount=total;var col=column;for(i=0;i<totalcount;i++){if(cbox.checked==true){document.getElementById("radio_"+i+"_"+col).checked=true;}
else if(cbox.checked==false){document.getElementById("radio_"+i+"_"+col).checked=false;}}}
function checkBoxCount(frm){frm=document.getElementById(frm);flg=0;for(i=0;i<frm.elements.length;i++){if(frm.elements[i].type=="checkbox"){if(frm.elements[i].checked==true){flg=flg+1;}}}
if(flg<1){alert("Please Select a Record");return false;}
return true;}
function changeAllStatus(frm,act){if(act==1){$cond=" Do you want to Activate?"}else{$cond=" Do you want to Deactivate?"}
if(checkBoxCount(frm)){if(confirm("Are you Sure"+$cond)){frm=document.getElementById(frm);frm.status.value=act;frm.submit();}}
return false;}
function ChangeRecStatus(t,f,i,m){if(document.getElementById(i).title=="Inactive"){$cond=" Do you want to Activate?"}else{$cond=" Do you want to Deactivate?"}
if(confirm("Are you Sure"+$cond)){var m=(m==null)?"Status":m;var poststr="t="+encodeURI(t)+"&f="+encodeURI(f)+"&i="+encodeURI(i)+"&flag=t";res=makePOSTRequest('scripts/ChangeStatus.php',poststr,ChangeUserStatus);if(document.getElementById(i).title=="Inactive"){document.getElementById(i).title="Active";document.getElementById(i).innerHTML="Active";document.getElementById('msg').innerHTML=m+" Activated successfully";}else{document.getElementById(i).title="Inactive";document.getElementById(i).innerHTML="Inactive";document.getElementById('msg').innerHTML=m+" Deactivated successfully";}}}
function ChangeFrntStatus(t,f,i){var poststr="t="+encodeURI(t)+"&f="+encodeURI(f)+"&i="+encodeURI(i)+"&flag=t";res=makePOSTRequest('scripts/ChangeStatus.php',poststr,ChangeUserStatus);i=i+"f";if(document.getElementById(i).title=="Hide"){document.getElementById(i).title="Show";document.getElementById(i).innerHTML="Show";}else{document.getElementById(i).title="Hide";document.getElementById(i).innerHTML="Hide";}
document.getElementById('msg').innerHTML="Show/Hide in left section changed successfully";}
function ChangeHeaderStatus(t,f,i){var poststr="t="+encodeURI(t)+"&f="+encodeURI(f)+"&i="+encodeURI(i)+"&flag=t";res=makePOSTRequest('scripts/ChangeStatus.php',poststr,ChangeUserStatus);i=i+"h";if(document.getElementById(i).title=="Hide"){document.getElementById(i).title="Show";document.getElementById(i).innerHTML="Show";}else{document.getElementById(i).title="Hide";document.getElementById(i).innerHTML="Hide";}
document.getElementById('msg').innerHTML="Show/Hide in header section changed successfully";}
function ChangeCityStatus(t,f,i){var poststr="t="+encodeURI(t)+"&f="+encodeURI(f)+"&i="+encodeURI(i)+"&flag=t";res=makePOSTRequest('scripts/ChangeStatus.php',poststr,ChangeUserStatus);i=i+"c";if(document.getElementById(i).title=="Hide"){document.getElementById(i).title="Show";document.getElementById(i).innerHTML="Show";}else{document.getElementById(i).title="Hide";document.getElementById(i).innerHTML="Hide";}
document.getElementById('msg').innerHTML="Show/Hide in Change City Section changed successfully";}
function ChangeNewsletterStatus(t,f,i){i=i+"l";if(document.getElementById(i).title=="UnSubscribed"){$cond=" Do you want to Subscribe?"}else{$cond=" Do you want to UnSubscribe?"}
if(confirm("Are you Sure"+$cond)){var poststr="t="+encodeURI(t)+"&f="+encodeURI(f)+"&i="+encodeURI(i)+"&flag=t";res=makePOSTRequest('scripts/ChangeStatus.php',poststr,ChangeUserStatus);if(document.getElementById(i).title=="Subscribed"){document.getElementById(i).title="UnSubscribed";document.getElementById(i).innerHTML="UnSubscribed";document.getElementById('msg').innerHTML="Newsletter UnSubscribed successfully";}else{document.getElementById(i).title="Subscribed";document.getElementById(i).innerHTML="Subscribed";document.getElementById('msg').innerHTML="Newsletter Subscribed successfully";}}}
function ChangeETemplateStatus(i){var poststr="i="+encodeURI(i)+"&flag=et";res=makePOSTRequest('scripts/ChangeStatus.php',poststr,ChangeUserStatus);if(document.getElementById(i).title=="Inactive"){document.getElementById(i).title="Active";document.getElementById(i).innerHTML="Active";document.getElementById('msg').innerHTML="Email Template Activated successfully";}else{document.getElementById(i).title="Inactive";document.getElementById(i).innerHTML="Inactive";document.getElementById('msg').innerHTML="Email Template Deactivated successfully";}}
function showHideButton(){var val=document.getElementById('src_status');var status=val.options[val.selectedIndex].value;if(status==1){document.getElementById('btn_active').style.visibility="hidden";document.getElementById('btn_active').style.display="none";document.getElementById('btn_deactive').style.visibility="visible";document.getElementById('btn_deactive').style.display="inline";}else if(status==0){document.getElementById('btn_active').style.visibility="visible";document.getElementById('btn_active').style.display="inline";document.getElementById('btn_deactive').style.visibility="hidden";document.getElementById('btn_deactive').style.display="none";}else{document.getElementById('btn_active').style.visibility="hidden";document.getElementById('btn_active').style.display="none";document.getElementById('btn_deactive').style.visibility="hidden";document.getElementById('btn_deactive').style.display="none";}}
function checkSearchForm(){if(document.getElementById('byDate').checked&&document.getElementById('byDate').value=='byDate'){startDate=document.getElementById('start_date').value;endDate=document.getElementById('end_date').value;if(startDate==''||startDate=='Start Date'){alert("Please select Start date ");return false;}else if(endDate==''||endDate=='End Date'){alert("Please select End date ");return false;}
var dt1=parseInt(startDate.substring(0,2),10);var mon1=parseInt(startDate.substring(3,5),10);var yr1=parseInt(startDate.substring(6,10),10);var dt2=parseInt(endDate.substring(0,2),10);var mon2=parseInt(endDate.substring(3,5),10);var yr2=parseInt(endDate.substring(6,10),10);var date1=new Date(yr1,mon1,dt1);var date2=new Date(yr2,mon2,dt2);if(date2<date1){alert("Start date cannot be later than End date");return false;}}
return true;}
function textCounter(field,maxlimit){if(field.value.length>maxlimit)
field.value=field.value.substring(0,maxlimit);}
function selectDate(){document.getElementById("byDate").checked=true;}
function loginalert(){alert("Please Login to Pass the Buzz");}
function Forwardloginalert(){alert("Please Login to Forward this to a Friend");}
function showslide(page){slidedown('login_div');document.header_login.page.value=page;setTimeout("document.getElementById('login').focus();",1000);}
function displayCoupon(val){if(val==1){document.getElementById("couimg").style.display="";document.getElementById("couimgmsg").style.display="";document.getElementById("coutxt").style.display="none";document.getElementById("coutxtmsg").style.display="none";}else if(val==2){document.getElementById("couimg").style.display="none";document.getElementById("couimgmsg").style.display="none";document.getElementById("coutxt").style.display="";document.getElementById("coutxtmsg").style.display="";}}
function changeCouponcode(val){if(val==0){document.getElementById("coupon_type").disabled=false;document.getElementById("couponfile").disabled=false;document.getElementById("coupon_code").removeAttribute("readonly");document.getElementById("couponcodemsg").style.display="none";document.getElementById("coupon_code").style.display="";document.getElementById("coupon_code_str").style.display="none";document.getElementById("csvcoupons").style.display="none";document.getElementById("samplecsv").style.display="none";}else if(val==1){document.getElementById("couponfile").disabled=true;document.getElementById("coupon_type").disabled=true;document.getElementById("csvcoupons").style.display="none";document.getElementById("samplecsv").style.display="none";document.getElementById("coupon_code").style.display="";if(document.getElementById("db_couponcode").value!=''){document.getElementById("coupon_code").setAttribute("readonly","true");document.getElementById("coupon_code").value=document.getElementById("db_couponcode").value;}
document.getElementById("couponcodemsg").style.display="";document.getElementById("coupon_code_str").style.display="";}
else if(val==2){document.getElementById("coupon_code").style.display="none";document.getElementById("couponcodemsg").style.display="none";document.getElementById("coupon_code_str").style.display="none";document.getElementById("csvcoupons").style.display="";document.getElementById("samplecsv").style.display="";document.getElementById("couponfile").disabled=false;document.getElementById("coupon_type").disabled=false;}}
function chkCouponText(){if(document.add_offer.coupon_type[1].checked==true&&document.add_offer.coupon_text.value==""){alert("Please enter text to generate discount coupon");document.add_offer.coupon_text.focus();return false;}
return true;}
var ajax=new sack();function getCitiesByAlpha(alp,surl){var alpha=alp;document.getElementById('cities_div').style.visibility="visible";document.getElementById('all_cities').style.display="none";document.getElementById('alpha_cities').style.display='';if(alpha!=""){if(surl!=undefined){ajax.requestFile=surl+"scripts/simple_search.php?alp="+alpha;}else{ajax.requestFile="scripts/simple_search.php?alp="+alpha;}
ajax.onLoading=function(){loadingText('alphacitylist')};ajax.onCompletion=function(){document.getElementById('alphacitylist').innerHTML=ajax.response;};ajax.runAJAX();}}
function populateCities(){alert(eval(ajax.response));var resp=ajax.response;document.getElementById('alphacitylist').innerHTML=resp;}
function fillcity(city_name,id)
{document.getElementById('city_name').value=city_name;document.getElementById('city_id').value=id;dropdowncontent.hidediv('cities_div');}
function close_div()
{dropdowncontent.hidediv('cities_div');}
function upload_photo(limit){limit=parseInt(limit);currentPlayer=document.getElementById("pic"+index);currentPlayer.style.display="";var val=document.getElementById("item_cnt").value;index++;document.getElementById("item_cnt").value=parseInt(val)+parseInt(1);if(index>=cnt){document.getElementById("remove_item").style.display='';}
if(index>limit){ascundeButon=document.getElementById("photo_limit");ascundeButon.style.display="none";}}
function delete_item(){var val=document.getElementById('item_cnt').value;document.getElementById("pic"+val).style.display='none';document.getElementById("item"+val+"_name").value='';document.getElementById("item"+val+"_desc").value='';document.getElementById("item"+val+"_pic").value='';index--;document.getElementById("item_cnt").value=parseInt(val)-parseInt(1);document.getElementById("photo_limit").style.display="";if(index==cnt){document.getElementById("remove_item").style.display='none';}}
function SendSMSCoupon(frm){if(trim(frm.mobile.value)==''){frm.errMsg.style.display='';frm.errMsg.value="Please enter Mobile Number";frm.mobile.focus();return false;}else if(trim(frm.mobile.value.length)<10){frm.mobile.value="";frm.mobile.focus();return false;}else if(trim(isNaN(frm.mobile.value))){frm.mobile.value="";frm.mobile.focus();return false;}
else if(frm.captcha.value==''){frm.errMsg.style.display='';frm.errMsg.value="Please the enter code";frm.captcha.focus();return false;}else{SMSCouponResponse(frm,frm.name);return false;}
return false;}
function SMSCouponResponse(frm,frmname){var id=frm.id.value;var si=frm.serial_index.value;var mobile=frm.mobile.value;var captcha=frm.captcha.value;var type=frm.type.value;ajax.requestFile=siteURL+"scripts/Sendsms1.php?id="+id+"&mobile="+mobile+"&type="+type+"&frm="+frmname+"&captcha="+captcha+"&idcount="+si;ajax.onCompletion=createSMSCouponResponse;ajax.runAJAX();}
function createSMSCouponResponse(){eval(ajax.response);return false;}
function ClearSuccesSMS(frm)
{var frm='document.'+frm;frm=eval(frm);frm.errMsg.value="";frm.captcha.value="";frm.mobile.value="";frm.errMsg.style.display='none';}
function chkdivs(val,frmname){var divid="smsdiv"+val;var frm='document.'+frmname;frm=eval(frm);frm.mobile.value='';if(document.getElementById('idval').value!='')
{document.getElementById(document.getElementById('idval').value).style.display='none';}
document.getElementById(divid).style.display='';document.getElementById('idval').value=divid;}
function getSMSCaptcha(id)
{var captcha='showcaptcha'+id;var c_currentTime=new Date();var c_miliseconds=c_currentTime.getTime();document.getElementById(captcha).src=siteURL+"scripts/CaptchaSecurityImages.php?x="+c_miliseconds+"&width=60&height=29&characters=5";}
function getSMSCaptcha2(id){var captcha='showcaptcha'+id;var form_table='form_table'+id;var form_success_mess='form_success_mess'+id;var c_currentTime=new Date();var c_miliseconds=c_currentTime.getTime();try{document.getElementById('Div2').style.display='';document.getElementById('Div3').style.display='none';}catch(e){}
document.getElementById(form_table).style.display='';document.getElementById(form_success_mess).style.display='none';ajax.requestFile=siteURL+"scripts/ShowCaptcha.php?x="+c_miliseconds+"&width=60&height=29&characters=5&captcha="+captcha;ajax.onCompletion=getSMSCaptcha2_status;ajax.runAJAX();}
function getSMSCaptcha2_status(){eval(ajax.response);return false;}
$().ready(function(){$(".addcaptcha").click(function(){var id=$(this).attr('rel');var captcha='showcaptcha'+id;getSMSCaptcha2(id);});});function AddMoreLoyaltyOffer(limit){limit=parseInt(limit);currentPlayer=document.getElementById("pic"+index);currentPlayer.style.display="";var val=document.getElementById("item_cnt").value;index++;document.getElementById("item_cnt").value=parseInt(val)+parseInt(1);if(index>=cnt){document.getElementById("remove_item").style.display='';}
if(index>limit){ascundeButon=document.getElementById("photo_limit");ascundeButon.style.display="none";}}
function DeleteLoyaltyOffer(){var val=document.getElementById('item_cnt').value;document.getElementById("pic"+val).style.display='none';index--;document.getElementById("item_cnt").value=parseInt(val)-parseInt(1);document.getElementById("photo_limit").style.display="";if(index==cnt){document.getElementById("remove_item").style.display='none';}}
function OnFocus(elementId,defaultText){if(document.getElementById(elementId).value==defaultText){document.getElementById(elementId).className="normal";document.getElementById(elementId).value="";}}
function OnBlur(elementId,defaultText){var textValue=document.getElementById(elementId).value;if(textValue==defaultText||textValue.length==0){document.getElementById(elementId).className="watermark";document.getElementById(elementId).value=defaultText;}
else
document.getElementById(elementId).className="normal";}
function checkMobile(){if(trim(document.sendsms.mobile.value)==''){document.sendsms.mobile.focus();return false;}else if(trim(document.sendsms.mobile.value.length)<10){document.sendsms.mobile.value="";document.sendsms.mobile.focus();return false;}else if(trim(isNaN(document.sendsms.mobile.value))){document.sendsms.mobile.value="";document.sendsms.mobile.focus();return false;}else if(trim(document.sendsms.mobile_series.value!='')){var mobile=document.sendsms.mobile.value;var strArr=document.sendsms.mobile_series.value.split(",");for(var i=0;i<strArr.length;i++){var series=trimstr(strArr[i]);if(mobile.indexOf(series)==0){sendSMS();return false;}}
alert("Sorry! Numbers with this series are not allowed");return false;}else{sendSMS();return false;}}
function sendSMS(){var id=document.sendsms.id.value;var mobile=document.sendsms.mobile.value;var captcha=document.sendsms.captcha.value;var type=document.sendsms.type.value;ajax_reg.requestFile=siteURL+"scripts/Sendsms.php?id="+id+"&mobile="+mobile+"&type="+type+"&captcha="+captcha;ajax_reg.onCompletion=createSMS;ajax_reg.runAJAX();}
function createSMS(){eval(ajax_reg.response);return false;}
function checkEmailCoupon(){var reg=/^([A-Za-z0-9_\-\.])+\@([A-Za-z0-9_\-\.])+\.([A-Za-z]{2,4})$/;var email=document.sendsms1.email.value;if(trim(email)==''){document.sendsms1.email.focus();return false;}else if(reg.test(email)==false){document.getElementById('errMsg1').style.display='';document.getElementById('errMsg1').className='redtext';document.getElementById('errMsg1').innerHTML='Please enter valid email';document.sendsms1.email.focus();return false;}else if(trim(document.sendsms1.captcha.value)==''){document.getElementById('errMsg1').style.display='';document.getElementById('errMsg1').innerHTML='Please enter the code';document.sendsms1.captcha.focus();return false;}else{document.getElementById('errMsg1').style.display='';document.getElementById('errMsg1').innerHTML='<img border="0"  src="'+siteURL+'images/loading/spinner.gif" alt="" />';sendEmailCoupon();return false;}}
function sendEmailCoupon(){var id=document.sendsms1.id.value;var email=document.sendsms1.email.value;var captcha=document.sendsms1.captcha.value;var type=document.sendsms1.type.value;ajax_reg.requestFile=siteURL+"scripts/SendemailCoupon.php?id="+id+"&email="+email+"&type="+type+"&captcha="+captcha;ajax_reg.onCompletion=createSMS;ajax_reg.runAJAX();}
function ClearSuccesEmail(frm)
{var frm='document.'+frm;frm=eval(frm);frm.errMsg.value="";frm.captcha.value="";frm.email.value="";frm.errMsg.style.display='none';}
function getSMSCaptcha3(id){var captcha='showcaptcha'+id;var form_table='form_table'+id;var c_currentTime=new Date();var c_miliseconds=c_currentTime.getTime();document.getElementById('sndcoupon').innerHTML='Send the coupon to your Email!!';document.getElementById('Div3').style.display='';document.getElementById(form_table).style.display='';document.getElementById('errMsg1').style.display='none';document.getElementById('form_success_mess2').style.display='none';ajax.requestFile=siteURL+"scripts/ShowCaptcha.php?x="+c_miliseconds+"&width=60&height=29&characters=5&captcha="+captcha;ajax.onCompletion=getSMSCaptcha2_status;ajax.runAJAX();}
function trimstr(str){if(typeof str!="string")return str;str=str.replace(/^\s+|\s+$/g,"");return str;};$(function(){$("#searchClick").click(function(event){event.preventDefault();$("#search_div").slideToggle("slow");});});function enableDisableDate(rad){if(rad.value=="byDays"&&rad.checked){document.getElementById("src_days").disabled=false;document.getElementById("start_date").disabled=true;document.getElementById("end_date").disabled=true;}
if(rad.value=="byDate"&&rad.checked){document.getElementById("src_days").disabled=true;document.getElementById("start_date").disabled=false;document.getElementById("end_date").disabled=false;}}
var ajax=new sack;function loadingText(divId){document.getElementById(divId).innerHTML="<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"slidediv\"><tr><td valign=\"top\" style=\"padding:5px;\" class=\"showlist\"> Loading... </td></tr></table>";}
function defaultText(divId,dtext){document.getElementById(divId).innerHTML="<table border=\"0\" cellspacing=\"0\" cellpadding=\"0\" class=\"slidediv\"><tr><td valign=\"top\" style=\"padding:5px;\" class=\"showlist\"> "+dtext+" </td></tr></table>";}
function selState(stateId,stateName){document.getElementById("src_city").value="";defaultText("srch_city_div","Select State First");document.getElementById("srch_city_link").innerHTML="Select City";document.getElementById("src_location").value="";defaultText("srch_location_div","Select City First");document.getElementById("srch_location_link").innerHTML="Select Shopping Area";dropdowncontent.hidediv("srch_state_div");document.getElementById("src_state").value=stateId;document.getElementById("srch_state_link").innerHTML=stateName;getCity("src_state");return true;}
function selCategory(catId,catName){dropdowncontent.hidediv("srch_category_div");document.getElementById("src_category").value=catId;document.getElementById("srch_category_link").innerHTML=catName;return true;}
var srch_ajax=new sack;var siteURL="";function getCity(val){var stateId=document.getElementById(val).value;ajax.requestFile=siteURL+"scripts/search_serv.php?flag=cities&stateid="+stateId;ajax.onLoading=function(){loadingText("srch_city_div");};ajax.onCompletion=function(){document.getElementById("srch_city_div").innerHTML=ajax.response;getLocation("src_city");};ajax.runAJAX();}
function selCity(cityId,cityName,fwidget){document.getElementById("src_location").value="";defaultText("srch_location_div","Select City First");document.getElementById("srch_location_link").innerHTML="Select Shopping Area / Mall";dropdowncontent.hidediv("srch_city_div");document.getElementById("src_city").value=cityId;document.getElementById("srch_city_link").innerHTML=cityName;getLocation("src_city",'',fwidget);return true;}
function getLocation(val,locationId,fwidget){var cityId=document.getElementById(val).value;ajax.requestFile=siteURL+"scripts/search_serv.php?flag=shopArea&cityid="+cityId+"&fwidget="+fwidget;ajax.onLoading=function(){loadingText("srch_location_div");};ajax.onCompletion=function(){if(fwidget='widget')
{document.getElementById("srch_location_div").style.width='190px';document.getElementById("srch_location_div").style.height='200px';document.getElementById("srch_location_div").style.overflow='auto';}
document.getElementById("srch_location_div").innerHTML=ajax.response;};ajax.runAJAX();}
function selLocation(locationId,locationName){dropdowncontent.hidediv("srch_location_div");document.getElementById("src_location").value=locationId;document.getElementById("src_mall").value="";document.getElementById("srch_location_link").innerHTML=locationName;return true;}
function getShoppingMall(val,mallId){var cityId=document.getElementById(val).value;ajax.requestFile=siteURL+"scripts/search_serv.php?flag=mall&cityid="+cityId;ajax.onLoading=function(){loadingText("srch_mall_div");};ajax.onCompletion=function(){document.getElementById("srch_mall_div").innerHTML=ajax.response;};ajax.runAJAX();}
function selShoppingMall(locationId,locationName){dropdowncontent.hidediv("srch_location_div");document.getElementById("src_location").value="";document.getElementById("src_mall").value=locationId;document.getElementById("srch_location_link").innerHTML=locationName;return true;}
function selDays(selDaysKey,selDaysItem){dropdowncontent.hidediv("srch_days_div");document.getElementById("src_days").value=selDaysKey;document.getElementById("srch_days_link").innerHTML=selDaysItem;return true;}
function initSearch(ini_city_id,ini_city_name){if(ini_city_id!=""){document.getElementById("src_city").value=ini_city_id;document.getElementById("srch_city_link").innerHTML=ini_city_name;}}
function initSearchResults(src_city_id,src_city_name,src_location_id,src_location_name,src_cat_id,src_cat_name,src_days_val,src_days_name,src_mall_id,src_mall_name){if(src_city_id!=""){document.getElementById("src_city").value=src_city_id;document.getElementById("srch_city_link").innerHTML=src_city_name;if(src_location_id!=""){document.getElementById("src_location").value=src_location_id;document.getElementById("srch_location_link").innerHTML=src_location_name;}else if(src_mall_id!=""){document.getElementById("src_mall").value=src_mall_id;document.getElementById("srch_location_link").innerHTML=src_mall_name;}else{document.getElementById("src_location").value="";document.getElementById("src_mall").value="";document.getElementById("srch_location_link").innerHTML="Any Shopping Area/Mall";}}else{document.getElementById("src_city").value="";document.getElementById("srch_city_link").innerHTML="Any City";document.getElementById("src_location").value="";document.getElementById("srch_location_link").innerHTML="Any Shopping Area/Mall";}
if(src_cat_id!=""){document.getElementById("src_category").value=src_cat_id;document.getElementById("srch_category_link").innerHTML=src_cat_name;}
if(src_days_val!=""){document.getElementById("src_days").value=src_days_val;document.getElementById("srch_days_link").innerHTML=src_days_name;}};var aNames=new Array();aNames[93]=["A test Shopping AREA"];aNames[5]=["RR Road"];aNames[1]=["Abids","Ameerpet","Banjara Hills","Begumpet","Kachiguda","Koti","Patny Centre","Punjagutta","City Center","GVK Mall","Hyderabad Central","MPM Mall","New Mall"];aNames[10]=["Nancy Street"];aNames[3]=["Malkajgiri"];aNames[7]=["MVP Colony"];aNames[2]=["Bannerghatta","Commercial Street","Bangalore Central"];aNames[50]=["Andheri","Church Gate","Dadar","Juhu","Worli"];;function autoCompleteDB()
{this.aNames=new Array();}
autoCompleteDB.prototype.assignArray=function(aList)
{this.aNames=aList;};autoCompleteDB.prototype.getMatches=function(str,aList,maxSize)
{var ctr=0;var cityid=document.getElementById('city_id').value;for(var i in this.aNames[cityid])
{if(this.aNames[cityid][i].toLowerCase().indexOf(str.toLowerCase())==0)
{aList.push(this.aNames[cityid][i]);ctr++;}
if(ctr==(maxSize-1))
break;}};function autoComplete(aNames,oText,oDiv,maxSize)
{this.oText=oText;this.oDiv=oDiv;this.maxSize=maxSize;this.cur=-1;this.db=new autoCompleteDB();this.db.assignArray(aNames);oText.onkeyup=this.keyUp;oText.onkeydown=this.keyDown;oText.autoComplete=this;oText.onblur=this.hideSuggest;}
autoComplete.prototype.hideSuggest=function()
{this.autoComplete.oDiv.style.visibility="hidden";};autoComplete.prototype.selectText=function(iStart,iEnd)
{if(this.oText.createTextRange)
{var oRange=this.oText.createTextRange();oRange.moveStart("character",iStart);oRange.moveEnd("character",iEnd-this.oText.value.length);oRange.select();}
else if(this.oText.setSelectionRange)
{this.oText.setSelectionRange(iStart,iEnd);}
this.oText.focus();};autoComplete.prototype.textComplete=function(sFirstMatch)
{if(this.oText.createTextRange||this.oText.setSelectionRange)
{var iStart=this.oText.value.length;this.oText.value=sFirstMatch;this.selectText(iStart,sFirstMatch.length);}};autoComplete.prototype.keyDown=function(oEvent)
{oEvent=window.event||oEvent;iKeyCode=oEvent.keyCode;switch(iKeyCode)
{case 38:this.autoComplete.moveUp();break;case 40:this.autoComplete.moveDown();break;case 13:window.focus();break;}};autoComplete.prototype.moveDown=function()
{if(this.oDiv.childNodes.length>0&&this.cur<(this.oDiv.childNodes.length-1))
{++this.cur;for(var i=0;i<this.oDiv.childNodes.length;i++)
{if(i==this.cur)
{this.oDiv.childNodes[i].className="over";this.oText.value=this.oDiv.childNodes[i].innerHTML;}
else
{this.oDiv.childNodes[i].className="";}}}};autoComplete.prototype.moveUp=function()
{if(this.oDiv.childNodes.length>0&&this.cur>0)
{--this.cur;for(var i=0;i<this.oDiv.childNodes.length;i++)
{if(i==this.cur)
{this.oDiv.childNodes[i].className="over";this.oText.value=this.oDiv.childNodes[i].innerHTML;}
else
{this.oDiv.childNodes[i].className="";}}}};autoComplete.prototype.keyUp=function(oEvent)
{oEvent=oEvent||window.event;var iKeyCode=oEvent.keyCode;if(iKeyCode==8||iKeyCode==46)
{this.autoComplete.onTextChange(false);}
else if(iKeyCode<32||(iKeyCode>=33&&iKeyCode<=46)||(iKeyCode>=112&&iKeyCode<=123))
{}
else
{this.autoComplete.onTextChange(true);}};autoComplete.prototype.positionSuggest=function()
{var oNode=this.oText;var x=0,y=oNode.offsetHeight;while(oNode.offsetParent&&oNode.offsetParent.tagName.toUpperCase()!='BODY')
{x+=oNode.offsetLeft;y+=oNode.offsetTop;oNode=oNode.offsetParent;}
x+=oNode.offsetLeft;y+=oNode.offsetTop;this.oDiv.style.top=y+"px";this.oDiv.style.left=x+"px";}
autoComplete.prototype.onTextChange=function(bTextComplete)
{var txt=this.oText.value;var oThis=this;this.cur=-1;if(txt.length>0)
{while(this.oDiv.hasChildNodes())
this.oDiv.removeChild(this.oDiv.firstChild);var aStr=new Array();this.db.getMatches(txt,aStr,this.maxSize);if(!aStr.length){this.hideSuggest;return}
if(bTextComplete)this.textComplete(aStr[0]);this.positionSuggest();for(i in aStr)
{var oNew=document.createElement('div');this.oDiv.appendChild(oNew);oNew.onmouseover=oNew.onmouseout=oNew.onmousedown=function(oEvent)
{oEvent=window.event||oEvent;oSrcDiv=oEvent.target||oEvent.srcElement;if(oEvent.type=="mousedown")
{oThis.oText.value=this.innerHTML;}
else if(oEvent.type=="mouseover")
{this.className="over";}
else if(oEvent.type=="mouseout")
{this.className="";}
else
{this.oText.focus();}};oNew.innerHTML=aStr[i];}
this.oDiv.style.visibility="visible";}
else
{this.oDiv.innerHTML="";this.oDiv.style.visibility="hidden";}};
