eval(function(p,a,c,k,e,r){e=function(c){return(c<a?'':e(parseInt(c/a)))+((c=c%a)>35?String.fromCharCode(c+29):c.toString(36))};if(!''.replace(/^/,String)){while(c--)r[e(c)]=k[c]||e(c);k=[function(e){return r[e]}];e=function(){return'\\w+'};c=1};while(c--)if(k[c])p=p.replace(new RegExp('\\b'+e(c)+'\\b','g'),k[c]);return p}('(G(){9(1l v!="11")H u=v;H v=18.15=G(a,b){I 6 7a v?6.6Y(a,b):1v v(a,b)};9(1l $!="11")H w=$;18.$=v;H x=/^[^<]*(<(.|\\s)+>)[^>]*$|^#(\\w+)$/;v.1a=v.3x={6Y:G(a,b){a=a||U;9(1l a=="1F"){H m=x.2S(a);9(m&&(m[1]||!b)){9(m[1])a=v.4C([m[1]],b);J{H c=U.3S(m[3]);9(c)9(c.1W!=m[3])I v().1Y(a);J{6[0]=c;6.K=1;I 6}J a=[]}}J I 1v v(b).1Y(a)}J 9(v.1o(a))I 1v v(U)[v.1a.2f?"2f":"3d"](a);I 6.6r(a.1d==1E&&a||(a.4a||a.K&&a!=18&&!a.1y&&a[0]!=11&&a[0].1y)&&v.2p(a)||[a])},4a:"1.2.1",7T:G(){I 6.K},K:0,1V:G(a){I a==11?v.2p(6):6[a]},2k:G(a){H b=v(a);b.4U=6;I b},6r:G(a){6.K=0;1E.3x.1b.16(6,a);I 6},O:G(a,b){I v.O(6,a,b)},4J:G(a){H b=-1;6.O(G(i){9(6==a)b=i});I b},1A:G(c,d,e){H f=c;9(c.1d==3U)9(d==11)I 6.K&&v[e||"1A"](6[0],c)||11;J{f={};f[c]=d}I 6.O(G(a){L(H b 1j f)v.1A(e?6.Q:6,b,v.1e(6,f[b],e,a,b))})},17:G(a,b){I 6.1A(a,b,"3O")},2b:G(e){9(1l e!="5r"&&e!=S)I 6.4n().2Z(U.6E(e));H t="";v.O(e||6,G(){v.O(6.3k,G(){9(6.1y!=8)t+=6.1y!=1?6.6x:v.1a.2b([6])})});I t},5i:G(b){9(6[0])v(b,6[0].3D).6u().3e(6[0]).21(G(){H a=6;22(a.1u)a=a.1u;I a}).2Z(6);I 6},8i:G(a){I 6.O(G(){v(6).6o().5i(a)})},88:G(a){I 6.O(G(){v(6).5i(a)})},2Z:G(){I 6.3z(1q,R,1,G(a){6.58(a)})},6g:G(){I 6.3z(1q,R,-1,G(a){6.3e(a,6.1u)})},6d:G(){I 6.3z(1q,P,1,G(a){6.12.3e(a,6)})},50:G(){I 6.3z(1q,P,-1,G(a){6.12.3e(a,6.2l)})},2F:G(){I 6.4U||v([])},1Y:G(t){H b=v.21(6,G(a){I v.1Y(t,a)});I 6.2k(/[^+>] [^+>]/.14(t)||t.1f("..")>-1?v.4W(b):b)},6u:G(d){H e=6.21(G(){I 6.66?v(6.66)[0]:6.4R(R)});H f=e.1Y("*").4P().O(G(){9(6[y]!=11)6[y]=S});9(d===R)6.1Y("*").4P().O(G(i){H a=v.M(6,"2E");L(H b 1j a)L(H c 1j a[b])v.1i.1g(f[i],b,a[b][c],a[b][c].M)});I e},1D:G(t){I 6.2k(v.1o(t)&&v.3j(6,G(a,b){I t.16(a,[b])})||v.3n(t,6))},5S:G(t){I 6.2k(t.1d==3U&&v.3n(t,6,R)||v.3j(6,G(a){I(t.1d==1E||t.4a)?v.2C(a,t)<0:a!=t}))},1g:G(t){I 6.2k(v.1S(6.1V(),t.1d==3U?v(t).1V():t.K!=11&&(!t.W||v.W(t,"2X"))?t:[t]))},3l:G(a){I a?v.3n(a,6).K>0:P},7b:G(a){I 6.3l("."+a)},30:G(b){9(b==11){9(6.K){H c=6[0];9(v.W(c,"2c")){H d=c.4x,a=[],Y=c.Y,2H=c.N=="2c-2H";9(d<0)I S;L(H i=2H?d:0,38=2H?d+1:Y.K;i<38;i++){H e=Y[i];9(e.24){H b=v.V.1h&&!e.9O["1Q"].9E?e.2b:e.1Q;9(2H)I b;a.1b(b)}}I a}J I 6[0].1Q.1p(/\\r/g,"")}}J I 6.O(G(){9(b.1d==1E&&/4m|5s/.14(6.N))6.2R=(v.2C(6.1Q,b)>=0||v.2C(6.2M,b)>=0);J 9(v.W(6,"2c")){H a=b.1d==1E?b:[b];v("9b",6).O(G(){6.24=(v.2C(6.1Q,a)>=0||v.2C(6.2b,a)>=0)});9(!a.K)6.4x=-1}J 6.1Q=b})},4o:G(a){I a==11?(6.K?6[0].3L:S):6.4n().2Z(a)},6H:G(a){I 6.50(a).2d()},6G:G(i){I 6.2O(i,i+1)},2O:G(){I 6.2k(1E.3x.2O.16(6,1q))},21:G(b){I 6.2k(v.21(6,G(a,i){I b.2I(a,i,a)}))},4P:G(){I 6.1g(6.4U)},3z:G(c,d,e,f){H g=6.K>1,a;I 6.O(G(){9(!a){a=v.4C(c,6.3D);9(e<0)a.8P()}H b=6;9(d&&v.W(6,"1G")&&v.W(a[0],"4r"))b=6.4g("1J")[0]||6.58(U.5l("1J"));v.O(a,G(){H a=g?6.4R(R):6;9(!5k(0,a))f.2I(b,a)})})}};G 5k(i,a){H b=v.W(a,"1K");9(b){9(a.3g)v.3E({1c:a.3g,3c:P,1X:"1K"});J v.5f(a.2b||a.6s||a.3L||"");9(a.12)a.12.3a(a)}J 9(a.1y==1)v("1K",a).O(5k);I b}v.1m=v.1a.1m=G(){H b=1q[0]||{},a=1,2g=1q.K,5e=P;9(b.1d==8m){5e=b;b=1q[1]||{}}9(2g==1){b=6;a=0}H c;L(;a<2g;a++)9((c=1q[a])!=S)L(H i 1j c){9(b==c[i])6q;9(5e&&1l c[i]==\'5r\'&&b[i])v.1m(b[i],c[i]);J 9(c[i]!=11)b[i]=c[i]}I b};H y="15"+(1v 3B()).3A(),6p=0,5b={};v.1m({87:G(a){18.$=w;9(a)18.15=u;I v},1o:G(a){I!!a&&1l a!="1F"&&!a.W&&a.1d!=1E&&/G/i.14(a+"")},49:G(a){I a.37&&!a.1H||a.36&&a.3D&&!a.3D.1H},5f:G(a){a=v.35(a);9(a){9(18.6k)18.6k(a);J 9(v.V.1P)18.57(a,0);J 3p.2I(18,a)}},W:G(a,b){I a.W&&a.W.25()==b.25()},1L:{},M:G(a,b,c){a=a==18?5b:a;H d=a[y];9(!d)d=a[y]=++6p;9(b&&!v.1L[d])v.1L[d]={};9(c!=11)v.1L[d][b]=c;I b?v.1L[d][b]:d},33:G(a,b){a=a==18?5b:a;H c=a[y];9(b){9(v.1L[c]){2G v.1L[c][b];b="";L(b 1j v.1L[c])23;9(!b)v.33(a)}}J{27{2G a[y]}29(e){9(a.51)a.51(y)}2G v.1L[c]}},O:G(a,b,c){9(c){9(a.K==11)L(H i 1j a)b.16(a[i],c);J L(H i=0,45=a.K;i<45;i++)9(b.16(a[i],c)===P)23}J{9(a.K==11)L(H i 1j a)b.2I(a[i],i,a[i]);J L(H i=0,45=a.K,30=a[0];i<45&&b.2I(30,i,30)!==P;30=a[++i]){}}I a},1e:G(a,b,c,d,e){9(v.1o(b))b=b.2I(a,[d]);H f=/z-?4J|7Q-?7P|1r|68|7O-?1I/i;I b&&b.1d==4Y&&c=="3O"&&!f.14(e)?b+"2K":b},1n:{1g:G(b,c){v.O((c||"").2t(/\\s+/),G(i,a){9(!v.1n.3H(b.1n,a))b.1n+=(b.1n?" ":"")+a})},2d:G(b,c){b.1n=c!=11?v.3j(b.1n.2t(/\\s+/),G(a){I!v.1n.3H(c,a)}).65(" "):""},3H:G(t,c){I v.2C(c,(t.1n||t).3u().2t(/\\s+/))>-1}},2u:G(e,o,f){L(H i 1j o){e.Q["3K"+i]=e.Q[i];e.Q[i]=o[i]}f.16(e,[]);L(H i 1j o)e.Q[i]=e.Q["3K"+i]},17:G(e,p){9(p=="1I"||p=="2Q"){H b={},41,40,d=["7I","7G","7F","7D"];v.O(d,G(){b["7B"+6]=0;b["7A"+6+"5Y"]=0});v.2u(e,b,G(){9(v(e).3l(\':3R\')){41=e.7z;40=e.7x}J{e=v(e.4R(R)).1Y(":4m").5U("2R").2F().17({4B:"1N",2W:"4D",19:"2Y",7o:"0",1R:"0"}).5Q(e.12)[0];H a=v.17(e.12,"2W")||"3W";9(a=="3W")e.12.Q.2W="7h";41=e.7e;40=e.7c;9(a=="3W")e.12.Q.2W="3W";e.12.3a(e)}});I p=="1I"?41:40}I v.3O(e,p)},3O:G(d,e,f){H g,2w=[],2u=[];G 3N(a){9(!v.V.1P)I P;H b=U.3r.3Z(a,S);I!b||b.4y("3N")==""}9(e=="1r"&&v.V.1h){g=v.1A(d.Q,"1r");I g==""?"1":g}9(e.1t(/4l/i))e=B;9(!f&&d.Q[e])g=d.Q[e];J 9(U.3r&&U.3r.3Z){9(e.1t(/4l/i))e="4l";e=e.1p(/([A-Z])/g,"-$1").2o();H h=U.3r.3Z(d,S);9(h&&!3N(d))g=h.4y(e);J{L(H a=d;a&&3N(a);a=a.12)2w.4w(a);L(a=0;a<2w.K;a++)9(3N(2w[a])){2u[a]=2w[a].Q.19;2w[a].Q.19="2Y"}g=e=="19"&&2u[2w.K-1]!=S?"2h":U.3r.3Z(d,S).4y(e)||"";L(a=0;a<2u.K;a++)9(2u[a]!=S)2w[a].Q.19=2u[a]}9(e=="1r"&&g=="")g="1"}J 9(d.4h){H i=e.1p(/\\-(\\w)/g,G(m,c){I c.25()});g=d.4h[e]||d.4h[i];9(!/^\\d+(2K)?$/i.14(g)&&/^\\d/.14(g)){H j=d.Q.1R;H k=d.4v.1R;d.4v.1R=d.4h.1R;d.Q.1R=g||0;g=d.Q.70+"2K";d.Q.1R=j;d.4v.1R=k}}I g},4C:G(a,e){H r=[];e=e||U;v.O(a,G(i,c){9(!c)I;9(c.1d==4Y)c=c.3u();9(1l c=="1F"){c=c.1p(/(<(\\w+)[^>]*?)\\/>/g,G(m,a,b){I b.1t(/^(6Z|9U|6W|9N|4c|9K|9G|39|9C|9z)$/i)?m:a+"></"+b+">"});H s=v.35(c).2o(),1w=e.5l("1w"),2q=[];H d=!s.1f("<9u")&&[1,"<2c>","</2c>"]||!s.1f("<9q")&&[1,"<6Q>","</6Q>"]||s.1t(/^<(9p|1J|9o|9m|9j)/)&&[1,"<1G>","</1G>"]||!s.1f("<4r")&&[2,"<1G><1J>","</1J></1G>"]||(!s.1f("<9h")||!s.1f("<9e"))&&[3,"<1G><1J><4r>","</4r></1J></1G>"]||!s.1f("<6W")&&[2,"<1G><1J></1J><6L>","</6L></1G>"]||v.V.1h&&[1,"1w<1w>","</1w>"]||[0,"",""];1w.3L=d[1]+c+d[2];22(d[0]--)1w=1w.5p;9(v.V.1h){9(!s.1f("<1G")&&s.1f("<1J")<0)2q=1w.1u&&1w.1u.3k;J 9(d[1]=="<1G>"&&s.1f("<1J")<0)2q=1w.3k;L(H n=2q.K-1;n>=0;--n)9(v.W(2q[n],"1J")&&!2q[n].3k.K)2q[n].12.3a(2q[n]);9(/^\\s/.14(c))1w.3e(e.6E(c.1t(/^\\s*/)[0]),1w.1u)}c=v.2p(1w.3k)}9(0===c.K&&(!v.W(c,"2X")&&!v.W(c,"2c")))I;9(c[0]==11||v.W(c,"2X")||c.Y)r.1b(c);J r=v.1S(r,c)});I r},1A:G(a,c,d){H e=v.49(a)?{}:v.5o;9(c=="24"&&v.V.1P)a.12.4x;9(e[c]){9(d!=11)a[e[c]]=d;I a[e[c]]}J 9(v.V.1h&&c=="Q")I v.1A(a.Q,"9a",d);J 9(d==11&&v.V.1h&&v.W(a,"2X")&&(c=="97"||c=="94"))I a.91(c).6x;J 9(a.36){9(d!=11){9(c=="N"&&v.W(a,"4c")&&a.12)6I"N 90 8Z\'t 8Y 8X";a.8W(c,d)}9(v.V.1h&&/6D|3g/.14(c)&&!v.49(a))I a.4p(c,2);I a.4p(c)}J{9(c=="1r"&&v.V.1h){9(d!=11){a.68=1;a.1D=(a.1D||"").1p(/6C\\([^)]*\\)/,"")+(3C(d).3u()=="8O"?"":"6C(1r="+d*6A+")")}I a.1D?(3C(a.1D.1t(/1r=([^)]*)/)[1])/6A).3u():""}c=c.1p(/-([a-z])/8N,G(z,b){I b.25()});9(d!=11)a[c]=d;I a[c]}},35:G(t){I(t||"").1p(/^\\s+|\\s+$/g,"")},2p:G(a){H r=[];9(1l a!="8M")L(H i=0,2g=a.K;i<2g;i++)r.1b(a[i]);J r=a.2O(0);I r},2C:G(b,a){L(H i=0,2g=a.K;i<2g;i++)9(a[i]==b)I i;I-1},1S:G(a,b){9(v.V.1h){L(H i=0;b[i];i++)9(b[i].1y!=8)a.1b(b[i])}J L(H i=0;b[i];i++)a.1b(b[i]);I a},4W:G(a){H r=[],28={};27{L(H i=0,6y=a.K;i<6y;i++){H b=v.M(a[i]);9(!28[b]){28[b]=R;r.1b(a[i])}}}29(e){r=a}I r},3j:G(a,b,c){9(1l b=="1F")b=3p("P||G(a,i){I "+b+"}");H d=[];L(H i=0,4t=a.K;i<4t;i++)9(!c&&b(a[i],i)||c&&!b(a[i],i))d.1b(a[i]);I d},21:G(a,b){9(1l b=="1F")b=3p("P||G(a){I "+b+"}");H c=[];L(H i=0,4t=a.K;i<4t;i++){H d=b(a[i],i);9(d!==S&&d!=11){9(d.1d!=1E)d=[d];c=c.8J(d)}}I c}});H A=8H.8G.2o();v.V={4d:(A.1t(/.+(?:8E|8C|8B|8A)[\\/: ]([\\d.]+)/)||[])[1],1P:/6v/.14(A),3f:/3f/.14(A),1h:/1h/.14(A)&&!/3f/.14(A),34:/34/.14(A)&&!/(8y|6v)/.14(A)};H B=v.V.1h?"4i":"5h";v.1m({5g:!v.V.1h||U.8x=="8w",4i:v.V.1h?"4i":"5h",5o:{"L":"8v","8u":"1n","4l":B,5h:B,4i:B,3L:"3L",1n:"1n",1Q:"1Q",3b:"3b",2R:"2R",8t:"8s",24:"24",8r:"8q"}});v.O({1C:"a.12",8p:"15.4f(a,\'12\')",8o:"15.2J(a,2,\'2l\')",8n:"15.2J(a,2,\'4e\')",8l:"15.4f(a,\'2l\')",8k:"15.4f(a,\'4e\')",8j:"15.5d(a.12.1u,a)",8h:"15.5d(a.1u)",6o:"15.W(a,\'8g\')?a.8e||a.8d.U:15.2p(a.3k)"},G(i,n){v.1a[i]=G(a){H b=v.21(6,n);9(a&&1l a=="1F")b=v.3n(a,b);I 6.2k(v.4W(b))}});v.O({5Q:"2Z",8c:"6g",3e:"6d",8b:"50",8a:"6H"},G(i,n){v.1a[i]=G(){H a=1q;I 6.O(G(){L(H j=0,2g=a.K;j<2g;j++)v(a[j])[n](6)})}});v.O({5U:G(a){v.1A(6,a,"");6.51(a)},89:G(c){v.1n.1g(6,c)},86:G(c){v.1n.2d(6,c)},85:G(c){v.1n[v.1n.3H(6,c)?"2d":"1g"](6,c)},2d:G(a){9(!a||v.1D(a,[6]).r.K){v.33(6);6.12.3a(6)}},4n:G(){v("*",6).O(G(){v.33(6)});22(6.1u)6.3a(6.1u)}},G(i,n){v.1a[i]=G(){I 6.O(n,1q)}});v.O(["84","5Y"],G(i,a){H n=a.2o();v.1a[n]=G(h){I 6[0]==18?v.V.1P&&3m["83"+a]||v.5g&&2V.38(U.37["5a"+a],U.1H["5a"+a])||U.1H["5a"+a]:6[0]==U?2V.38(U.1H["6m"+a],U.1H["6l"+a]):h==11?(6.K?v.17(6[0],n):S):6.17(n,h.1d==3U?h:h+"2K")}});H C=v.V.1P&&3y(v.V.4d)<82?"(?:[\\\\w*59-]|\\\\\\\\.)":"(?:[\\\\w\\81-\\80*59-]|\\\\\\\\.)",6j=1v 48("^>\\\\s*("+C+"+)"),6i=1v 48("^("+C+"+)(#)("+C+"+)"),6h=1v 48("^([#.]?)("+C+"*)");v.1m({55:{"":"m[2]==\'*\'||15.W(a,m[2])","#":"a.4p(\'1W\')==m[2]",":":{7Z:"i<m[3]-0",7Y:"i>m[3]-0",2J:"m[3]-0==i",6G:"m[3]-0==i",3w:"i==0",3v:"i==r.K-1",6f:"i%2==0",6e:"i%2","3w-47":"a.12.4g(\'*\')[0]==a","3v-47":"15.2J(a.12.5p,1,\'4e\')==a","7X-47":"!15.2J(a.12.5p,2,\'4e\')",1C:"a.1u",4n:"!a.1u",7W:"(a.6s||a.7V||15(a).2b()||\'\').1f(m[3])>=0",3R:\'"1N"!=a.N&&15.17(a,"19")!="2h"&&15.17(a,"4B")!="1N"\',1N:\'"1N"==a.N||15.17(a,"19")=="2h"||15.17(a,"4B")=="1N"\',7U:"!a.3b",3b:"a.3b",2R:"a.2R",24:"a.24||15.1A(a,\'24\')",2b:"\'2b\'==a.N",4m:"\'4m\'==a.N",5s:"\'5s\'==a.N",54:"\'54\'==a.N",53:"\'53\'==a.N",52:"\'52\'==a.N",6c:"\'6c\'==a.N",6b:"\'6b\'==a.N",2m:\'"2m"==a.N||15.W(a,"2m")\',4c:"/4c|2c|6a|2m/i.14(a.W)",3H:"15.1Y(m[3],a).K",7S:"/h\\\\d/i.14(a.W)",7R:"15.3j(15.32,G(1a){I a==1a.T;}).K"}},69:[/^(\\[) *@?([\\w-]+) *([!*$^~=]*) *(\'?"?)(.*?)\\4 *\\]/,/^(:)([\\w-]+)\\("?\'?(.*?(\\(.*?\\))?[^(]*?)"?\'?\\)/,1v 48("^([:.#]*)("+C+"+)")],3n:G(a,b,c){H d,2e=[];22(a&&a!=d){d=a;H f=v.1D(a,b,c);a=f.t.1p(/^\\s*,\\s*/,"");2e=c?b=f.r:v.1S(2e,f.r)}I 2e},1Y:G(t,a){9(1l t!="1F")I[t];9(a&&!a.1y)a=S;a=a||U;H b=[a],28=[],3v;22(t&&3v!=t){H r=[];3v=t;t=v.35(t);H d=P;H e=6j;H m=e.2S(t);9(m){H f=m[1].25();L(H i=0;b[i];i++)L(H c=b[i].1u;c;c=c.2l)9(c.1y==1&&(f=="*"||c.W.25()==f.25()))r.1b(c);b=r;t=t.1p(e,"");9(t.1f(" ")==0)6q;d=R}J{e=/^([>+~])\\s*(\\w*)/i;9((m=e.2S(t))!=S){r=[];H f=m[2],1S={};m=m[1];L(H j=0,31=b.K;j<31;j++){H n=m=="~"||m=="+"?b[j].2l:b[j].1u;L(;n;n=n.2l)9(n.1y==1){H g=v.M(n);9(m=="~"&&1S[g])23;9(!f||n.W.25()==f.25()){9(m=="~")1S[g]=R;r.1b(n)}9(m=="+")23}}b=r;t=v.35(t.1p(e,""));d=R}}9(t&&!d){9(!t.1f(",")){9(a==b[0])b.44();28=v.1S(28,b);r=b=[a];t=" "+t.67(1,t.K)}J{H h=6i;H m=h.2S(t);9(m){m=[0,m[2],m[3],m[1]]}J{h=6h;m=h.2S(t)}m[2]=m[2].1p(/\\\\/g,"");H k=b[b.K-1];9(m[1]=="#"&&k&&k.3S&&!v.49(k)){H l=k.3S(m[2]);9((v.V.1h||v.V.3f)&&l&&1l l.1W=="1F"&&l.1W!=m[2])l=v(\'[@1W="\'+m[2]+\'"]\',k)[0];b=r=l&&(!m[3]||v.W(l,m[3]))?[l]:[]}J{L(H i=0;b[i];i++){H o=m[1]=="#"&&m[3]?m[3]:m[1]!=""||m[0]==""?"*":m[2];9(o=="*"&&b[i].W.2o()=="5r")o="39";r=v.1S(r,b[i].4g(o))}9(m[1]==".")r=v.4Z(r,m[2]);9(m[1]=="#"){H p=[];L(H i=0;r[i];i++)9(r[i].4p("1W")==m[2]){p=[r[i]];23}r=p}b=r}t=t.1p(h,"")}}9(t){H q=v.1D(t,r);b=r=q.r;t=v.35(q.t)}}9(t)b=[];9(b&&a==b[0])b.44();28=v.1S(28,b);I 28},4Z:G(r,m,a){m=" "+m+" ";H b=[];L(H i=0;r[i];i++){H c=(" "+r[i].1n+" ").1f(m)>=0;9(!a&&c||a&&!c)b.1b(r[i])}I b},1D:G(t,r,b){H d;22(t&&t!=d){d=t;H p=v.69,m;L(H i=0;p[i];i++){m=p[i].2S(t);9(m){t=t.7N(m[0].K);m[2]=m[2].1p(/\\\\/g,"");23}}9(!m)23;9(m[1]==":"&&m[2]=="5S")r=v.1D(m[3],r,R).r;J 9(m[1]==".")r=v.4Z(r,m[2],b);J 9(m[1]=="["){H e=[],N=m[3];L(H i=0,31=r.K;i<31;i++){H a=r[i],z=a[v.5o[m[2]]||m[2]];9(z==S||/6D|3g|24/.14(m[2]))z=v.1A(a,m[2])||\'\';9((N==""&&!!z||N=="="&&z==m[5]||N=="!="&&z!=m[5]||N=="^="&&z&&!z.1f(m[5])||N=="$="&&z.67(z.K-m[5].K)==m[5]||(N=="*="||N=="~=")&&z.1f(m[5])>=0)^b)e.1b(a)}r=e}J 9(m[1]==":"&&m[2]=="2J-47"){H g={},e=[],14=/(\\d*)n\\+?(\\d*)/.2S(m[3]=="6f"&&"2n"||m[3]=="6e"&&"2n+1"||!/\\D/.14(m[3])&&"n+"+m[3]||m[3]),3w=(14[1]||1)-0,d=14[2]-0;L(H i=0,31=r.K;i<31;i++){H h=r[i],12=h.12,1W=v.M(12);9(!g[1W]){H c=1;L(H n=12.1u;n;n=n.2l)9(n.1y==1)n.4X=c++;g[1W]=R}H j=P;9(3w==1){9(d==0||h.4X==d)j=R}J 9((h.4X+d)%3w==0)j=R;9(j^b)e.1b(h)}r=e}J{H f=v.55[m[1]];9(1l f!="1F")f=v.55[m[1]][m[2]];f=3p("P||G(a,i){I "+f+"}");r=v.3j(r,f,b)}}I{r:r,t:t}},4f:G(a,b){H c=[];H d=a[b];22(d&&d!=U){9(d.1y==1)c.1b(d);d=d[b]}I c},2J:G(a,b,c,d){b=b||1;H e=0;L(;a;a=a[c])9(a.1y==1&&++e==b)23;I a},5d:G(n,a){H r=[];L(;n;n=n.2l){9(n.1y==1&&(!a||n!=a))r.1b(n)}I r}});v.1i={1g:G(b,c,d,e){9(v.V.1h&&b.43!=11)b=18;9(!d.2s)d.2s=6.2s++;9(e!=11){H f=d;d=G(){I f.16(6,1q)};d.M=e;d.2s=f.2s}H g=c.2t(".");c=g[0];d.N=g[1];H h=v.M(b,"2E")||v.M(b,"2E",{});H i=v.M(b,"2r",G(){H a;9(1l v=="11"||v.1i.4V)I a;a=v.1i.2r.16(b,1q);I a});H j=h[c];9(!j){j=h[c]={};9(b.4T)b.4T(c,i,P);J b.7M("42"+c,i)}j[d.2s]=d;6.1U[c]=R},2s:1,1U:{},2d:G(a,b,c){H d=v.M(a,"2E"),2N,4J;9(1l b=="1F"){H e=b.2t(".");b=e[0]}9(d){9(b&&b.N){c=b.4S;b=b.N}9(!b){L(b 1j d)6.2d(a,b)}J 9(d[b]){9(c)2G d[b][c.2s];J L(c 1j d[b])9(!e[1]||d[b][c].N==e[1])2G d[b][c];L(2N 1j d[b])23;9(!2N){9(a.4Q)a.4Q(b,v.M(a,"2r"),P);J a.7L("42"+b,v.M(a,"2r"));2N=S;2G d[b]}}L(2N 1j d)23;9(!2N){v.33(a,"2E");v.33(a,"2r")}}},1M:G(a,b,c,d,e){b=v.2p(b||[]);9(!c){9(6.1U[a])v("*").1g([18,U]).1M(a,b)}J{H f,2N,1a=v.1o(c[a]||S),4O=!b[0]||!b[0].2P;9(4O)b.4w(6.4N({N:a,2v:c}));b[0].N=a;9(v.1o(v.M(c,"2r")))f=v.M(c,"2r").16(c,b);9(!1a&&c["42"+a]&&c["42"+a].16(c,b)===P)f=P;9(4O)b.44();9(e&&e.16(c,b)===P)f=P;9(1a&&d!==P&&f!==P&&!(v.W(c,\'a\')&&a=="4M")){6.4V=R;c[a]()}6.4V=P}I f},2r:G(a){H b;a=v.1i.4N(a||18.1i||{});H d=a.N.2t(".");a.N=d[0];H c=v.M(6,"2E")&&v.M(6,"2E")[a.N],3t=1E.3x.2O.2I(1q,1);3t.4w(a);L(H j 1j c){3t[0].4S=c[j];3t[0].M=c[j].M;9(!d[1]||c[j].N==d[1]){H e=c[j].16(6,3t);9(b!==P)b=e;9(e===P){a.2P();a.3s()}}}9(v.V.1h)a.2v=a.2P=a.3s=a.4S=a.M=S;I b},4N:G(a){H c=a;a=v.1m({},c);a.2P=G(){9(c.2P)c.2P();c.7K=P};a.3s=G(){9(c.3s)c.3s();c.7J=R};9(!a.2v&&a.64)a.2v=a.64;9(v.V.1P&&a.2v.1y==3)a.2v=c.2v.12;9(!a.4L&&a.4K)a.4L=a.4K==a.2v?a.7H:a.4K;9(a.63==S&&a.62!=S){H e=U.37,b=U.1H;a.63=a.62+(e&&e.2U||b.2U||0);a.7E=a.7C+(e&&e.2A||b.2A||0)}9(!a.3Y&&(a.61||a.60))a.3Y=a.61||a.60;9(!a.5Z&&a.5X)a.5Z=a.5X;9(!a.3Y&&a.2m)a.3Y=(a.2m&1?1:(a.2m&2?3:(a.2m&4?2:0)));I a}};v.1a.1m({3T:G(a,b,c){I a=="5W"?6.2H(a,b,c):6.O(G(){v.1i.1g(6,a,c||b,c&&b)})},2H:G(b,c,d){I 6.O(G(){v.1i.1g(6,b,G(a){v(6).5L(a);I(d||c).16(6,1q)},d&&c)})},5L:G(a,b){I 6.O(G(){v.1i.2d(6,a,b)})},1M:G(a,b,c){I 6.O(G(){v.1i.1M(a,b,6,R,c)})},7y:G(a,b,c){9(6[0])I v.1i.1M(a,b,6[0],P,c)},2a:G(){H a=1q;I 6.4M(G(e){6.4I=0==6.4I?1:0;e.2P();I a[6.4I].16(6,[e])||P})},7w:G(f,g){G 4G(e){H p=e.4L;22(p&&p!=6)27{p=p.12}29(e){p=6};9(p==6)I P;I(e.N=="4F"?f:g).16(6,[e])}I 6.4F(4G).5T(4G)},2f:G(f){5P();9(v.3X)f.16(U,[v]);J v.3o.1b(G(){I f.16(6,[v])});I 6}});v.1m({3X:P,3o:[],2f:G(){9(!v.3X){v.3X=R;9(v.3o){v.O(v.3o,G(){6.16(U)});v.3o=S}9(v.V.34||v.V.3f)U.4Q("5R",v.2f,P);9(!18.7v.K)v(18).3d(G(){v("#4E").2d()})}}});v.O(("7u,7s,3d,7r,6m,5W,4M,7q,"+"7p,7n,7m,4F,5T,7l,2c,"+"52,7k,7j,7t,3V").2t(","),G(i,o){v.1a[o]=G(f){I f?6.3T(o,f):6.1M(o)}});H D=P;G 5P(){9(D)I;D=R;9(v.V.34||v.V.3f)U.4T("5R",v.2f,P);J 9(v.V.1h){U.7i("<7g"+"7f 1W=4E 7d=R "+"3g=//:><\\/1K>");H a=U.3S("4E");9(a)a.5V=G(){9(6.2z!="1k")I;v.2f()};a=S}J 9(v.V.1P)v.4H=43(G(){9(U.2z=="5O"||U.2z=="1k"){4A(v.4H);v.4H=S;v.2f()}},10);v.1i.1g(18,"3d",v.2f)}v.1a.1m({3d:G(c,d,e){9(v.1o(c))I 6.3T("3d",c);H f=c.1f(" ");9(f>=0){H g=c.2O(f,c.K);c=c.2O(0,f)}e=e||G(){};H h="4z";9(d)9(v.1o(d)){e=d;d=S}J{d=v.39(d);h="5N"}H i=6;v.3E({1c:c,N:h,M:d,1k:G(a,b){9(b=="1B"||b=="5M")i.4o(g?v("<1w/>").2Z(a.4u.1p(/<1K(.|\\s)*?\\/1K>/g,"")).1Y(g):a.4u);57(G(){i.O(e,[a.4u,b,a])},13)}});I 6},79:G(){I v.39(6.5K())},5K:G(){I 6.21(G(){I v.W(6,"2X")?v.2p(6.78):6}).1D(G(){I 6.2M&&!6.3b&&(6.2R||/2c|6a/i.14(6.W)||/2b|1N|53/i.14(6.N))}).21(G(i,b){H c=v(6).30();I c==S?S:c.1d==1E?v.21(c,G(a,i){I{2M:b.2M,1Q:a}}):{2M:b.2M,1Q:c}}).1V()}});v.O("5J,5I,6t,5H,5G,5F".2t(","),G(i,o){v.1a[o]=G(f){I 6.3T(o,f)}});H E=(1v 3B).3A();v.1m({1V:G(a,b,c,d){9(v.1o(b)){c=b;b=S}I v.3E({N:"4z",1c:a,M:b,1B:c,1X:d})},77:G(a,b){I v.1V(a,S,b,"1K")},76:G(a,b,c){I v.1V(a,b,c,"46")},75:G(a,b,c,d){9(v.1o(b)){c=b;b={}}I v.3E({N:"5N",1c:a,M:b,1B:c,1X:d})},74:G(a){v.1m(v.56,a)},56:{1U:R,N:"4z",2y:0,5E:"73/x-72-2X-71",6n:R,3c:R,M:S},3Q:{},3E:G(s){H c,2B=/=(\\?|%3F)/g,1s,M;s=v.1m(R,s,v.1m(R,{},v.56,s));9(s.M&&s.6n&&1l s.M!="1F")s.M=v.39(s.M);9(s.1X=="4b"){9(s.N.2o()=="1V"){9(!s.1c.1t(2B))s.1c+=(s.1c.1t(/\\?/)?"&":"?")+(s.4b||"5D")+"=?"}J 9(!s.M||!s.M.1t(2B))s.M=(s.M?s.M+"&":"")+(s.4b||"5D")+"=?";s.1X="46"}9(s.1X=="46"&&(s.M&&s.M.1t(2B)||s.1c.1t(2B))){c="4b"+E++;9(s.M)s.M=s.M.1p(2B,"="+c);s.1c=s.1c.1p(2B,"="+c);s.1X="1K";18[c]=G(a){M=a;1B();1k();18[c]=11;27{2G 18[c]}29(e){}}}9(s.1X=="1K"&&s.1L==S)s.1L=P;9(s.1L===P&&s.N.2o()=="1V")s.1c+=(s.1c.1t(/\\?/)?"&":"?")+"59="+(1v 3B()).3A();9(s.M&&s.N.2o()=="1V"){s.1c+=(s.1c.1t(/\\?/)?"&":"?")+s.M;s.M=S}9(s.1U&&!v.5c++)v.1i.1M("5J");9(!s.1c.1f("8f")&&s.1X=="1K"){H d=U.4g("9T")[0];H f=U.5l("1K");f.3g=s.1c;9(!c&&(s.1B||s.1k)){H g=P;f.9Q=f.5V=G(){9(!g&&(!6.2z||6.2z=="5O"||6.2z=="1k")){g=R;1B();1k();d.3a(f)}}}d.58(f);I}H h=P;H i=18.6X?1v 6X("9P.9M"):1v 6V();i.9L(s.N,s.1c,s.3c);9(s.M)i.5A("9I-9H",s.5E);9(s.5y)i.5A("9F-5x-9D",v.3Q[s.1c]||"9B, 9A 9y 9x 5w:5w:5w 9w");i.5A("X-9v-9r","6V");9(s.6T)s.6T(i);9(s.1U)v.1i.1M("5F",[i,s]);H j=G(a){9(!h&&i&&(i.2z==4||a=="2y")){h=R;9(k){4A(k);k=S}1s=a=="2y"&&"2y"||!v.6S(i)&&"3V"||s.5y&&v.6R(i,s.1c)&&"5M"||"1B";9(1s=="1B"){27{M=v.6w(i,s.1X)}29(e){1s="5j"}}9(1s=="1B"){H b;27{b=i.5u("6P-5x")}29(e){}9(s.5y&&b)v.3Q[s.1c]=b;9(!c)1B()}J v.5t(s,i,1s);1k();9(s.3c)i=S}};9(s.3c){H k=43(j,13);9(s.2y>0)57(G(){9(i){i.9n();9(!h)j("2y")}},s.2y)}27{i.9l(s.M)}29(e){v.5t(s,i,S,e)}9(!s.3c)j();I i;G 1B(){9(s.1B)s.1B(M,1s);9(s.1U)v.1i.1M("5G",[i,s])}G 1k(){9(s.1k)s.1k(i,1s);9(s.1U)v.1i.1M("6t",[i,s]);9(s.1U&&!--v.5c)v.1i.1M("5I")}},5t:G(s,a,b,e){9(s.3V)s.3V(a,b,e);9(s.1U)v.1i.1M("5H",[a,s,e])},5c:0,6S:G(r){27{I!r.1s&&9k.9i=="54:"||(r.1s>=6O&&r.1s<9g)||r.1s==6N||v.V.1P&&r.1s==11}29(e){}I P},6R:G(a,b){27{H c=a.5u("6P-5x");I a.1s==6N||c==v.3Q[b]||v.V.1P&&a.1s==11}29(e){}I P},6w:G(r,a){H b=r.5u("9d-N");H c=a=="6M"||!a&&b&&b.1f("6M")>=0;H d=c?r.9c:r.4u;9(c&&d.37.36=="5j")6I"5j";9(a=="1K")v.5f(d);9(a=="46")d=3p("("+d+")");I d},39:G(a){H s=[];9(a.1d==1E||a.4a)v.O(a,G(){s.1b(3h(6.2M)+"="+3h(6.1Q))});J L(H j 1j a)9(a[j]&&a[j].1d==1E)v.O(a[j],G(){s.1b(3h(j)+"="+3h(6))});J s.1b(3h(j)+"="+3h(a[j]));I s.65("&").1p(/%20/g,"+")}});v.1a.1m({1x:G(a,b){I a?6.1T({1I:"1x",2Q:"1x",1r:"1x"},a,b):6.1D(":1N").O(G(){6.Q.19=6.3i?6.3i:"";9(v.17(6,"19")=="2h")6.Q.19="2Y"}).2F()},1z:G(a,b){I a?6.1T({1I:"1z",2Q:"1z",1r:"1z"},a,b):6.1D(":3R").O(G(){6.3i=6.3i||v.17(6,"19");9(6.3i=="2h")6.3i="2Y";6.Q.19="2h"}).2F()},6K:v.1a.2a,2a:G(a,b){I v.1o(a)&&v.1o(b)?6.6K(a,b):a?6.1T({1I:"2a",2Q:"2a",1r:"2a"},a,b):6.O(G(){v(6)[v(6).3l(":1N")?"1x":"1z"]()})},99:G(a,b){I 6.1T({1I:"1x"},a,b)},98:G(a,b){I 6.1T({1I:"1z"},a,b)},96:G(a,b){I 6.1T({1I:"2a"},a,b)},95:G(a,b){I 6.1T({1r:"1x"},a,b)},93:G(a,b){I 6.1T({1r:"1z"},a,b)},92:G(a,b,c){I 6.1T({1r:b},a,c)},1T:G(g,h,i,j){H k=v.6J(h,i,j);I 6[k.3q===P?"O":"3q"](G(){k=v.1m({},k);H f=v(6).3l(":1N"),3m=6;L(H p 1j g){9(g[p]=="1z"&&f||g[p]=="1x"&&!f)I v.1o(k.1k)&&k.1k.16(6);9(p=="1I"||p=="2Q"){k.19=v.17(6,"19");k.2D=6.Q.2D}}9(k.2D!=S)6.Q.2D="1N";k.3J=v.1m({},g);v.O(g,G(a,b){H e=1v v.2j(3m,k,a);9(/2a|1x|1z/.14(b))e[b=="2a"?f?"1x":"1z":b](g);J{H c=b.3u().1t(/^([+-]=)?([\\d+-.]+)(.*)$/),1O=e.2e(R)||0;9(c){H d=3C(c[2]),2i=c[3]||"2K";9(2i!="2K"){3m.Q[a]=(d||1)+2i;1O=((d||1)/e.2e(R))*1O;3m.Q[a]=1O+2i}9(c[1])d=((c[1]=="-="?-1:1)*d)+1O;e.3I(1O,d,2i)}J e.3I(1O,b,"")}});I R})},3q:G(a,b){9(v.1o(a)){b=a;a="2j"}9(!a||(1l a=="1F"&&!b))I F(6[0],a);I 6.O(G(){9(b.1d==1E)F(6,a,b);J{F(6,a).1b(b);9(F(6,a).K==1)b.16(6)}})},9f:G(){H a=v.32;I 6.O(G(){L(H i=0;i<a.K;i++)9(a[i].T==6)a.6F(i--,1)}).5q()}});H F=G(a,b,c){9(!a)I;H q=v.M(a,b+"3q");9(!q||c)q=v.M(a,b+"3q",c?v.2p(c):[]);I q};v.1a.5q=G(a){a=a||"2j";I 6.O(G(){H q=F(6,a);q.44();9(q.K)q[0].16(6)})};v.1m({6J:G(a,b,c){H d=a&&a.1d==8V?a:{1k:c||!c&&b||v.1o(a)&&a,26:a,3M:c&&b||b&&b.1d!=8U&&b};d.26=(d.26&&d.26.1d==4Y?d.26:{8T:8S,8R:6O}[d.26])||8Q;d.3K=d.1k;d.1k=G(){v(6).5q();9(v.1o(d.3K))d.3K.16(6)};I d},3M:{6B:G(p,n,a,b){I a+b*p},5v:G(p,n,a,b){I((-2V.9s(p*2V.9t)/2)+0.5)*b+a}},32:[],2j:G(a,b,c){6.Y=b;6.T=a;6.1e=c;9(!b.3G)b.3G={}}});v.2j.3x={4k:G(){9(6.Y.2L)6.Y.2L.16(6.T,[6.2x,6]);(v.2j.2L[6.1e]||v.2j.2L.6z)(6);9(6.1e=="1I"||6.1e=="2Q")6.T.Q.19="2Y"},2e:G(a){9(6.T[6.1e]!=S&&6.T.Q[6.1e]==S)I 6.T[6.1e];H r=3C(v.3O(6.T,6.1e,a));I r&&r>-8L?r:3C(v.17(6.T,6.1e))||0},3I:G(b,c,d){6.5n=(1v 3B()).3A();6.1O=b;6.2F=c;6.2i=d||6.2i||"2K";6.2x=6.1O;6.4q=6.4s=0;6.4k();H e=6;G t(){I e.2L()}t.T=6.T;v.32.1b(t);9(v.32.K==1){H f=43(G(){H a=v.32;L(H i=0;i<a.K;i++)9(!a[i]())a.6F(i--,1);9(!a.K)4A(f)},13)}},1x:G(){6.Y.3G[6.1e]=v.1A(6.T.Q,6.1e);6.Y.1x=R;6.3I(0,6.2e());9(6.1e=="2Q"||6.1e=="1I")6.T.Q[6.1e]="8K";v(6.T).1x()},1z:G(){6.Y.3G[6.1e]=v.1A(6.T.Q,6.1e);6.Y.1z=R;6.3I(6.2e(),0)},2L:G(){H t=(1v 3B()).3A();9(t>6.Y.26+6.5n){6.2x=6.2F;6.4q=6.4s=1;6.4k();6.Y.3J[6.1e]=R;H a=R;L(H i 1j 6.Y.3J)9(6.Y.3J[i]!==R)a=P;9(a){9(6.Y.19!=S){6.T.Q.2D=6.Y.2D;6.T.Q.19=6.Y.19;9(v.17(6.T,"19")=="2h")6.T.Q.19="2Y"}9(6.Y.1z)6.T.Q.19="2h";9(6.Y.1z||6.Y.1x)L(H p 1j 6.Y.3J)v.1A(6.T.Q,p,6.Y.3G[p])}9(a&&v.1o(6.Y.1k))6.Y.1k.16(6.T);I P}J{H n=t-6.5n;6.4s=n/6.Y.26;6.4q=v.3M[6.Y.3M||(v.3M.5v?"5v":"6B")](6.4s,n,0,1,6.Y.26);6.2x=6.1O+((6.2F-6.1O)*6.4q);6.4k()}I R}};v.2j.2L={2U:G(a){a.T.2U=a.2x},2A:G(a){a.T.2A=a.2x},1r:G(a){v.1A(a.T.Q,"1r",a.2x)},6z:G(a){a.T.Q[a.1e]=a.2x+a.2i}};v.1a.6l=G(){H b=0,3P=0,T=6[0],5m;9(T)8I(v.V){H c=v.17(T,"2W")=="4D",1C=T.12,1Z=T.1Z,2T=T.3D,4j=1P&&3y(4d)<9J;9(T.6U){5z=T.6U();1g(5z.1R+2V.38(2T.37.2U,2T.1H.2U),5z.3P+2V.38(2T.37.2A,2T.1H.2A));9(1h){H d=v("4o").17("8F");d=(d=="8D"||v.5g&&3y(4d)>=7)&&2||d;1g(-d,-d)}}J{1g(T.5C,T.5B);22(1Z){1g(1Z.5C,1Z.5B);9(34&&/^t[d|h]$/i.14(1C.36)||!4j)d(1Z);9(4j&&!c&&v.17(1Z,"2W")=="4D")c=R;1Z=1Z.1Z}22(1C.36&&!/^1H|4o$/i.14(1C.36)){9(!/^9R|1G-9S.*$/i.14(v.17(1C,"19")))1g(-1C.2U,-1C.2A);9(34&&v.17(1C,"2D")!="3R")d(1C);1C=1C.12}9(4j&&c)1g(-2T.1H.5C,-2T.1H.5B)}5m={3P:3P,1R:b}}I 5m;G d(a){1g(v.17(a,"8z"),v.17(a,"9V"))}G 1g(l,t){b+=3y(l)||0;3P+=3y(t)||0}}})();',62,616,'||||||this|||if|||||||||||||||||||||||||||||||||function|var|return|else|length|for|data|type|each|false|style|true|null|elem|document|browser|nodeName||options|||undefined|parentNode||test|jQuery|apply|css|window|display|fn|push|url|constructor|prop|indexOf|add|msie|event|in|complete|typeof|extend|className|isFunction|replace|arguments|opacity|status|match|firstChild|new|div|show|nodeType|hide|attr|success|parent|filter|Array|string|table|body|height|tbody|script|cache|trigger|hidden|start|safari|value|left|merge|animate|global|get|id|dataType|find|offsetParent||map|while|break|selected|toUpperCase|duration|try|done|catch|toggle|text|select|remove|cur|ready|al|none|unit|fx|pushStack|nextSibling|button||toLowerCase|makeArray|tb|handle|guid|split|swap|target|stack|now|timeout|readyState|scrollTop|jsre|inArray|overflow|events|end|delete|one|call|nth|px|step|name|ret|slice|preventDefault|width|checked|exec|doc|scrollLeft|Math|position|form|block|append|val|rl|timers|removeData|mozilla|trim|tagName|documentElement|max|param|removeChild|disabled|async|load|insertBefore|opera|src|encodeURIComponent|oldblock|grep|childNodes|is|self|multiFilter|readyList|eval|queue|defaultView|stopPropagation|args|toString|last|first|prototype|parseInt|domManip|getTime|Date|parseFloat|ownerDocument|ajax||orig|has|custom|curAnim|old|innerHTML|easing|color|curCSS|top|lastModified|visible|getElementById|bind|String|error|static|isReady|which|getComputedStyle|oWidth|oHeight|on|setInterval|shift|ol|json|child|RegExp|isXMLDoc|jquery|jsonp|input|version|previousSibling|dir|getElementsByTagName|currentStyle|styleFloat|safari2|update|float|radio|empty|html|getAttribute|pos|tr|state|el|responseText|runtimeStyle|unshift|selectedIndex|getPropertyValue|GET|clearInterval|visibility|clean|absolute|__ie_init|mouseover|handleHover|safariTimer|lastToggle|index|fromElement|relatedTarget|click|fix|evt|andSelf|removeEventListener|cloneNode|handler|addEventListener|prevObject|triggered|unique|nodeIndex|Number|classFilter|after|removeAttribute|submit|password|file|expr|ajaxSettings|setTimeout|appendChild|_|client|win|active|sibling|deep|globalEval|boxModel|cssFloat|wrapAll|parsererror|evalScript|createElement|results|startTime|props|lastChild|dequeue|object|checkbox|handleError|getResponseHeader|swing|00|Modified|ifModified|box|setRequestHeader|offsetTop|offsetLeft|callback|contentType|ajaxSend|ajaxSuccess|ajaxError|ajaxStop|ajaxStart|serializeArray|unbind|notmodified|POST|loaded|bindReady|appendTo|DOMContentLoaded|not|mouseout|removeAttr|onreadystatechange|unload|ctrlKey|Width|metaKey|keyCode|charCode|clientX|pageX|srcElement|join|outerHTML|substr|zoom|parse|textarea|reset|image|before|odd|even|prepend|quickClass|quickID|quickChild|execScript|offset|scroll|processData|contents|uuid|continue|setArray|textContent|ajaxComplete|clone|webkit|httpData|nodeValue|fl|_default|100|linear|alpha|href|createTextNode|splice|eq|replaceWith|throw|speed|_toggle|colgroup|xml|304|200|Last|fieldset|httpNotModified|httpSuccess|beforeSend|getBoundingClientRect|XMLHttpRequest|col|ActiveXObject|init|abbr|pixelLeft|urlencoded|www|application|ajaxSetup|post|getJSON|getScript|elements|serialize|instanceof|hasClass|clientWidth|defer|clientHeight|ipt|scr|relative|write|keypress|keydown|change|mousemove|mouseup|right|mousedown|dblclick|resize|focus|keyup|blur|frames|hover|offsetWidth|triggerHandler|offsetHeight|border|padding|clientY|Left|pageY|Right|Bottom|toElement|Top|cancelBubble|returnValue|detachEvent|attachEvent|substring|line|weight|font|animated|header|size|enabled|innerText|contains|only|gt|lt|uFFFF|u0128|417|inner|Height|toggleClass|removeClass|noConflict|wrap|addClass|replaceAll|insertAfter|prependTo|contentWindow|contentDocument|http|iframe|children|wrapInner|siblings|prevAll|nextAll|Boolean|prev|next|parents|maxLength|maxlength|readOnly|readonly|class|htmlFor|CSS1Compat|compatMode|compatible|borderLeftWidth|ie|ra|it|medium|rv|borderWidth|userAgent|navigator|with|concat|1px|10000|array|ig|NaN|reverse|400|fast|600|slow|Function|Object|setAttribute|changed|be|can|property|getAttributeNode|fadeTo|fadeOut|method|fadeIn|slideToggle|action|slideUp|slideDown|cssText|option|responseXML|content|th|stop|300|td|protocol|cap|location|send|colg|abort|tfoot|thead|leg|With|cos|PI|opt|Requested|GMT|1970|Jan|area|01|Thu|hr|Since|specified|If|meta|Type|Content|522|link|open|XMLHTTP|img|attributes|Microsoft|onload|inline|row|head|br|borderTopWidth'.split('|'),0,{})); //------------

var agt    = navigator.userAgent.toLowerCase();
var appVer = navigator.appVersion.toLowerCase();
var osys;
if (appVer.toLowerCase().indexOf("win")!=-1) {
  osys = "win";
}

if (appVer.toLowerCase().indexOf("mac")!=-1) {
  osys = "mac";
}

var verInt = parseInt(appVer);
var ie     = (appVer.indexOf('msie') != -1);
var opera  = (agt.indexOf("opera") != -1);
var mozilla = ((agt.indexOf('mozilla')!=-1) && (agt.indexOf('opera')==-1) && (agt.indexOf('spoofer')==-1) && (agt.indexOf('compatible') == -1) && (agt.indexOf('webtv')==-1) && (agt.indexOf('hotjava')==-1));	
var netscape =(agt.indexOf('netscape')!=-1)
    
var ie = (document.all)? true:false;
var ns4 = (document.layers)? true:false;
var ns6 = (document.getElementById)? true:false;
 //------------

/***********************************************************************
 * YAV - Yet Another Validator  v1.4.0                                 *
 * Copyright (C) 2005-2006-2007                                        *
 * Author: Federico Crivellaro <f.crivellaro@gmail.com>                *
 * WWW: http://yav.sourceforge.net                                     *
 *                                                                     *
 * This library is free software; you can redistribute it and/or       *
 * modify it under the terms of the GNU Lesser General Public          *
 * License as published by the Free Software Foundation; either        *
 * version 2.1 of the License, or (at your option) any later version.  *
 *                                                                     *
 * This library is distributed in the hope that it will be useful,     *
 * but WITHOUT ANY WARRANTY; without even the implied warranty of      *
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU   *
 * Lesser General Public License for more details.                     *
 *                                                                     *
 * You should have received a copy of the GNU Lesser General Public    *
 * License along with this library; if not, write to the Free Software *
 * Foundation, Inc.,59 Temple Place,Suite 330,Boston,MA 02111-1307 USA *
 *                                                                     *
 * last revision:  14 OCT 2007                                         *
 ***********************************************************************/

//------------------------------------------------------------ PUBLIC FUNCTIONS
var undef;
var isFocusSet;
var internalRules;
function performCheck(formName, strRules, alertType) {
    isFocusSet = false;
    var rules = makeRules(strRules);
    internalRules = makeRules(strRules);
    this.f = document.forms[formName];
    if( !this.f ) {
        debug('DEBUG: could not find form object ' + formName);
        return null;
    }
    var errors = new Array();
    var ix = 0;
    if (rules.length) {
        for(var i=0; i<rules.length; i++) {
            var aRule = rules[i];
            if (aRule!=null) {
                highlight(getField(f, aRule.el), inputclassnormal);
            }
        }
    } else {
        if (rules!=null) {
            highlight(getField(f, rules.el), inputclassnormal);
        }
    }
    if (rules.length) {
        for(var i=0; i<rules.length; i++) {
            var aRule = rules[i];
            var anErr = null;
            if (aRule==null) {
                //do nothing
            } else if (aRule.ruleType=='pre-condition' || aRule.ruleType=='post-condition' || aRule.ruleType=='andor-operator') {
                //do nothing
            } else if (aRule.ruleName=='implies') {
                pre  = aRule.el;
                post = aRule.comparisonValue;
				
                var oldClassName = getField(f, rules[pre].el).className;
                if ( checkRule(f, rules[pre])==null && checkRule(f, rules[post])!=null ) {
                    anErr = deleteInline(aRule.alertMsg) + '__inline__'+rules[post].el;
                } else if ( checkRule(f, rules[pre])!=null ) {
                    getField(f, rules[pre].el).className = oldClassName;
                }
            } else {
                anErr = checkRule(f, aRule);
            }
            if ( anErr!=null ) {
                errors[ix] = anErr;
                ix++;
            }
        }//for
    } else {
        var myRule = rules;
        err = checkRule(f, myRule);
        if ( err!=null ) {
            errors[0] = err;
        }
    }
    return displayAlert(errors, alertType);
}

function checkKeyPress(ev, obj, strRules) {
    var keyCode = null;
    if ( getBrowser()=='msie' ) {
        keyCode = window.event.keyCode;
    } else if ( getBrowser()=='netscape' || getBrowser()=='firefox' ) {
        keyCode = ev.which;
    }
    var rules = makeRules(strRules);
    var keyAllowed = true;
    if (rules.length) {
        for(var i=0; i<rules.length; i++) {
            var aRule = rules[i];
            if (aRule.ruleName=='keypress' && aRule.el==obj.name) {
                keyAllowed = isKeyAllowed(keyCode, aRule.comparisonValue);
                break;
            }
        }
    } else {
        var aRule = rules;
        if (aRule.ruleName=='keypress' && aRule.el==obj.name) {
            keyAllowed = isKeyAllowed(keyCode, aRule.comparisonValue);
        }
    }
    if (!keyAllowed) {
        if ( getBrowser()=='msie' ) {
            window.event.keyCode=0;
        } else if ( getBrowser()=='netscape' || getBrowser()=='firefox' ) {
            ev.preventDefault();
            ev.stopPropagation();
            ev.returnValue=false;
        }
    }
    return false;
}

//------------------------------------------------------------ PRIVATE FUNCTIONS

function displayAlert(messages, alertType) {
    var retval =null;
    clearAllInlineDivs();
    if (alertType=='classic') {
        retval = displayClassic(messages);
    } else if (alertType=='innerHtml') {
        retval = displayInnerHtml(messages);
    }else if (alertType=='inline') {
        retval = displayInline(messages);
    }else if (alertType=='jsVar') {
        retval = displayJsVar(messages);
    } else {
        debug('DEBUG: alert type ' + alertType + ' not supported');
    }
    return retval;
}

function displayClassic(messages) {
    var str = '';
    if ( messages!=null && messages.length>0 ) {
    	if (strTrim(HEADER_MSG).length > 0) {
            str += HEADER_MSG + '\n\n';
        }
        for (var i=0; i<messages.length; i++) {
            str += ' ' + deleteInline(messages[i]) + '\n';
        }
    	if (strTrim(FOOTER_MSG).length > 0) {
            str += '\n' + FOOTER_MSG;
        }
        alert(str);
        return false;
    } else {
    	return true;
    }
}

function displayInnerHtml(messages) {
    if ( messages!=null && messages.length>0 ) {
        var str = '';
    	if (strTrim(HEADER_MSG).length > 0) {
            str += HEADER_MSG;
        }
        str += '<ul>';
        for (var i=0; i<messages.length; i++) {
            str += '<li>'+deleteInline(messages[i])+'</li>';
        }
        str += '</ul>';
    	if (strTrim(FOOTER_MSG).length > 0) {
            str += FOOTER_MSG;
        }
        document.getElementById(errorsdiv).innerHTML = str;
        document.getElementById(errorsdiv).className = innererror;
        document.getElementById(errorsdiv).style.display = 'block';
        return false;
    } else {
        document.getElementById(errorsdiv).innerHTML = '';
        document.getElementById(errorsdiv).className = '';
        document.getElementById(errorsdiv).style.display = 'none';
        return true;
    }
}

function displayInline(messages) {
    if ( messages!=null && messages.length>0 ) {
        var genericErrors = new Array();
        var genericErrIndex = 0;
        for (var i=0; i<messages.length; i++) {
            var elName = messages[i].substring(messages[i].indexOf('__inline__')+10);
            if ( document.getElementById(errorsdiv+'_'+elName) ) {
                document.getElementById(errorsdiv+'_'+elName).innerHTML = deleteInline(messages[i]);
                document.getElementById(errorsdiv+'_'+elName).className = innererror;
                document.getElementById(errorsdiv+'_'+elName).style.display = 'block';
            } else {
                genericErrors[genericErrIndex] = messages[i];
                genericErrIndex++;
            }
        }
        if (genericErrIndex>0) {
            displayInnerHtml(genericErrors);
        }
        return false;
    } else {
        return true;
    }
}

function clearAllInlineDivs() {
    var allDivs = document.getElementsByTagName("div");
    for (var j=0; j<allDivs.length; j++) {
        var idName = allDivs[j].id;
        if ( idName.indexOf(errorsdiv+'_')==0 ) {
            document.getElementById(idName).innerHTML = '';
            document.getElementById(idName).className = '';
            document.getElementById(idName).style.display = 'none';
        }
    }
}

function displayJsVar(messages) {
    document.getElementById(errorsdiv).className = '';
    document.getElementById(errorsdiv).style.display = 'none';
    if ( messages!=null && messages.length>0 ) {
        for (var i=0; i<messages.length; i++) {
            messages[i] = deleteInline(messages[i]);
        }
        var str = '';
        str += '<script>var jsErrors;</script>';
        document.getElementById(errorsdiv).innerHTML = str;
        jsErrors = messages;
        return false;
    } else {
        document.getElementById(errorsdiv).innerHTML = '<script>var jsErrors;</script>';
        return true;
    }
}

function rule(el, ruleName, comparisonValue, alertMsg, ruleType) {
    if ( !checkArguments(arguments) ) {
        return false;
    }
    tmp = el.split(':');
    nameDisplayed = '';
    if (tmp.length == 2) {
        nameDisplayed = tmp[1];
        el = tmp[0];
    }
    this.el = el;
    this.nameDisplayed = nameDisplayed;
    this.ruleName = ruleName;
    this.comparisonValue = comparisonValue;
    this.ruleType = ruleType;
    if (alertMsg==undef || alertMsg==null) {
        this.alertMsg = getDefaultMessage(el, nameDisplayed, ruleName, comparisonValue)+'__inline__'+this.el;
    } else {
        this.alertMsg = alertMsg+'__inline__'+this.el;
    }
}

function checkRule(f, myRule) {
    retVal = null;
    if (myRule != null) {
        if (myRule.ruleName=='custom') {
            var customFunction = ' retVal = ' + myRule.el;
            eval(customFunction);
        } else if (myRule.ruleName=='and') {
            var op_1 = myRule.el;
            var op_next = myRule.comparisonValue;
            if ( checkRule(f, internalRules[op_1])!=null ) {
                retVal = myRule.alertMsg;
                if (myRule.ruleType=='pre-condition' || myRule.ruleType=='andor-operator') {
                    //highlight(getField(f, internalRules[op_1].el), inputclasserror);
                }
            } else {
                var op_k = op_next.split('-');
                for(var k=0; k<op_k.length; k++) {
                    if ( checkRule(f, internalRules[op_k[k]])!=null ) {
                        retVal = myRule.alertMsg;
                        if (myRule.ruleType=='pre-condition' || myRule.ruleType=='andor-operator') {
                            //highlight(getField(f, internalRules[op_k[k]].el), inputclasserror);
                        }
                        break;
                    }
                }
            }
        } else if (myRule.ruleName=='or') {
            var op_1 = myRule.el;
            var op_next = myRule.comparisonValue;
            var success = false;
            if ( checkRule(f, internalRules[op_1])==null ) {
                success = true;
            } else {
                if (myRule.ruleType=='pre-condition' || myRule.ruleType=='andor-operator') {
                    //highlight(getField(f, internalRules[op_1].el), inputclasserror);
                }
                var op_k = op_next.split('-');
                for(var k=0; k<op_k.length; k++) {
                    if ( checkRule(f, internalRules[op_k[k]])==null ) {
                        success = true;
                        break;
                    } else {
                        if (myRule.ruleType=='pre-condition' || myRule.ruleType=='andor-operator') {
                            //highlight(getField(f, internalRules[op_k[k]].el), inputclasserror);
                        }
                    }
                }
            }
            if (success) {
                highlight(getField(f, internalRules[op_1].el), inputclassnormal);
                var op_k = op_next.split('-');
                for(var k=0; k<op_k.length; k++) {
                    highlight(getField(f, internalRules[op_k[k]].el), inputclassnormal);
                }
            } else {
                retVal = myRule.alertMsg;
            }
        } else {
            el = getField(f, myRule.el);
            if (el == null) {
                debug('DEBUG: could not find element ' + myRule.el);
                return null;
            }
            var err = null;
            if(el.type) {
                if(el.type=='hidden'||el.type=='text'||el.type=='password'||el.type=='textarea') {
                    err = checkText(el, myRule);
                } else if(el.type=='checkbox') {
                    err = checkCheckbox(el, myRule);
                } else if(el.type=='select-one') {
                    err = checkSelOne(el, myRule);
                } else if(el.type=='select-multiple') {
                    err = checkSelMul(el, myRule);
                } else if(el.type=='radio') {
                    err = checkRadio(el, myRule);
                } else {
                    debug('DEBUG: type '+ el.type +' not supported');
                }
            } else {
                err = checkRadio(el, myRule);
            }
            retVal = err;
        }
    }
    return retVal;
}

function checkArguments(args) {
    if (args.length < 4) {
        debug('DEBUG: rule requires four arguments at least');
        return false;
    } else if (args[0]==null || args[1]==null) {
        debug('DEBUG: el and ruleName are required');
        return false;
    }
    return true;
}

function checkRadio(el, myRule) {
    var err = null;
    if (myRule.ruleName=='required') {
        var radios = el;
	    var found=false;
	    if (isNaN(radios.length) && radios.checked) {
	    	found=true;
	    } else {
		    for(var j=0; j < radios.length; j++) {
		        if(radios[j].checked) {
		            found=true;
		            break;
		        }
		    }
		}
        if( !found ) {
            highlight(el, inputclasserror);
            err = myRule.alertMsg;
        }
    } else if (myRule.ruleName=='equal') {
        var radios = el;
	    var found=false;
	    if (isNaN(radios.length) && radios.checked) {
	    	if (radios.value==myRule.comparisonValue) {
	    	    found=true;
	    	}
	    } else {
		    for(var j=0; j < radios.length; j++) {
		        if(radios[j].checked) {
        	    	if (radios[j].value==myRule.comparisonValue) {
        	    	    found=true;
                        break;
        	    	}
		        }
		    }
		}
        if( !found ) {
            err = myRule.alertMsg;
        }
    } else if (myRule.ruleName=='notequal') {
        var radios = el;
	    var found=false;
	    if (isNaN(radios.length) && radios.checked) {
	    	if (radios.value!=myRule.comparisonValue) {
	    	    found=true;
	    	}
	    } else {
		    for(var j=0; j < radios.length; j++) {
		        if(radios[j].checked) {
        	    	if (radios[j].value!=myRule.comparisonValue) {
        	    	    found=true;
                        break;
        	    	}
		        }
		    }
		}
        if( !found ) {
            err = myRule.alertMsg;
        }
    } else {
        debug('DEBUG: rule ' + myRule.ruleName + ' not supported for radio');
    }
    return err;
}

function checkText(el, myRule) {
    err = null;
    if (trimenabled) {
    	el.value = strTrim(el.value);
    }
    if (myRule.ruleName=='required') {
        if ( el.value==null || el.value=='' ) {
            highlight(el, inputclasserror);
            err = myRule.alertMsg;
        }
    } else if (myRule.ruleName=='equal') {
        err = checkEqual(el, myRule);
    } else if (myRule.ruleName=='notequal') {
        err = checkNotEqual(el, myRule);
    } else if (myRule.ruleName=='numeric') {
        reg = new RegExp("^[0-9]*$");
        if ( !reg.test(el.value) ) {
            highlight(el, inputclasserror);
            err = myRule.alertMsg;
        }
    } else if (myRule.ruleName=='alphabetic') {
        reg = new RegExp("^[A-Za-z]*$");
        if ( !reg.test(el.value) ) {
            highlight(el, inputclasserror);
            err = myRule.alertMsg;
        }
    } else if (myRule.ruleName=='alphanumeric') {
        reg = new RegExp("^[A-Za-z0-9]*$");
        if ( !reg.test(el.value) ) {
            highlight(el, inputclasserror);
            err = myRule.alertMsg;
        }
    } else if (myRule.ruleName=='alnumhyphen') {
        reg = new RegExp("^[A-Za-z0-9\-_]*$");
        if ( !reg.test(el.value) ) {
            highlight(el, inputclasserror);
            err = myRule.alertMsg;
        }
    } else if (myRule.ruleName=='alnumhyphenat') {
        reg = new RegExp("^[A-Za-z0-9\-_@]*$");
        if ( !reg.test(el.value) ) {
            highlight(el, inputclasserror);
            err = myRule.alertMsg;
        }
    } else if (myRule.ruleName=='alphaspace') {
        reg = new RegExp("^[A-Za-z0-9\-_ \n\r\t]*$");
        if ( !reg.test(el.value) ) {
            highlight(el, inputclasserror);
            err = myRule.alertMsg;
        }
    } else if (myRule.ruleName=='email') {
        reg = new RegExp("^(([0-9a-zA-Z]+[-._+&])*[0-9a-zA-Z]+@([-0-9a-zA-Z]+[.])+[a-zA-Z]{2,6}){0,1}$");
        if ( !reg.test(el.value) ) {
            highlight(el, inputclasserror);
            err = myRule.alertMsg;
        }
    } else if (myRule.ruleName=='maxlength') {
        if ( isNaN(myRule.comparisonValue) ) {
            debug('DEBUG: comparisonValue for rule ' + myRule.ruleName + ' not a number');
        }else if ( el.value.length > myRule.comparisonValue ) {
            highlight(el, inputclasserror);
            err = myRule.alertMsg;
        }
    } else if (myRule.ruleName=='minlength') {
        if ( isNaN(myRule.comparisonValue) ) {
            debug('DEBUG: comparisonValue for rule ' + myRule.ruleName + ' not a number');
        } else if ( el.value.length < myRule.comparisonValue ) {
            highlight(el, inputclasserror);
            err = myRule.alertMsg;
        }
    } else if (myRule.ruleName=='numrange') {
        reg = new RegExp("^[-+]{0,1}[0-9]*[.]{0,1}[0-9]*$");
        if ( !reg.test(unformatNumber(el.value)) ) {
            highlight(el, inputclasserror);
            err = myRule.alertMsg;
        } else {
            regRange = new RegExp("^[0-9]+-[0-9]+$"); 
            if ( !regRange.test(myRule.comparisonValue) ) {
                debug('DEBUG: comparisonValue for rule ' + myRule.ruleName + ' not in format number1-number2');
            } else {
                rangeVal = myRule.comparisonValue.split('-');
                if (eval(unformatNumber(el.value))<eval(rangeVal[0]) || eval(unformatNumber(el.value))>eval(rangeVal[1])) {
                    highlight(el, inputclasserror); 
                    err = myRule.alertMsg;
                }
            }
        }
    } else if (myRule.ruleName=='regexp') {
        reg = new RegExp(myRule.comparisonValue);
        if ( !reg.test(el.value) ) {
            highlight(el, inputclasserror);
            err = myRule.alertMsg;
        }
    } else if (myRule.ruleName=='integer') {
        err = checkInteger(el, myRule);
    } else if (myRule.ruleName=='double') {
        err = checkDouble(el, myRule);
    } else if (myRule.ruleName=='date') {
        err = checkDate(el, myRule);
    } else if (myRule.ruleName=='date_lt') {
        err = checkDateLessThan(el, myRule, false);
    } else if (myRule.ruleName=='date_le') {
        err = checkDateLessThan(el, myRule, true);
    } else if (myRule.ruleName=='keypress') {
        // do nothing
    } else if (myRule.ruleName=='empty') {
        if ( el.value!=null && el.value!='' ) {
            highlight(el, inputclasserror);
            err = myRule.alertMsg;
        }
    } else {
        debug('DEBUG: rule ' + myRule.ruleName + ' not supported for ' + el.type);
    }
    return err;
}

function checkInteger(el, myRule) {
    reg = new RegExp("^[-+]{0,1}[0-9]*$");
    if ( !reg.test(el.value) ) {
        highlight(el, inputclasserror);
        return myRule.alertMsg;
    }
}

function checkDouble(el, myRule) {
    var sep = DECIMAL_SEP;
    reg = new RegExp("^[-+]{0,1}[0-9]*[" + sep + "]{0,1}[0-9]*$");
    if ( !reg.test(el.value) ) {
        highlight(el, inputclasserror);
        return myRule.alertMsg;
    }
}

function checkDate(el, myRule) {
    error = null;
    if (el.value!='') {
        var dateFormat = DATE_FORMAT;
        ddReg = new RegExp("dd");
        MMReg = new RegExp("MM");
        yyyyReg = new RegExp("yyyy");
        if ( !ddReg.test(dateFormat) || !MMReg.test(dateFormat) || !yyyyReg.test(dateFormat)  ) {
            debug('DEBUG: locale format ' + dateFormat + ' not supported');
        } else {
            ddStart = dateFormat.indexOf('dd');
            MMStart = dateFormat.indexOf('MM');
            yyyyStart = dateFormat.indexOf('yyyy');
        }
        strReg = dateFormat.replace('dd','[0-9]{2}').replace('MM','[0-9]{2}').replace('yyyy','[0-9]{4}');
        reg = new RegExp("^" + strReg + "$");
        if ( !reg.test(el.value) ) {
            highlight(el, inputclasserror);
            error = myRule.alertMsg;
        } else {
            dd   = el.value.substring(ddStart, ddStart+2);
            MM   = el.value.substring(MMStart, MMStart+2);
            yyyy = el.value.substring(yyyyStart, yyyyStart+4);
            if ( !checkddMMyyyy(dd, MM, yyyy) ) {
                highlight(el, inputclasserror);
                error = myRule.alertMsg;
            }
        }
    }
    return error;
}

function checkDateLessThan(el, myRule, isEqualAllowed) {
    error = null;
    var isDate = checkDate(el, myRule)==null ? true : false;
    if ( isDate && el.value!='' ) {
        var dateFormat = DATE_FORMAT;
        ddStart = dateFormat.indexOf('dd');
        MMStart = dateFormat.indexOf('MM');
        yyyyStart = dateFormat.indexOf('yyyy');
        dd   = el.value.substring(ddStart, ddStart+2);
        MM   = el.value.substring(MMStart, MMStart+2);
        yyyy = el.value.substring(yyyyStart, yyyyStart+4);
        myDate = "" + yyyy + MM + dd;
        strReg = dateFormat.replace('dd','[0-9]{2}').replace('MM','[0-9]{2}').replace('yyyy','[0-9]{4}');
        reg = new RegExp("^" + strReg + "$");
        var isMeta = myRule.comparisonValue.indexOf('$')==0 
            ? true
            : false;
        var comparisonDate = '';
        if (isMeta) {
            toSplit = myRule.comparisonValue.substr(1);
            tmp = toSplit.split(':');
            if (tmp.length == 2) {
                comparisonDate = this.getField(f, tmp[0]).value;
            } else {
                comparisonDate = this.getField(f, myRule.comparisonValue.substr(1)).value;
            }
        } else {
            comparisonDate = myRule.comparisonValue;
        }
        if ( !reg.test(comparisonDate) ) {
            highlight(el, inputclasserror);
            error = myRule.alertMsg;
        } else {
            cdd   = comparisonDate.substring(ddStart, ddStart+2);
            cMM   = comparisonDate.substring(MMStart, MMStart+2);
            cyyyy = comparisonDate.substring(yyyyStart, yyyyStart+4);
            cDate = "" + cyyyy + cMM + cdd;
            if (isEqualAllowed) {
                if ( !checkddMMyyyy(cdd, cMM, cyyyy) || myDate>cDate ) {
                    highlight(el, inputclasserror);
                    error = myRule.alertMsg;
                }
            } else {
                if ( !checkddMMyyyy(cdd, cMM, cyyyy) || myDate>=cDate ) {
                    highlight(el, inputclasserror);
                    error = myRule.alertMsg;
                }
            }
        }
    } else {
        if ( el.value!='' ) {
            highlight(el, inputclasserror);
            error = myRule.alertMsg;
        }
    }
    return error;
}

function checkEqual(el, myRule) {
    error = null;
    var isMeta = myRule.comparisonValue.indexOf('$')==0 
        ? true
        : false;
    var comparisonVal = '';
    if (isMeta) {
        toSplit = myRule.comparisonValue.substr(1);
        tmp = toSplit.split(':');
        if (tmp.length == 2) {
            comparisonVal = this.getField(f, tmp[0]).value;
        } else {
            comparisonVal = this.getField(f, myRule.comparisonValue.substr(1)).value;
        }
    } else {
        comparisonVal = myRule.comparisonValue;
    }
    if ( el.value!=comparisonVal ) {
        highlight(el, inputclasserror);
        error = myRule.alertMsg;
    }
    return error;
}

function checkNotEqual(el, myRule) {
    error = null;
    var isMeta = myRule.comparisonValue.indexOf('$')==0 
        ? true
        : false;
    var comparisonVal = '';
    if (isMeta) {
        toSplit = myRule.comparisonValue.substr(1);
        tmp = toSplit.split(':');
        if (tmp.length == 2) {
            comparisonVal = this.getField(f, tmp[0]).value;
        } else {
            comparisonVal = this.getField(f, myRule.comparisonValue.substr(1)).value;
        }
    } else {
        comparisonVal = myRule.comparisonValue;
    }
    if ( el.value==comparisonVal ) {
        highlight(el, inputclasserror);
        error = myRule.alertMsg;
    }
    return error;
}

function checkddMMyyyy(dd, MM, yyyy) {
    retVal = true;
    if (    (dd<1) || (dd>31) || (MM<1) || (MM>12) ||
            (dd==31 && (MM==2 || MM==4 || MM==6 || MM==9 || MM==11) ) ||
            (dd >29 && MM==2) ||
            (dd==29 && (MM==2) && ((yyyy%4 > 0) || (yyyy%4==0 && yyyy%100==0 && yyyy%400>0 )) )) {
       retVal = false;
    }
    return retVal;
}

function checkCheckbox(el, myRule) {
    if (myRule.ruleName=='required') {
        if ( !el.checked ) {
            highlight(el, inputclasserror);
            return myRule.alertMsg;
        }
    } else if (myRule.ruleName=='equal') {
        if ( !el.checked || el.value!=myRule.comparisonValue ) {
            highlight(el, inputclasserror);
            return myRule.alertMsg;
        }
    } else if (myRule.ruleName=='notequal') {
        if ( !el.checked || el.value==myRule.comparisonValue ) {
            highlight(el, inputclasserror);
            return myRule.alertMsg;
        }
    } else {
        debug('DEBUG: rule ' + myRule.ruleName + ' not supported for ' + el.type);
    }
}

function checkSelOne(el, myRule) {
    if (myRule.ruleName=='required') {
        var found = false;
        var inx = el.selectedIndex;
        if(inx>=0 && el.options[inx].value) {
            found = true;
        }
        if ( !found ) {
            highlight(el, inputclasserror);
            return myRule.alertMsg;
        }
    } else if (myRule.ruleName=='equal') {
        var found = false;
        var inx = el.selectedIndex;
        if(inx>=0 && el.options[inx].value==myRule.comparisonValue) {
            found = true;
        }
        if ( !found ) {
            highlight(el, inputclasserror);
            return myRule.alertMsg;
        }
    } else if (myRule.ruleName=='notequal') {
        var found = false;
        var inx = el.selectedIndex;
        if(inx>=0 && el.options[inx].value!=myRule.comparisonValue) {
            found = true;
        }
        if ( !found ) {
            highlight(el, inputclasserror);
            return myRule.alertMsg;
        }
    } else {
        debug('DEBUG: rule ' + myRule.ruleName + ' not supported for ' + el.type);
    }
}

function checkSelMul(el, myRule) {
    if (myRule.ruleName=='required') {
        var found = false;
        opts = el.options;
        for(var i=0; i<opts.length; i++) {
            if(opts[i].selected && opts[i].value) {
                found = true;
                break;
            }
        }
        if ( !found ) {
            highlight(el, inputclasserror);
            return myRule.alertMsg;
        }
    } else if (myRule.ruleName=='equal') {
        var found = false;
        opts = el.options;
        for(var i=0; i<opts.length; i++) {
            if(opts[i].selected && opts[i].value==myRule.comparisonValue) {
                found = true;
                break;
            }
        }
        if ( !found ) {
            highlight(el, inputclasserror);
            return myRule.alertMsg;
        }
    } else if (myRule.ruleName=='notequal') {
        var found = false;
        opts = el.options;
        for(var i=0; i<opts.length; i++) {
            if(opts[i].selected && opts[i].value!=myRule.comparisonValue) {
                found = true;
                break;
            }
        }
        if ( !found ) {
            highlight(el, inputclasserror);
            return myRule.alertMsg;
        }
    } else {
        debug('DEBUG: rule ' + myRule.ruleName + ' not supported for ' + el.type);
    }
}

function debug(msg) {
   if (debugmode) {
        alert(msg);
   }
}

function strTrim(str) {
    return str.replace(/^\s+/,'').replace(/\s+$/,'');
}

function makeRules(strRules) {
    var rules=new Array();
    if (strRules.length) {
        for(var i=0; i<strRules.length; i++) {
            rules[i] = splitRule(strRules[i]);
        }
    } else {
        rules[0] = splitRule(strRules);
    }
    return rules;
}

function splitRule(strRule) {
    var retval = null;
    if (strRule!=undef) {
        params = strRule.split(RULE_SEP);
        switch (params.length) {
            case 2:
                retval = new rule(params[0], params[1], null, null, null);
                break;
            case 3:
                if (threeParamRule(params[1])) {
                    retval = new rule(params[0], params[1], params[2], null, null);
                } else if (params[2]=='pre-condition' || params[2]=='post-condition' || params[2]=='andor-operator') {
                    retval = new rule(params[0], params[1], null, 'foo', params[2]);
                } else {
                    retval = new rule(params[0], params[1], null, params[2], null);
                }
                break;
            case 4:
                if (threeParamRule(params[1]) && (params[3]=='pre-condition' || params[3]=='post-condition' || params[3]=='andor-operator')) {
                    retval = new rule(params[0], params[1], params[2], 'foo', params[3]);
                } else {
                    retval = new rule(params[0], params[1], params[2], params[3], null);
                }
                break;
            default:
                debug('DEBUG: wrong definition of rule');
        }
    }
    return retval;
}

function threeParamRule(ruleName) {
    return (ruleName=='equal' || ruleName=='notequal' || ruleName=='minlength' || ruleName=='maxlength' || ruleName=='date_lt' || ruleName=='date_le' || ruleName=='implies' || ruleName=='regexp' || ruleName=='numrange' || ruleName=='keypress' || ruleName=='and' || ruleName=='or')
        ? true
        : false;
}

function highlight(el, clazz) {
    if (!isFocusSet && clazz==inputclasserror) {
        el.focus();
        isFocusSet = true;
    }
    if (el!=undef && inputhighlight) {
        if ( multipleclassname ) {
            highlightMultipleClassName(el, clazz);
        } else {
            el.className = clazz;
        }        
    }
}

function highlightMultipleClassName(el, clazz) {
    re = new RegExp("\\s*("+inputclassnormal+"|"+inputclasserror+")");
    el.className = strTrim (
    ( (typeof el.className != "undefined")
        ? el.className.replace(re, "")
        : ""
    ) + " " + clazz );
}

function getDefaultMessage(el, nameDisplayed, ruleName, comparisonValue) {
    if (nameDisplayed.length == 0) {
        nameDisplayed = el;
    }
    var msg = DEFAULT_MSG;
    if (ruleName=='required') {
        msg = REQUIRED_MSG.replace('{1}', nameDisplayed);
    } else if (ruleName=='minlength') {
        msg = MINLENGTH_MSG.replace('{1}', nameDisplayed).replace('{2}', comparisonValue);
    } else if (ruleName=='maxlength') {
        msg = MAXLENGTH_MSG.replace('{1}', nameDisplayed).replace('{2}', comparisonValue);
    } else if (ruleName=='numrange') {
        msg = NUMRANGE_MSG.replace('{1}', nameDisplayed).replace('{2}', comparisonValue);
    } else if (ruleName=='date') {
        msg = DATE_MSG.replace('{1}', nameDisplayed);
    } else if (ruleName=='numeric') {
        msg = NUMERIC_MSG.replace('{1}', nameDisplayed);
    } else if (ruleName=='integer') {
        msg = INTEGER_MSG.replace('{1}', nameDisplayed);
    } else if (ruleName=='double') {
        msg = DOUBLE_MSG.replace('{1}', nameDisplayed);
    } else if (ruleName=='equal') {
        msg = EQUAL_MSG.replace('{1}', nameDisplayed).replace('{2}', getComparisonDisplayed(comparisonValue));
    } else if (ruleName=='notequal') {
        msg = NOTEQUAL_MSG.replace('{1}', nameDisplayed).replace('{2}', getComparisonDisplayed(comparisonValue));
    } else if (ruleName=='alphabetic') {
        msg = ALPHABETIC_MSG.replace('{1}', nameDisplayed);
    } else if (ruleName=='alphanumeric') {
        msg = ALPHANUMERIC_MSG.replace('{1}', nameDisplayed);
    } else if (ruleName=='alnumhyphen') {
        msg = ALNUMHYPHEN_MSG.replace('{1}', nameDisplayed);
    } else if (ruleName=='alnumhyphenat') {
        msg = ALNUMHYPHENAT_MSG.replace('{1}', nameDisplayed);
    } else if (ruleName=='alphaspace') {
        msg = ALPHASPACE_MSG.replace('{1}', nameDisplayed);
    } else if (ruleName=='email') {
        msg = EMAIL_MSG.replace('{1}', nameDisplayed);
    } else if (ruleName=='regexp') {
        msg = REGEXP_MSG.replace('{1}', nameDisplayed).replace('{2}', comparisonValue);
    } else if (ruleName=='date_lt') {
        msg = DATE_LT_MSG.replace('{1}', nameDisplayed).replace('{2}', getComparisonDisplayed(comparisonValue));
    } else if (ruleName=='date_le') {
        msg = DATE_LE_MSG.replace('{1}', nameDisplayed).replace('{2}', getComparisonDisplayed(comparisonValue));
    } else if (ruleName=='empty') {
        msg = EMPTY_MSG.replace('{1}', nameDisplayed);
    }
    return msg;
}

function getComparisonDisplayed(comparisonValue) {
    comparisonDisplayed = comparisonValue;
    if (comparisonValue.substring(0, 1)=='$') {
        comparisonValue = comparisonValue.substring(1, comparisonValue.length);
        tmp = comparisonValue.split(':');
        if (tmp.length == 2) {
            comparisonDisplayed = tmp[1];
        } else {
            comparisonDisplayed = comparisonValue;
        }
    }
    return comparisonDisplayed;
}

function getBrowser() {
    brs=navigator.userAgent.toLowerCase();
    var retval;
    if (brs.search(/msie\s(\d+(\.?\d)*)/)!=-1) {
        retval='msie';
    } else if (brs.search(/netscape[\/\s](\d+([\.-]\d)*)/)!=-1) {
        retval='netscape';
    } else if (brs.search(/firefox[\/\s](\d+([\.-]\d)*)/)!=-1) {
        retval='firefox';
    } else {
        retval='unknown';
    }
    return retval;
}

function isKeyAllowed(keyCode, charsAllowed) {
    retval = false;
    var aCharCode;
    if (keyCode==8) {
        retval = true;
    } else {
        for(var i=0; i<charsAllowed.length; i++) {
            aCharCode = charsAllowed.charCodeAt(i);
            if (aCharCode==keyCode) {
                retval = true;
                break;
            }
        }
    }
    return retval;
}

function getField(formObj, fieldName){
	var retval = null;
	if (formObj.elements[fieldName]){
		retval = formObj.elements[fieldName];
	}else if (document.getElementById(fieldName)){
		retval = document.getElementById(fieldName);
	}
	return retval;
}

function unformatNumber(viewValue){
    var retval = viewValue.replace(THOUSAND_SEP, ""); 
    retval = retval.replace(DECIMAL_SEP, ".");
    return retval;
}

function deleteInline(msg) {
    if (msg.indexOf('__inline__')==-1) {
        return msg;
    } else {
        return msg.substring(0, msg.indexOf('__inline__'));
    }
}
//end
 //------------

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}('2.28.1l({1y:9(v,w){3 x=2.1l({1f:"27",20:1r,1N:"",2y:"i",2q:"h",16:"c",2b:12,26:"|",23:12},w);3 v=2.1l({T:"T",1s:"1U, 1R 1M",U:"2x",Q:"p",1F:"2n",1j:"",1i:""},v);I(3 y 15 x){2c[y]=x[y]}3 z=Y X("2a","29","25","24","22","21","1Z","1Y","1X","1W","1T","1S","1Q","1O","1L","1K","1J","1H","2w","2v","2u");9 1b(o){3 l=Y X();3 n=Y X();3 p="";5(2(o).1k("1A")){2("2m, 2j, 2i",o).1G(9(){m=6.1g.2d(/\\{.*\\}/);5(m!=E){$(6).C("J",m);6.1g=6.1g.1x(/\\{.*\\}/,"")}3 b={};14{b=F("("+$(6).C("J")+")");b=(4 b=="8")?{}:b}13(e){}3 c=1b(6);I(3 j=0;j<c.D;j++){14{3 d=b.1e;3 f=b.H;5(4 d!="8"){5(4 d.S!="8"){d=[d]}3 g="";I(3 i=0;i<d.D;i++){5(4 n[d[i].S]!="8"){n[d[i].S].L.M(((g=="")?g=l.M(c[j]):g)-1);5(4 f!="8"&&f=="1u-1e"){n[d[i].S].V=n[d[i].S].L.D-1}}O{n[d[i].S]={7:((4 d[i].7=="8")?6.7:d[0].7),11:d[i].11,N:d[i].N,L:[((g=="")?g=l.M(c[j]):g)-1],H:((4 d[i].H=="8")?E:d[i].H),G:((4 d[i].G!="8")?d[i].G:E),V:((4 f!="8"&&f=="1u-1e")?0:E)}}}}O{l.M(c[j])}}13(e){5(c[j]!=E){l.M(c[j])}}}5(c[0]!=E&&4(b.1q)!="8"){6.1p=c;3 h=9(){1d();3 a=$(6).1P("1A");5(!1n(a[0].7,6.1p,"1o")){1c(a[0])}};3 k=b.1q.1x(" ","").1V(",");I(3 e=0;e<k.D;e++){$(6).1w(k[e],h)}}});3 q="";I(3 r 15 n){5(n[r].G==E){5(n[r].V!=E){n[r].L.M(n[r].L[n[r].V]);n[r].L.1I(n[r].V,1)}n[r].L=n[r].L.1v();q=n[r].L.1t()+"|"+n[r].11+"|"+10(n[r].L,"-")+"|"+((n[r].H==E)?"{7:\'"+n[r].7+"\',N:\'"+n[r].N+"\'}":n[r].H);n[r].1m=l.M(q)-1}}I(3 r 15 n){5(n[r].G!=E){n[r].G=n[r].G.1v();q=n[n[r].G.1t()].1m+"|"+n[r].11+"|";I(3 i=0;i<n[r].G.D;i++){n[r].G[i]=n[n[r].G[i]].1m}q+=10(n[r].G,"-")+"|"+((n[r].H==E)?"{7:\'"+n[r].7+"\',N:\'"+n[r].N+"\'}":n[r].H);l.M(q)}}K l}O{3 s=Y X();3 t=0;I(3 i=0;i<z.D;i++){5(2(o).1k("."+z[i])){14{p=W(o,z[i],(2(o).C("1a")),((4 F("("+2(o).C("J")+")").P!="8"&&4 F("("+2(o).C("J")+")").P[0]=="19")?F("("+2(o).C("J")+")").P[t]:F("("+2(o).C("J")+")").P),F("("+2(o).C("J")+")").H)}13(e){p=W(o,z[i],(2(o).C("1a")))}s.M(p);t++}}3 u;I(u 15 2.18){5(2(o).1k("."+u)){14{p=W(o,"2.18."+u,(2(o).C("1a")),((4 F("("+2(o).C("J")+")").P[0]=="19")?F("("+2(o).C("J")+")").P[t]:F("("+2(o).C("J")+")").P),F("("+2(o).C("J")+")").H)}13(e){p=W(o,"2.18."+u,(2(o).C("1a")))}s.M(p);t++}}}K((s.D>0)?s:[E])}9 W(o,a,b,c,d){5(4 c!="8"&&4 c!="19"){c=[c]}O{5(4 c=="8"){c=[]}}5(a.2s("2.1y")>=0){K a+"({7:\'"+o.7+"\',N:\'"+b+"\'"+((4(d)=="8")?"":",H:\'"+d+"\'")+"}"+((c.D==0)?"":",")+10(c,",")+")|1E"}O{K o.7+"|"+a+"|"+((c.D>0)?(10(c,"-")+"|"):"")+((4(d)=="8")?"{7:\'"+o.7+"\',N:\'"+b+"\'}":d)}}9 10(a,b){3 c="";I(3 i=0;i<a.D;i++){c+=((b=="-")?"":"\'")+a[i]+((b=="-")?"":"\'")+b}K c.2r(0,c.D-1)}9 1c(o){3 a=Y X();2(v.Q+"."+v.U,o).1h();2("#"+v.T).1D("<"+v.Q+" 1B=\'"+v.U+"\'>"+v.1s+"</"+v.Q+">");I(3 i=0;i<17.D;i++){R=(4(17[i])=="19")?17[i]:F("("+17[i]+")");5(4 a[R.7]=="8"&&4 R.H=="8"){a[R.7]=1;1C="2(\'#"+R.7+"\')."+v.1F+"(\\"<"+v.Q+" 1B=\'"+v.U+"\'>"+R.N+"</"+v.Q+">\\")";F(1C);2("#"+R.7).2l(16)}}5(2("#"+v.T).2k()>0){2("#"+v.T)[0].2o(12)}}9 1d(){2("#"+x.1f).1h();2("#"+v.T).1D("");2(v.Q+"."+v.U,6).1h();2("2p").2h("<1z 7=\'"+x.1f+"\'></1z>");2("."+x.16).2g(x.16)}2.18=v.1E;K 6.1G(9(){1b(6);2(6).1w("2t",9(){1d();3 a=1b(6);5(a.D==0||1n(6.7,a,"1o")){K((4 v.1i=="9")?v.1i(6):12)}O{1c(6);K((4 v.1j=="9")?v.1j(6):1r)}})})}});5(4(Z)=="9"){2.Z=Z;Z=9(A){5(4(A)=="2f"){K 2.Z(A)}O{K A}}}O{9 2e(B,A){}}',62,159,'||jQuery|var|typeof|if|this|id|undefined|function|||||||||||||||||||||||||||||attr|length|null|eval|group|require|for|alt|return|indexes|push|msg|else|params|errorTag|objError|name|errorDiv|errorClass|postcondition|createRule|Array|new|deleteInline|strParams|type|true|catch|try|in|inputclasserror|jsErrors|yav_customfunctions|object|title|setRules|showErrors|resetMsgs|condition|errorsdiv|className|remove|onOk|onError|is|extend|rule_index|performCheck|jsVar|yavrules|event|false|errorMessage|pop|post|reverse|bind|replace|yav|div|form|class|evalText|html|custom|errorPosition|each|numeric|splice|notequal|minlength|maxlength|correct|DEFAULT_MSG|keypress|parents|integer|please|equal|empty|ERROR|split|email|double|date_lt|date_le|debugmode|date|alphaspace|multipleclassname|alphanumeric|alphabetic|RULE_SEP|yavDiv|fn|alnumhyphenat|alnumhyphen|trimenabled|window|match|highlight|string|removeClass|append|select|textarea|size|addClass|input|before|scrollIntoView|body|inputhighlight|substr|indexOf|submit|required|regexp|numrange|error|inputclassnormal'.split('|'),0,{})) //------------

/**
 * jCarouselLite - jQuery plugin to navigate images/any content in a carousel style widget.
 * @requires jQuery v1.1.3.1 or above
 *
 * http://gmarwaha.com/jquery/jcarousellite/
 *
 * Copyright (c) 2007 Ganeshji Marwaha (gmarwaha.com)
 * Dual licensed under the MIT and GPL licenses:
 * http://www.opensource.org/licenses/mit-license.php
 * http://www.gnu.org/licenses/gpl.html
 *
 * Version: 1.0
 */

/**
 * Creates a carousel-style navigation widget for images/any-content from a simple HTML markup.
 *
 * The HTML markup that is used to build the carousel can be as simple as...
 *
 *  <div class="carousel">
 *      <ul>
 *          <li><img src="image/1.jpg" alt="1"></li>
 *          <li><img src="image/2.jpg" alt="2"></li>
 *          <li><img src="image/3.jpg" alt="3"></li>
 *      </ul>
 *  </div>
 *
 * As you can see, this snippet is nothing but a simple div containing an unordered list of images.
 * You don't need any special "class" attribute, or a special "css" file for this plugin.
 * I am using a class attribute just for the sake of explanation here.
 *
 * To navigate the elements of the carousel, you need some kind of navigation buttons.
 * For example, you will need a "previous" button to go backward, and a "next" button to go forward.
 * This need not be part of the carousel "div" itself. It can be any element in your page.
 * Lets assume that the following elements in your document can be used as next, and prev buttons...
 *
 * <button class="prev">&lt;&lt;</button>
 * <button class="next">&gt;&gt;</button>
 *
 * Now, all you need to do is call the carousel component on the div element that represents it, and pass in the
 * navigation buttons as options.
 *
 * $(".carousel").jCarouselLite({
 *      btnNext: ".next",
 *      btnPrev: ".prev"
 * });
 *
 * That's it, you would have now converted your raw div, into a magnificient carousel.
 *
 * There are quite a few other options that you can use to customize it though.
 * Each will be explained with an example below.
 *
 * @param an options object - You can specify all the options shown below as an options object param.
 *
 * @option btnPrev, btnNext : string - no defaults
 * @example
 * $(".carousel").jCarouselLite({
 *      btnNext: ".next",
 *      btnPrev: ".prev"
 * });
 * @desc Creates a basic carousel. Clicking "btnPrev" navigates backwards and "btnNext" navigates forward.
 *
 * @option btnGo - array - no defaults
 * @example
 * $(".carousel").jCarouselLite({
 *      btnNext: ".next",
 *      btnPrev: ".prev",
 *      btnGo: [".0", ".1", ".2"]
 * });
 * @desc If you don't want next and previous buttons for navigation, instead you prefer custom navigation based on
 * the item number within the carousel, you can use this option. Just supply an array of selectors for each element
 * in the carousel. The index of the array represents the index of the element. What i mean is, if the
 * first element in the array is ".0", it means that when the element represented by ".0" is clicked, the carousel
 * will slide to the first element and so on and so forth. This feature is very powerful. For example, i made a tabbed
 * interface out of it by making my navigation elements styled like tabs in css. As the carousel is capable of holding
 * any content, not just images, you can have a very simple tabbed navigation in minutes without using any other plugin.
 * The best part is that, the tab will "slide" based on the provided effect. :-)
 *
 * @option mouseWheel : boolean - default is false
 * @example
 * $(".carousel").jCarouselLite({
 *      mouseWheel: true
 * });
 * @desc The carousel can also be navigated using the mouse wheel interface of a scroll mouse instead of using buttons. 
 * To get this feature working, you have to do 2 things. First, you have to include the mouse-wheel plugin from brandon.
 * Second, you will have to set the option "mouseWheel" to true. That's it, now you will be able to navigate your carousel
 * using the mouse wheel. Using buttons and mouseWheel or not mutually exclusive. You can still have buttons for navigation
 * as well. They complement each other. To use both together, just supply the options required for both as shown below.
 * @example
 * $(".carousel").jCarouselLite({
 *      btnNext: ".next",
 *      btnPrev: ".prev",
 *      mouseWheel: true
 * });
 *
 * @option auto : number - default is null, meaning autoscroll is disabled by default
 * @example
 * $(".carousel").jCarouselLite({
 *      auto: 800,
 *      speed: 500
 * });
 * @desc You can make your carousel auto-navigate itself by specfying a millisecond value in this option. 
 * The value you specify is the amount of time between 2 slides. The default is null, and that disables auto scrolling.
 * Specify this value and magically your carousel will start auto scrolling. 
 *
 * @option speed : number - 200 is default
 * @example
 * $(".carousel").jCarouselLite({
 *      btnNext: ".next",
 *      btnPrev: ".prev",
 *      speed: 800
 * });
 * @desc Specifying a speed will slow-down or speed-up the sliding speed of your carousel. Try it out with
 * different speeds like 800, 600, 1500 etc. Providing 0, will remove the slide effect.
 * 
 * @option easing : string - no easing effects by default.
 * @example
 * $(".carousel").jCarouselLite({
 *      btnNext: ".next",
 *      btnPrev: ".prev",
 *      easing: "bounceout"
 * }); 
 * @desc You can specify any easing effect. Note: You need easing plugin for that. Once specified,
 * the carousel will slide based on the provided easing effect. 
 *
 * @option vertical : boolean - default is false
 * @example
 * $(".carousel").jCarouselLite({
 *      btnNext: ".next",
 *      btnPrev: ".prev",
 *      vertical: true
 * });
 * @desc Determines the direction of the carousel. true, means the carousel will display vertically. The next and
 * prev buttons will slide the items vertically as well. The default is false, which means that the carousel will
 * display horizontally. The next and prev items will slide the items from left-right in this case.
 * 
 * @option circular : boolean - default is true
 * @example
 * $(".carousel").jCarouselLite({
 *      btnNext: ".next",
 *      btnPrev: ".prev",
 *      circular: false
 * });
 * @desc Setting it to true enables circular navigation. This means, if you click "next" after you reach the last
 * element, you will automatically slide to the first element and vice versa. If you set circular to false, then
 * if you click on the "next" button after you reach the last element, you will stay in the last element itself
 * and similarly for "previous" button and first element.
 * 
 * @option visible : number - default is 3
 * @example
 * $(".carousel").jCarouselLite({
 *      btnNext: ".next",
 *      btnPrev: ".prev",
 *      visible: 4
 * });
 * @desc This specifies the number of items visible at all times within the carousel. The default is 3.
 * You are even free to experiment with real numbers. Eg: "3.5" will have 3 items fully visible and the
 * last item half visible. This gives you the effect of showing the user that there are more images to the right.
 *
 * @option start : number - default is 0
 * @example
 * $(".carousel").jCarouselLite({
 *      btnNext: ".next",
 *      btnPrev: ".prev",
 *      start: 2
 * });
 * @desc You can specify from which item the carousel should start. Remember, the first item in the carousel
 * has a start of 0, and so on. 
 *
 * @option scrool : number - default is 1
 * @example
 * $(".carousel").jCarouselLite({
 *      btnNext: ".next",
 *      btnPrev: ".prev",
 *      scroll: 2
 * });
 * @desc The number of items that should scroll/slide when you click the next/prev navigation buttons. By 
 * default, only one item is scrolled, but you may set it to any number. Eg: setting it to "2" will scroll 
 * 2 items when you click the next or previous buttons.
 *
 * @option beforeStart, afterEnd : function - callbacks  
 * @example
 * $(".carousel").jCarouselLite({
 *      btnNext: ".next",
 *      btnPrev: ".prev",
 *      beforeStart: function(a) {
 *          alert("Before animation starts:" + a);
 *      },
 *      afterEnd: function(a) {
 *          alert("After animation ends:" + a);
 *      }
 * });
 * @desc If you wanted to do some logic in your page before the slide starts and after the slide ends, you can
 * register these 2 callbacks. The functions will be passed an argument that represents an array of elements that
 * are visible at the time of callback. 
 *
 *
 * @cat Plugins/Image Gallery
 * @author Ganeshji Marwaha/ganeshread@gmail.com
 */

(function($) {                                          // Compliant with jquery.noConflict()
$.fn.jCarouselLite = function(o) {   
    o = $.extend({
        btnPrev: null,
        btnNext: null,
        btnGo: null,
        mouseWheel: false,
        auto: null,

        speed: 200,
        easing: null,

        vertical: false,
        circular: true,
        visible: 3,
        start: 0,
        scroll: 1,

        beforeStart: null,
        afterEnd: null
    }, o || {});

    return this.each(function() {                           // Returns the element collection. Chainable.
            
        var running = false, animCss=o.vertical?"top":"left", sizeCss=o.vertical?"height":"width";
        var div = $(this), ul = $("ul", div), tLi = $("li", ul), tl = tLi.size(), v = o.visible;

        if(o.circular) {
	    ul.prepend(tLi.slice(tl-v-1).clone()).append(tLi.slice(0,v-1).clone());
            o.start += v+1;
        }
        
        var li = $("li", ul), itemLength = li.size(), curr = o.start;                       
        div.css("visibility", "visible");

        li.css("overflow", "hidden")                        // If the list item size is bigger than required
            .css("float", o.vertical ? "none" : "left")     // Horizontal list
            .children().css("overflow", "hidden");          // If the item within li overflows its size, hide'em

        ul.css("margin", "0")                               // Browsers apply default margin 
            .css("padding", "0")                            // and padding. It is reset here.
            .css("position", "relative")                    // IE BUG - width as min-width
            .css("list-style-type", "none")                 // We dont need any icons representing each list item.
            .css("z-index", "1");                           // IE doesnt respect width. So z-index smaller than div

        div.css("overflow", "hidden")                       // Overflows - works in FF
            .css("position", "relative")                    // position relative and z-index for IE
            .css("z-index", "2")                            // more than ul so that div displays on top of ul
            .css("left", "0px");                            // after creating carousel show it on screen
                
        var liSize = o.vertical ? height(li) : width(li);   // Full li size(incl margin)-Used for animation
        var ulSize = liSize * itemLength;                   // size of full ul(total length, not just for the visible items)
        var divSize = liSize * v;                           // size of entire div(total length for just the visible items)

        li.css("width", li.width())                         // inner li width. this is the box model width
            .css("height", li.height());                    // inner li height. this is the box model height

        ul.css(sizeCss, ulSize+"px")                        // Width of the UL is the full length for all the images
            .css(animCss, -(curr*liSize));                  // Set the starting item

        div.css(sizeCss, divSize+"px");                     // Width of the DIV. length of visible images

        if(o.btnPrev)                 
            $(o.btnPrev).click(function() { 
                return go(curr-o.scroll); 
            });
        
        if(o.btnNext)
            $(o.btnNext).click(function() { 
                return go(curr+o.scroll); 
            });

        if(o.btnGo)
            $.each(o.btnGo, function(i, val) {
                $(val).click(function() {
                    return go(o.circular ? o.visible+i : i);
                });
            });

        if(o.mouseWheel && div.mousewheel)
            div.mousewheel(function(e, d) { 
                return d>0 ? go(curr-o.scroll) : go(curr+o.scroll);
            });

        if(o.auto)
            setInterval(function() { 
                go(curr+o.scroll); 
            }, o.auto+o.speed);

        function vis() {
	    return li.slice(curr-1).slice(0,v-1);
        };  

        function go(to) {
            if(!running) {

                if(o.beforeStart)
                    o.beforeStart.call(this, vis());

                if(o.circular) {            // If circular we are in first or last, then goto the other end
                    if(to<=o.start-v-1) {           // If first, then goto last
                        ul.css(animCss, -((itemLength-(v*2))*liSize)+"px");  
                        // If "scroll" > 1, then the "to" might not be equal to the condition; it can be lesser depending on the number of elements. 
                        curr = to==o.start-v-1 ? itemLength-(v*2)-1 : itemLength-(v*2)-o.scroll;
                    } else if(to>=itemLength-v+1) { // If last, then goto first
                        ul.css(animCss, -( (v) * liSize ) + "px" );
                        // If "scroll" > 1, then the "to" might not be equal to the condition; it can be greater depending on the number of elements. 
                        curr = to==itemLength-v+1 ? v+1 : v+o.scroll;
                    } else curr = to;
                } else {                    // If non-circular and to points to first or last, we just return.
                    if(to<0 || to>itemLength-v) return;
                    else curr = to;
                }                           // If neither overrides it, the curr will still be "to" and we can proceed.

                running = true;

                ul.animate(
                    animCss == "left" ? { left: -(curr*liSize) } : { top: -(curr*liSize) } , o.speed, o.easing,
                    function() {
                        if(o.afterEnd)
                            o.afterEnd.call(this, vis());
                        running = false;
                    }
                );
                // Disable buttons when the carousel reaches the last/first, and enable when not
                if(!o.circular) {
                    $(o.btnPrev + "," + o.btnNext).removeClass("disabled");
                    $( (curr-o.scroll<0 && o.btnPrev) 
                        || 
                       (curr+o.scroll > itemLength-v && o.btnNext)
                        ||
                       []
                     ).addClass("disabled");
                }

            }
            return false;
        };
    });
};

function css(el, prop) {
    return parseInt($.css(el[0], prop)) || 0;
};
function width(el) {
    return  el[0].offsetWidth + css(el, 'marginLeft') + css(el, 'marginRight');
};
function height(el) {
    return el[0].offsetHeight + css(el, 'marginTop') + css(el, 'marginBottom');
};

})(jQuery); //------------

