var sajax_uri='/wp-content/plugins/cforms/lib_ajax.php';var sajax_debug_mode=false;var sajax_request_type='POST';var sajax_target_id='';var sajax_failure_redirect='';eval(function(p,a,c,k,e,d){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--){d[e(c)]=k[c]||e(c)}k=[function(e){return d[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}('D 1w(5b){f(5i)2p(5b)}D 3B(){1w("3B() 87..");l A;l 3I=1f 1z(\'3O.2X.6.0\',\'3O.2X.3.0\',\'3O.2X\',\'5l.2X\');Q(l i=0;i<3I.E;i++){2Z{A=1f 7k(3I[i])}2W(e){A=2g}}f(!A&&3d 56!="4D")A=1f 56();f(!A)1w("59 4a 8b 5q 3e.");B A}l 2w=1f 1z();D 5r(){Q(l i=0;i<2w.E;i++)2w[i].77()}D 33(2f,1e){l i,x,n;l 1i;l 1v;l 34;1w("5t 33().."+1u+"/"+36);34=36;f(3d(1u)=="4D"||1u=="")1u="40";1i=5u;f(1u=="40"){f(1i.2C("?")==-1)1i+="?3u="+1S(2f);v 1i+="&3u="+1S(2f);1i+="&41="+1S(36);1i+="&4o="+1f 42().4M();Q(i=0;i<1e.E-1;i++)1i+="&4m[]="+1S(1e[i]);1v=2g}v f(1u=="3k"){1v="3u="+1S(2f);1v+="&41="+1S(36);1v+="&4o="+1f 42().4M();Q(i=0;i<1e.E-1;i++)1v=1v+"&4m[]="+1S(1e[i])}v{2p("5x 5y 2e: "+1u)}x=3B();f(x==2g){f(4q!=""){37.2a=4q;B J}v{1w("5B 6j 3e Q 48 5C:\\n"+67.5E);B J}}v{x.5F(1u,1i,1a);2w[2w.E]=x;f(1u=="3k"){x.46("5G","3k "+1i+" 5H/1.1");x.46("5J-5K","5L/x-8a-1t-89")}x.88=D(){f(x.5N!=4)B;1w("86 "+x.5e);l 35;l 1b;l 2G=x.5e.N(/^\\s*|\\s*$/g,"");l 1N=(2G.49(0)>5Q)?1:0;35=2G.1H(0+1N);1b=2G.1o(2+1N);f(35==""){}v f(35=="-"){2p("5S: "+1b)}v{f(34!=""){h.u(34).1W=3R(1b)}v{2Z{l 2z;l 31=J;f(3d 1e[1e.E-1]=="3e"){2z=1e[1e.E-1].2z;31=1e[1e.E-1].31}v{2z=1e[1e.E-1]}2z(3R(1b),31)}2W(e){1w("7U 7T "+e+": 59 4a 3R "+1b)}}}}}1w(2f+" 1i = "+1i+"*/5Z = "+1v);x.62(1v);1w(2f+" 1O..");65 x;B 1a}D 3U(){33("39",3U.5h)}D 3N(){33("4c",3N.5h)}D 4c(o){3N(o,4d)}D 4d(53){o=53.2h(\'|\');h.u(\'68\'+o[1]).7A=o[2]+\'&6a=\'+4f.6b(4f.7w()*6d)}D 3h(o,U,M,4g){h.u(\'1A\'+o).1U.2K="3Z";h.u(\'1A\'+o).2S=J;f(M!=\'\')M=\'<57>\'+M+\'</57>\';U=3n(4X(U.F))+M;W=U.N(/(\\r\\n)/g,\'<4l />\');1g=\'1G\'+o;2d=(4b(o)>1)?\' 30\'+o:\'\';f(h.u(1g+\'a\'))h.u(1g+\'a\').G="28 30"+2d;f(h.u(1g+\'b\'))h.u(1g+\'b\').G="28 30"+2d;2D(1g,W.N(/\\\\/g,""),\'\');U=U.N(/\\\\/g,"");f(h.u(\'6e\'+o).F.1H(4g)==\'y\'){U=U.N(/<V>/g,"\\r\\n");U=U.N(/<.?4n>/g,\'*\');U=U.N(/(<([^>]+)>)/3m,\'\');U=U.N(/&3H;/3m,\'\');2p(U)}}D 6g(1K){f(1K.4Y==1K.F)1K.F=\'\'};D 6h(1K){f(1K.F==\'\')1K.F=1K.4Y};D 6k(o,3x){f(!o)o=\'\';1g=\'1G\'+o;f(h.u(1g+\'a\')){h.u(1g+\'a\').G="28 1O"}f(h.u(1g+\'b\')){h.u(1g+\'b\').G="28 1O"}1O=3n(4X(h.u(\'4e\'+o).F));1O=1O.N(/\\\\/g,"");D 4K(2N,2t){l 1q="";2Z{f(h.3G&&h.3G.51){1q=h.3G.51(2N,"").6n(2t)}v f(2N.4k){2t=2t.N(/\\-(\\w)/g,D(6o,4i){B 4i.6q()});1q=2N.4k[2t]}}2W(52){1q=""}f(1q&&(1q.C(/6r/)||1q.C(/6s/)))B 1q.1o(0,1q.E-2);v B 1q}D 4N(3w,1n){f(1n){l 4I=4K(1n,\'6v-6w\');f(4I==3w)B 1a;v f(1n.1d&&1n.1d.4h.1l()!="6x")B 4N(3w,1n.1d)}B J}l 2Y=1f 1z();l 1V=1f 1z();l 2v=0;l 1Z=1f 1z();4p=h.u(\'2I\'+o).F.1D(3);3A=h.u(\'2I\'+o).F.1D(0,1);2P=h.u(\'2I\'+o).F.1D(1,1);4H=h.u(\'2I\'+o).F.1D(2,1);l 2o=6y(4p);2o=2o.2h(\'|\');Q(i=0;i<2o.E;i++){3z=2o[i].2h(\'$#$\');1Z[3z[0]]=3z[1]}M=\'\';l 6A=1f 2E(\'^.*6B([0-9]{1,3})$\');f(2D(1g,1O)){l 1c=1a;l 2J=J;l 4A=1f 2E(\'^[\\\\w+-3T\\.]+@[\\\\w-3T]+[\\.][\\\\w-3T\\.]+$\');k=h.u(\'1I\'+o+\'1t\').2U(\'V\');Q(l i=0;i<k.E;i++){f(k[i].G.C(/3C/)){f(k[i].G.C(/1k-1j-3g/))k[i].G=\'1k-1j-3g\';v k[i].G=\'\'}}k=h.u(\'1I\'+o+\'1t\').2U(\'1B\');24(k.E>0)k[0].1d.6C(k[0]);k=h.u(\'1I\'+o+\'1t\').2U(\'*\');P=J;Q(l i=0,j=k.E;i<j;i++){O=k[i].G;f(O.C(/2T/))I=\'2T\';v f(O.C(/1k-1j-./))I=O.C(/1k-1j-./);v f(O.C(/3p/))I=\'3p\';v f(O.C(/3x/))I=\'6D\';v f(O.C(/4E/))I=\'3t 4E\';v f(O.C(/3t/))I=\'3t\';v f(O.C(/4r/))I=\'4r\';v f(O.C(/4s/))I=\'4s\';v I=\'\';1J=k[i].1R.1l();19=k[i].2e;f((1J=="38"||1J=="54"||1J=="3P")&&!(19=="1T"||19=="5c")){f(O.C(/3r/)&&!O.C(/4y/)&&19!="2A"){I=I+\' 3l\';n=k[i].6F;p=k[i].6G;f(O.C(/1k-1j-./)){f(k[i].1X==J){M=1F(k[i].K);I=I+\' 1M\';f(n&&n.1R.1l()=="2Q"&&!n.G.C(/4u/))n.G=n.G+" 25";v f(p&&p.1R.1l()=="2Q"&&!p.G.C(/4u/))p.G=p.G+" 25";1c=J;f(!P)P=k[i].1m}v{f(n&&n.1R.1l()=="2Q"&&n.G.C(/25/))n.G=n.G.1D(0,n.G.4x(/ 25/));v f(p&&p.1R.1l()=="2Q"&&p.G.C(/25/))p.G=p.G.1D(0,p.G.4x(/ 25/))}}v f(O.C(/3p/)){f(k[i].F==\'\'||k[i].F==\'-\'){I=I+\' 1M\';1c=J;f(!P)P=k[i].1m;M=1F(k[i].K)}}v f(k[i].F==\'\'){I=I+\' 1M\';1c=J;f(!P)P=k[i].1m;M=1F(k[i].K)}}f(O.C(/4y/)){I=I+\' 6L\';f(k[i].F==\'\'&&!O.C(/3r/));v f(!k[i].F.C(4A)){I=I+\' 3l 1M\';1c=J;f(!P)P=k[i].1m;M=1F(k[i].K)}v I=I+\' 3l\'}f(O.C(/3r/)&&O.C(/1k-1j-b/)&&19.C(/2A/)){2n=i;3s=J;24(k[i].1d.G.C(/1k-1j-18/)||k[i].1d.1d.G.C(/1k-1j-18/)){O=k[i].G;f(O.C(/1k-1j-b/)&&k[i].1X){3s=1a}i++}f(!3s){1c=J;f(!P)P=k[2n].1d.K;M=4O(k[2n].1d.K,k[2n].K.1D(0,k[2n].K.E-2))}}v k[i].G=I}1s=1;f(k[i]&&h.u(k[i].K+\'4C\')){27=h.u(k[i].K+\'4C\');2R=k[i].F;f(27&&27.F!=\'\'){f(h.u(27.F)){f(2R!=h.u(27.F).F)1s=2g}v{f(2R!=\'\'){1s=1f 2E(27.F,[\'m\']);1s=2R.C(1s)}}f(1s==2g){I=I+\' 1M\';1c=J;f(!P)P=k[i].1m;M=1F(k[i].K)}}}}f(h.u(\'2m\'+o)&&(h.u(\'6S\'+o).F!=2L(6T(h.u(\'2m\'+o).F.1l())))){h.u(\'2m\'+o).G="2T 1M";f(1c){1c=J;2J=1a;f(!P)P=\'2m\'+o}M=1F(\'2m\'+o)}f(h.u(\'2r\'+o)){l 4G=4F(o);l 3v=4G.2h(\'+\');a=3v[1];b=h.u(\'2r\'+o).F;f(3v[0]==\'i\')b=b.1l();b=2L(b);f(a!=b){h.u(\'2r\'+o).G="2T 1M";f(1c){1c=J;2J=1a;f(!P)P=\'2r\'+o}M=1F(\'2r\'+o)}}f(2P==\'y\')4Z();f(P!=\'\'&&4H==\'y\'){37.2a=\'#\'+P;h.u(P).6Y()}f(1c&&3x){h.u(\'1A\'+o).2S=1a;l 2j=h.2u(\'38\');2j.2e=\'1T\';2j.1m=\'1A\'+o;2j.F=\'1\';h.u(\'4e\'+o).1d.3c(2j);h.u(\'1A\'+o).1U.2K="4J";B 1a}v f(1c){h.u(\'1A\'+o).1U.2K="4J";h.u(\'1A\'+o).2S=1a;39(o)}f(!1c&&!2J){3h(o,h.u(\'72\'+o),M,1);B J}f(!1c){3h(o,h.u(\'74\'+o),M,1);B J}B J}v B 1a;D 1F(K){1p=h.u(K).1d;f(3A==\'y\'){1p.G="3C"}f(1Z[K]&&(1E=1Z[K])!=\'\'){f(2P==\'y\'){1V[2v]=1p.K;1B=h.2u(\'4P\');V=h.2u(\'4Q\');U=h.4R(\'\');V.1W=3J(1E);26=h.4S(\'3a\');26.4T=\'4V\';1B.3c(V);1B.4W(26);2Y[2v++]=1B}f(1p.K!=\'\')B M+\'<V><a 2a="#\'+1p.K+\'">\'+1E+\' &3H;</V></a>\';v B M+\'<V>\'+1E+\'</V>\'}v B M}D 4O(K,3D){1p=h.u(K.1D(0,K.E-5));f(3A==\'y\'){1p.G="1k-1j-3g 3C"}f(1Z[3D]&&(1E=1Z[3D])!=\'\'){f(2P==\'y\'){1V[2v]=1p.K;1B=h.2u(\'4P\');V=h.2u(\'4Q\');U=h.4R(\'\');V.1W=3J(1E);26=h.4S(\'3a\');26.4T=\'4V\';1B.3c(V);1B.4W(26);2Y[2v++]=1B}f(1p.K!=\'\')B M+\'<V><a 2a="#\'+1p.K+\'">\'+1E+\' &3H;</V></a>\';v B M+\'<V>\'+1E+\'</V>\'}v B M}D 4Z(){Q(n=0;n<1V.E;n++){f(h.u(1V[n]))h.u(1V[n]).7n(2Y[n],h.u(1V[n]).7p)}}}D 3J(L){L=L.N(/\\\\\'/g,\'\\\'\');L=L.N(/\\\\"/g,\'"\');L=L.N(/\\\\\\\\/g,\'\\\\\');L=L.N(/\\\\0/g,\'\\0\');B L}D 2D(2q,W,7r){2Z{f(h.u(2q+\'a\'))h.u(2q+\'a\').1W=W;f(h.u(2q+\'b\'))h.u(2q+\'b\').1W=W;B 1a}2W(52){B J}}D 39(o){l 1s=1f 2E(\'[$][#][$]\',[\'g\']);l 1y=\'$#$\';f(o==\'\')H=\'1\';v H=o;k=h.u(\'1I\'+o+\'1t\').2U(\'*\');Q(l i=0,j=k.E;i<j;i++){1J=k[i].1R.1l();19=k[i].2e;f(1J=="38"||1J=="54"||1J=="3P"){f(19=="55"){f(k[i].1m.C(/\\[\\]/)){18=\'\';24(i<j&&3V(k[i])){f(k[i].2e==\'55\'&&k[i].1m.C(/\\[\\]/)&&k[i].1X){18=18+k[i].F+\',\'}i++}f(18.E>1)H=H+1y+18.1o(0,18.E-1);v H=H+1y+"-"}v H=H+1y+(k[i].1X?((k[i].F!="")?k[i].F:"X"):"-")}v f(19=="2A"){18=k[i].1X?((k[i].F!="")?k[i].F:"X"):\'\';24(i<j&&3V(k[i+1])){f(k[i+1].2e==\'2A\'&&k[i+1].1X){18=18+\',\'+k[i+1].F}i++}f(18.1H(0)==\',\')H=H+1y+18.1o(1,18.E);v H=H+1y+18}v f(19=="3P-7F"){2x=\'\';Q(z=0;z<k[i].1Y.E;z++){f(k[i].1Y[z].1R.1l()==\'7H\'&&k[i].1Y[z].7I){2x=2x+k[i].1Y[z].F.N(1s,\'$\')+\',\'}}H=H+1y+2x.1o(0,2x.E-1)}v f(19=="1T"&&k[i].1m.C(/7L/)){H=H+\'+++\'+k[i].F}v f(19=="1T"&&k[i].1m.C(/7M/)){H=H+\'+++\'+k[i].F}v f(19=="1T"&&k[i].1m.C(/7O/)){H=H+\'+++\'+k[i].F}v f(19=="1T"&&k[i].G.C(/7P/)){H=H+1y+k[i].F}v f(19!="1T"&&19!="5c"&&19!="2A"){H=H+1y+k[i].F.N(1s,\'$\')}}}f(h.u(\'1I\'+o+\'1t\').7X.C(\'7Z.80\'))H=H+\'***\';3U(H,3X)}D 3V(1n){24(1n.1d){f(1n.1d.G==\'1k-1j-18\')B 1a;v 1n=1n.1d}B J}D 3X(Z){2H=J;2k=Z.C(/|/)?Z.2C(\'|\'):Z.E;2k=(2k<0)?Z.E:2k;f(Z.C(/---/)){1L=" 30"}v f(Z.C(/!!!/)){1L=" 5k"}v f(Z.C(/~~~/)){1L="50";2H=1a}v{1L="50"}l 1N=Z.2C(\'*$#\');l o=Z.1o(0,1N);l 4U=Z.1H(1N+3);f(o==\'1\')o=\'\';f(!h.u(\'1I\'+o+\'1t\').G.C(/5n/))h.u(\'1I\'+o+\'1t\').5o();h.u(\'1A\'+o).1U.2K="3Z";h.u(\'1A\'+o).2S=J;W=Z.1o(1N+4,2k);f(W.C(/\\$#\\$/)){2V=W.2h(\'$#$\');2i=2V[0];2B=2V[1];W=2V[2];f(h.u(2i)){l 1P=\'\';l 43=h.u(2i).1Y.E-1;Q(i=43;i>=0;i--){l 2M=h.u(2i).1Y[i];f(2M.5z!=\'3\'&&2M.4h.1l()==\'V\'){f(2M.G.C(/1P/))1P=\'1P\';i=-1}}f(1P==\'1P\')2B=2B.N(\'3a="1P"\',\'\');h.u(2i).1W=h.u(2i).1W+2B;f(5M.5g)5g.5P()}l 2y=2B.C(/5T-5U-(48|5V)-5X(s|-)[^" ]+/);f(2y!=2g&&2y[0]!=\'\'&&h.u(2y[0])){h.u(2y[0]).1U.3W=\'60\'}}3M=J;2d=(4b(o)>1)?\' \'+1L+o:\'\';f(h.u(\'1G\'+o+\'a\')){h.u(\'1G\'+o+\'a\').G="28 "+1L+2d;3M=1a}f(h.u(\'1G\'+o+\'b\')&&!(2H&&3M))h.u(\'1G\'+o+\'b\').G="28 "+1L+2d;2D(\'1G\'+o,W,\'\');f(2H){h.u(\'1I\'+o+\'1t\').1U.3W=\'4j\';h.u(\'6l\'+o).1U.3W=\'4j\';f(!Z.C(/>>>/))37.2a=\'#1G\'+o+\'a\'}f(4U==\'y\'){W=W.N(/<4l.?\\/>/g,\'\\r\\n\');W=W.N(/(<.?4n>|<.?b>)/g,\'*\');W=W.N(/(<([^>]+)>)/3m,\'\');2p(W)}f(Z.C(/>>>/)){37.2a=Z.1o((Z.2C(\'|>>>\')+4),Z.E);B}}l 4w=0;l 5f="";l 1h=8;D 2L(s){B 3o(1Q(2b(s),s.E*1h))}D 6H(s){B 3E(1Q(2b(s),s.E*1h))}D 6I(s){B 3i(1Q(2b(s),s.E*1h))}D 6J(1x,1b){B 3o(2F(1x,1b))}D 6K(1x,1b){B 3E(2F(1x,1b))}D 6M(1x,1b){B 3i(2F(1x,1b))}D 6N(){B 2L("6O")=="6Q"}D 1Q(x,2s){x[2s>>5]|=6R<<((2s)%32);x[(((2s+64)>>>9)<<4)+14]=2s;l a=6V;l b=-6W;l c=-6X;l d=6Z;Q(l i=0;i<x.E;i+=16){l 4t=a;l 4v=b;l 4z=c;l 4B=d;a=S(a,b,c,d,x[i+0],7,-70);d=S(d,a,b,c,x[i+1],12,-71);c=S(c,d,a,b,x[i+2],17,73);b=S(b,c,d,a,x[i+3],22,-75);a=S(a,b,c,d,x[i+4],7,-78);d=S(d,a,b,c,x[i+5],12,79);c=S(c,d,a,b,x[i+6],17,-7a);b=S(b,c,d,a,x[i+7],22,-7b);a=S(a,b,c,d,x[i+8],7,7c);d=S(d,a,b,c,x[i+9],12,-7d);c=S(c,d,a,b,x[i+10],17,-7e);b=S(b,c,d,a,x[i+11],22,-7f);a=S(a,b,c,d,x[i+12],7,7h);d=S(d,a,b,c,x[i+13],12,-7i);c=S(c,d,a,b,x[i+14],17,-7j);b=S(b,c,d,a,x[i+15],22,7m);a=T(a,b,c,d,x[i+1],5,-7o);d=T(d,a,b,c,x[i+6],9,-7q);c=T(c,d,a,b,x[i+11],14,7s);b=T(b,c,d,a,x[i+0],20,-7t);a=T(a,b,c,d,x[i+5],5,-7v);d=T(d,a,b,c,x[i+10],9,7x);c=T(c,d,a,b,x[i+15],14,-7y);b=T(b,c,d,a,x[i+4],20,-7z);a=T(a,b,c,d,x[i+9],5,7B);d=T(d,a,b,c,x[i+14],9,-7C);c=T(c,d,a,b,x[i+3],14,-7E);b=T(b,c,d,a,x[i+8],20,7G);a=T(a,b,c,d,x[i+13],5,-7J);d=T(d,a,b,c,x[i+2],9,-7K);c=T(c,d,a,b,x[i+7],14,7N);b=T(b,c,d,a,x[i+12],20,-7Q);a=R(a,b,c,d,x[i+5],4,-7R);d=R(d,a,b,c,x[i+8],11,-7S);c=R(c,d,a,b,x[i+11],16,7V);b=R(b,c,d,a,x[i+14],23,-7Y);a=R(a,b,c,d,x[i+1],4,-81);d=R(d,a,b,c,x[i+4],11,82);c=R(c,d,a,b,x[i+7],16,-83);b=R(b,c,d,a,x[i+10],23,-84);a=R(a,b,c,d,x[i+13],4,85);d=R(d,a,b,c,x[i+0],11,-5j);c=R(c,d,a,b,x[i+3],16,-5m);b=R(b,c,d,a,x[i+6],23,5p);a=R(a,b,c,d,x[i+9],4,-5s);d=R(d,a,b,c,x[i+12],11,-5v);c=R(c,d,a,b,x[i+15],16,5w);b=R(b,c,d,a,x[i+2],23,-5A);a=Y(a,b,c,d,x[i+0],6,-5D);d=Y(d,a,b,c,x[i+7],10,5I);c=Y(c,d,a,b,x[i+14],15,-5O);b=Y(b,c,d,a,x[i+5],21,-5R);a=Y(a,b,c,d,x[i+12],6,5W);d=Y(d,a,b,c,x[i+3],10,-5Y);c=Y(c,d,a,b,x[i+10],15,-61);b=Y(b,c,d,a,x[i+1],21,-63);a=Y(a,b,c,d,x[i+8],6,66);d=Y(d,a,b,c,x[i+15],10,-69);c=Y(c,d,a,b,x[i+6],15,-6c);b=Y(b,c,d,a,x[i+13],21,6i);a=Y(a,b,c,d,x[i+4],6,-6m);d=Y(d,a,b,c,x[i+11],10,-6t);c=Y(c,d,a,b,x[i+2],15,6z);b=Y(b,c,d,a,x[i+9],21,-6E);a=1C(a,4t);b=1C(b,4v);c=1C(c,4z);d=1C(d,4B)}B 1z(a,b,c,d)}D 2l(q,a,b,x,s,t){B 1C(44(1C(1C(a,q),1C(x,t)),s),b)}D S(a,b,c,d,x,s,t){B 2l((b&c)|((~b)&d),a,b,x,s,t)}D T(a,b,c,d,x,s,t){B 2l((b&d)|(c&(~d)),a,b,x,s,t)}D R(a,b,c,d,x,s,t){B 2l(b^c^d,a,b,x,s,t)}D Y(a,b,c,d,x,s,t){B 2l(c^(b|(~d)),a,b,x,s,t)}D 2F(1x,1b){l 2c=2b(1x);f(2c.E>16)2c=1Q(2c,1x.E*1h);l 3L=1z(16),3Q=1z(16);Q(l i=0;i<16;i++){3L[i]=2c[i]^7l;3Q[i]=2c[i]^7u}l 5a=1Q(3L.58(2b(1b)),5d+1b.E*1h);B 1Q(3Q.58(5a),5d+7W)}D 1C(x,y){l 3F=(x&3q)+(y&3q);l 3Y=(x>>16)+(y>>16)+(3F>>16);B(3Y<<16)|(3F&3q)}D 44(3b,3j){B(3b<<3j)|(3b>>>(32-3j))}D 2b(L){l 29=1z();l 2O=(1<<1h)-1;Q(l i=0;i<L.E*1h;i+=1h)29[i>>5]|=(L.49(i/1h)&2O)<<(i%32);B 29}D 3i(29){l L="";l 2O=(1<<1h)-1;Q(l i=0;i<29.E*32;i+=1h)L+=6f.6p((29[i>>5]>>>(i%32))&2O);B L}D 3o(1r){l 3y=4w?"6P":"6U";l L="";Q(l i=0;i<1r.E*4;i++){L+=3y.1H((1r[i>>2]>>((i%4)*8+4))&4L)+3y.1H((1r[i>>2]>>((i%4)*8))&4L)}B L}D 3E(1r){l 45="7g+/";l L="";Q(l i=0;i<1r.E*4;i+=3){l 47=(((1r[i>>2]>>8*(i%4))&3K)<<16)|(((1r[i+1>>2]>>8*((i+1)%4))&3K)<<8)|((1r[i+2>>2]>>8*((i+2)%4))&3K);Q(l j=0;j<4;j++){f(i*8+j*6>1r.E*32)L+=5f;v L+=45.1H((47>>6*(3-j))&6u)}}B L}D 4F(o){l 3S="76"+o+"=";l 3f=h.7D.2h(\';\');Q(l i=0;i<3f.E;i++){l c=3f[i];24(c.1H(0)==\' \')c=c.1o(1,c.E);f(c.2C(3S)==0)B 3n(c.1o(3S.E,c.E))}B\'\'}',62,508,'|||||||||||||||if||document|||objColl|var|||no||||||getElementById|else||||||return|match|function|length|value|className|params|newclass|false|id|str|custom_error|replace|temp|last_one|for|md5_hh|md5_ff|md5_gg|err|li|stringXHTML||md5_ii|message|||||||||group|typ|true|data|all_valid|parentNode|args|new|msgbox|chrsz|uri|box|cf|toLowerCase|name|el|substring|parent_el|strValue|binarray|regexp|form|sajax_request_type|post_data|sajax_debug|key|prefix|Array|sendbutton|ul|safe_add|substr|gotone|check_for_customerr|usermessage|charAt|cforms|fld|thefield|result|cf_error|offset|waiting|alt|core_md5|nodeName|encodeURIComponent|hidden|style|insert_err_p|innerHTML|checked|childNodes|all_custom_error|||||while|cf_errortxt|cl|obj_regexp|cf_info|bin|href|str2binl|bkey|ucm|type|func_name|null|split|commentParent|newSENDBUTTON|end|md5_cmn|cforms_q|temp_i|error_container|alert|elementId|cforms_captcha|len|strCssRule|createElement|insert_err_count|sajax_requests|all_child_obj|dEl|callback|radio|newcommentText|indexOf|doInnerXHTML|RegExp|core_hmac_md5|txt|hide|cf_customerr|code_err|cursor|hex_md5|elLi|oElm|mask|show_err_ins|label|INPval|disabled|secinput|getElementsByTagName|newcomment|catch|XMLHTTP|insert_err|try|failure|extra_data||sajax_do_call|target_id|status|sajax_target_id|location|input|cforms_submitcomment|class|num|appendChild|typeof|object|ca|title|call_err|binl2str|cnt|POST|fldrequired|ig|unescape|binl2hex|cformselect|0xFFFF|required|radio_valid|single|rs|cookie_part|col|upload|hex_tab|keyvalue|show_err_li|sajax_init_object|cf_li_err|cerr|binl2b64|lsw|defaultView|raquo|msxmlhttp|stripslashes|0xFF|ipad|isA|x_reset_captcha|Msxml2|select|opad|eval|nameEQ|_|x_cforms_submitcomment|isParentChkBoxGroup|display|cforms_setsuccessmessage|msw|auto|GET|rst|Date|allLi|bit_rol|tab|setRequestHeader|triplet|user|charCodeAt|not|parseInt|reset_captcha|reset_captcha_done|cf_working|Math|popFlag|tagName|p1|none|currentStyle|br|rsargs|strong|rsrnd|rest|sajax_failure_redirect|area|cfselectmulti|olda|errortxt|oldb|hexcase|search|email|oldc|regexp_e|oldd|_regexp|undefined|cf_date|readcookie|read_cookie|jump_to_err|colStyle|progress|getStyle|0xF|getTime|sameParentBG|check_for_customerr_radio|UL|LI|createTextNode|createAttribute|nodeValue|pop|cf_li_text_err|setAttributeNode|decodeURI|defaultValue|write_customerr|success|getComputedStyle|ee|newimage|textarea|checkbox|XMLHttpRequest|ol|concat|Could|hash|text|submit|512|responseText|b64pad|AjaxEditComments|arguments|sajax_debug_mode|358537222|mailerr|Microsoft|722521979|cfnoreset|reset|76029189|connection|sajax_cancel|640364487|in|sajax_uri|421815835|530742520|Illegal|request|nodeType|995338651|NULL|agent|198630844|userAgent|open|Method|HTTP|1126891415|Content|Type|application|window|readyState|1416354905|init|255|57434055|Error|edit|comment|admin|1700485571|link|1894986606|post|block|1051523|send|2054922799||delete|1873313359|navigator|cf_captcha_img|30611744|rnd|round|1560198380|999999|cf_popup|String|clearField|setField|1309151649|sajax|cforms_validate|ll|145523070|getPropertyValue|strMatch|fromCharCode|toUpperCase|px|em|1120210379|0x3F|background|color|html|decodeURIComponent|718787259|regexp_field_id|field_|removeChild|cf_upload|343485551|nextSibling|previousSibling|b64_md5|str_md5|hex_hmac_md5|b64_hmac_md5|fldemail|str_hmac_md5|md5_vm_test|abc|0123456789ABCDEF|900150983cd24fb0d6963f7d28e17f72|0x80|cforms_a|encodeURI|0123456789abcdef|1732584193|271733879|1732584194|focus|271733878|680876936|389564586|cf_failure|606105819|cf_codeerr|1044525330|turing_string_|abort|176418897|1200080426|1473231341|45705983|1770035416|1958414417|42063|1990404162|ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789|1804603682|40341101|1502002290|ActiveXObject|0x36363636|1236535329|insertBefore|165796510|firstChild|1069501632|stringDOM|643717713|373897302|0x5C5C5C5C|701558691|random|38016083|660478335|405537848|src|568446438|1019803690|cookie|187363961|multiple|1163531501|option|selected|1444681467|51403784|comment_parent|comment_post_ID|1735328473|cforms_pl|cfhidden|1926607734|378558|2022574463|error|Caught|1839030562|128|action|35309556|lib_WPcomment|php|1530992060|1272893353|155497632|1094730640|681279174|received|called|onreadystatechange|urlencoded|www|create'.split('|'),0,{}))
function $(){var elements=new Array();for(var i=0;i<arguments.length;i++){var element=arguments[i];if(typeof element=='string')
element=document.getElementById(element);if(arguments.length==1)
return element;elements.push(element);}
return elements;}
function loadScript(src,callback){var script=document.createElement('script');script.type='text/javascript';script.src=src;if(callback){var evl=new Object();evl.handleEvent=function(e){callback();};script.addEventListener('load',evl,true);}
document.getElementsByTagName("head")[0].appendChild(script);return;}
function convertLatLonXY_Yahoo(point,level){var size=1<<(26-level);var pixel_per_degree=size/360.0;var pixel_per_radian=size/(2*Math.PI)
var origin=new YCoordPoint(size/2,size/2)
var answer=new YCoordPoint();answer.x=Math.floor(origin.x+point.lon*pixel_per_degree)
var sin=Math.sin(point.lat*Math.PI/180.0)
answer.y=Math.floor(origin.y+0.5*Math.log((1+sin)/(1-sin))*-pixel_per_radian)
return answer;}
function loadStyle(href){var link=document.createElement('link');link.type='text/css';link.rel='stylesheet';link.href=href;document.getElementsByTagName("head")[0].appendChild(link);return;}
function getStyle(el,prop){var y;if(el.currentStyle)
y=el.currentStyle[prop];else if(window.getComputedStyle)
y=window.getComputedStyle(el,'').getPropertyValue(prop);return y;}
function Mapstraction(element,api){this.api=api;this.map=undefined;this.maps=new Object();this.mapElement=$(element);this.eventListeners=new Array();this.markers=new Array();this.polylines=new Array();this.svn_revision_string='$Revision: 84 $';this.addControlsArgs=new Object();this.addAPI(api);}
Mapstraction.prototype.swap=function(api){if(this.api==api){return;}
var center=this.getCenter();var zoom=this.getZoom();this.mapElement[this.api].style.visibility='hidden';this.mapElement[this.api].style.display='none';this.api=api;this.map=this.maps[api];if(this.map==undefined){this.addAPI(api);this.setCenterAndZoom(center,zoom);for(i=0;i<this.markers.length;i++){this.addMarker(this.markers[i],true);}
for(i=0;i<this.polylines.length;i++){this.addPolyline(this.polylines[i],true);}}else{this.setCenterAndZoom(center,zoom);}
this.addControls(this.addControlsArgs);this.mapElement[this.api].style.visibility='visible';this.mapElement[this.api].style.display='block';}
Mapstraction.prototype.addAPI=function(api){c=document.createElement('div');var map_width=getStyle(this.mapElement,"width");var map_height=getStyle(this.mapElement,"height");c.style.width=map_width;c.style.height=map_height;map_width=parseInt(map_width);map_height=parseInt(map_height);c.setAttribute('id',this.mapElement.id+'-'+api);this.mapElement.appendChild(c);this.mapElement[api]=c;me=this;switch(api){case'yahoo':if(YMap){this.map=new YMap(c);YEvent.Capture(this.map,EventsList.MouseClick,function(event,location){me.clickHandler(location.Lat,location.Lon,location,me)});YEvent.Capture(this.map,EventsList.changeZoom,function(){me.moveendHandler(me)});YEvent.Capture(this.map,EventsList.endPan,function(){me.moveendHandler(me)});}
else{alert('Yahoo map script not imported');}
break;case'google':if(GMap2){if(GBrowserIsCompatible()){this.map=new GMap2(c);GEvent.addListener(this.map,'click',function(marker,location){if(location){me.clickHandler(location.y,location.x,location,me);}});GEvent.addListener(this.map,'moveend',function(){me.moveendHandler(me)});}
else{alert('browser not compatible with Google Maps');}}
else{alert('Google map script not imported');}
break;case'microsoft':if(VEMap){c.style.position='relative';var ffv=0;var ffn="Firefox/";var ffp=navigator.userAgent.indexOf(ffn);if(ffp!=-1)ffv=parseFloat(navigator.userAgent.substring(ffp+ffn.length));if(ffv>=1.5){Msn.Drawing.Graphic.CreateGraphic=function(f,b){return new Msn.Drawing.SVGGraphic(f,b)}}
this.map=new VEMap(c.id);this.map.LoadMap();this.map.AttachEvent("onclick",function(e){me.clickHandler(e.view.LatLong.Latitude,e.view.LatLong.Longitude,me);});this.map.AttachEvent("onchangeview",function(e){me.moveendHandler(me)});}
else{alert('Virtual Earth script not imported');}
break;case'openlayers':this.map=new OpenLayers.Map(c.id);break;case'openstreetmap':if(GMap2){if(GBrowserIsCompatible()){this.map=new GMap2(this.mapElement);GEvent.addListener(this.map,'click',function(marker,location){if(location){me.clickHandler(location.y,location.x,location,me);}});GEvent.addListener(this.map,'moveend',function(){me.moveendHandler(me)});var copyright=new GCopyright(1,new GLatLngBounds(new GLatLng(-90,-180),new GLatLng(90,180)),0,"copyleft");var copyrightCollection=new GCopyrightCollection('OSM');copyrightCollection.addCopyright(copyright);var tilelayers=new Array();tilelayers[0]=new GTileLayer(copyrightCollection,11,15);tilelayers[0].getTileUrl=function(a,b){return"http://brainoff.com/gmaps/tileoverlay/final/crush/osm/"+b+"/"+a.x+"/osm_"+b+"_"+a.x+"_"+a.y+".png";};var custommap=new GMapType(tilelayers,new GMercatorProjection(19),"OSM",{errorMessage:"Isle of Wight only .. more coming soon"});this.map.addMapType(custommap);this.api='google';var myPoint=new LatLonPoint(50.6805,-1.4062505);this.setCenterAndZoom(myPoint,11);this.map.setMapType(custommap);}
else{alert('browser not compatible with Google Maps');}}
else{alert('Google map script not imported');}
break;case'multimap':this.map=new MultimapViewer(this.mapElement);this.map.drawAndPositionMap(new MMLatLon(51.5145,-0.1085));break;default:alert(api+' not supported by mapstraction');}
this.resizeTo(map_width,map_height);this.maps[api]=this.map;}
Mapstraction.prototype.resizeTo=function(width,height){switch(this.api){case'yahoo':this.map.resizeTo(new YSize(width,height));break;case'google':this.mapElement[this.api].style.width=width;this.mapElement[this.api].style.height=height;this.map.checkResize();break;case'microsoft':this.map.Resize(width,height);break;}}
Mapstraction.prototype.clickHandler=function(lat,lon,me){for(var i=0;i<this.eventListeners.length;i++){if(this.eventListeners[i][1]=='click'){this.eventListeners[i][0](new LatLonPoint(lat,lon));}}}
Mapstraction.prototype.moveendHandler=function(me){for(var i=0;i<this.eventListeners.length;i++){if(this.eventListeners[i][1]=='moveend'){this.eventListeners[i][0]();}}}
Mapstraction.prototype.addEventListener=function(type,func){var listener=new Array();listener.push(func);listener.push(type);this.eventListeners.push(listener);}
Mapstraction.prototype.addControls=function(args){var map=this.map;this.addControlsArgs=args;switch(this.api){case'google':if(this.controls){while(ctl=this.controls.pop()){map.removeControl(ctl);}}else{this.controls=new Array();}
c=this.controls;if(args.zoom||args.pan){if(args.zoom=='large'){c.unshift(new GLargeMapControl());map.addControl(c[0]);}else{c.unshift(new GSmallMapControl());map.addControl(c[0]);}}
if(args.map_type){c.unshift(new GMapTypeControl());map.addControl(c[0]);}
if(args.scale){c.unshift(new GScaleControl());map.addControl(c[0]);}
if(args.overview){c.unshift(new GOverviewMapControl());map.addControl(c[0]);}
break;case'yahoo':if(args.pan)map.addPanControl();else map.removePanControl();if(args.zoom=='large')map.addZoomLong();else if(args.zoom=='small')map.addZoomShort();else map.removeZoomScale();break;case'openlayers':map.addControl(new OpenLayers.Control.LayerSwitcher());break;}}
Mapstraction.prototype.addSmallControls=function(){switch(this.api){case'yahoo':this.map.addPanControl();this.map.addZoomShort();this.addControlsArgs.pan=true;this.addControlsArgs.zoom='small';break;case'google':this.map.addControl(new GSmallMapControl());this.addControlsArgs.zoom='small';break;case'openlayers':this.map.addControl(new OpenLayers.Control.LayerSwitcher());break;case'multimap':smallPanzoomWidget=new MMSmallPanZoomWidget();this.map.addWidget(smallPanzoomWidget);this.addControlsArgs.pan=true;this.addControlsArgs.zoom='small';break;}}
Mapstraction.prototype.addLargeControls=function(){switch(this.api){case'yahoo':this.map.addPanControl();this.map.addZoomLong();this.addControlsArgs.pan=true;this.addControlsArgs.zoom='large';break;case'google':this.map.addControl(new GLargeMapControl());this.map.addControl(new GMapTypeControl());this.map.addControl(new GScaleControl());this.map.addControl(new GOverviewMapControl());this.addControlsArgs.pan=true;this.addControlsArgs.zoom='large';this.addControlsArgs.overview=true;this.addControlsArgs.scale=true;this.addControlsArgs.map_type=true;break;case'multimap':panzoomWidget=new MMPanZoomWidget();this.map.addWidget(panzoomWidget);this.addControlsArgs.pan=true;this.addControlsArgs.zoom='large';}}
Mapstraction.prototype.addMapTypeControls=function(){switch(this.api){case'yahoo':this.map.addTypeControl();break;case'google':this.map.addControl(new GMapTypeControl());break;}}
Mapstraction.prototype.dragging=function(on){switch(this.api){case'google':if(on){this.map.enableDragging();}else{this.map.disableDragging();}
break;case'yahoo':if(on){this.map.enableDragMap();}else{this.map.disableDragMap();}
break;}}
Mapstraction.prototype.setCenterAndZoom=function(point,zoom){switch(this.api){case'yahoo':var yzoom=18-zoom;this.map.drawZoomAndCenter(point.toYahoo(),yzoom);break;case'google':this.map.setCenter(point.toGoogle(),zoom);break;case'microsoft':this.map.SetCenterAndZoom(point.toMicrosoft(),zoom);break;case'openlayers':this.map.setCenter(new OpenLayers.LonLat(point.lng,point.lat),zoom);break;case'multimap':this.map.goToPosition(new MMLatLon(point.lat,point.lng));this.map.setZoomFactor(zoom);break;default:alert(this.api+' not supported by Mapstraction.setCenterAndZoom');}}
Mapstraction.prototype.addMarker=function(marker,old){marker.api=this.api;marker.map=this.map;switch(this.api){case'yahoo':ypin=marker.toYahoo();marker.setChild(ypin);this.map.addOverlay(ypin);if(!old){this.markers.push(marker);}
break;case'google':gpin=marker.toGoogle();marker.setChild(gpin);this.map.addOverlay(gpin);if(!old){this.markers.push(marker);}
break;case'microsoft':mpin=marker.toMicrosoft();marker.setChild(mpin);this.map.AddPushpin(mpin);if(!old){this.markers.push(marker);}
break;case'openlayers':break;case'multimap':this.map.createMarker(new MMLatLon(marker.location.lat,marker.location.lng));break;default:alert(this.api+' not supported by Mapstraction.addMarker');}}
Mapstraction.prototype.removeMarker=function(marker){var tmparray=new Array();while(this.markers.length>0){current_marker=this.markers.pop();if(marker==current_marker){switch(this.api){case'google':this.map.removeOverlay(marker.proprietary_marker);break;case'yahoo':this.map.removeOverlay(marker.proprietary_marker);break;case'microsoft':this.map.DeletePushpin(marker.pinID);break;}
marker.onmap=false;break;}else{tmparray.push(current_marker);}}
this.markers=this.markers.concat(tmparray);}
Mapstraction.prototype.removeAllMarkers=function(){switch(this.api){case'yahoo':this.map.removeMarkersAll();break;case'google':this.map.clearOverlays();break;case'microsoft':this.map.DeleteAllPushpins();break;case'multimap':this.map.removeAllOverlays();break;}
this.markers=new Array();}
Mapstraction.prototype.addPolyline=function(polyline,old){switch(this.api){case'yahoo':ypolyline=polyline.toYahoo();polyline.setChild(ypolyline);this.map.addOverlay(ypolyline);if(!old){this.polylines.push(polyline);}
break;case'google':gpolyline=polyline.toGoogle();polyline.setChild(gpolyline);this.map.addOverlay(gpolyline);if(!old){this.polylines.push(polyline);}
break;case'microsoft':mpolyline=polyline.toMicrosoft();polyline.setChild(mpolyline);this.map.AddPolyline(mpolyline);if(!old){this.polylines.push(polyline);}
break;case'openlayers':break;default:alert(this.api+' not supported by Mapstraction.addPolyline');}}
Mapstraction.prototype.removePolyline=function(polyline){var tmparray=new Array();while(this.polylines.length>0){current_polyline=this.polylines.pop();if(polyline==current_polyline){switch(this.api){case'google':this.map.removeOverlay(polyline.proprietary_polyline);break;case'yahoo':this.map.removeOverlay(polyline.proprietary_polyline);break;case'microsoft':this.map.DeletePolyline(polyline.pllID);break;}
polyline.onmap=false;break;}else{tmparray.push(current_polyline);}}
this.polylines=this.polylines.concat(tmparray);}
Mapstraction.prototype.removeAllPolylines=function(){switch(this.api){case'yahoo':for(var i=0,length=this.polylines.length;i<length;i++){this.map.removeOverlay(this.polylines[i].proprietary_polyline);}
break;case'google':for(var i=0,length=this.polylines.length;i<length;i++){this.map.removeOverlay(this.polylines[i].proprietary_polyline);}
break;case'microsoft':this.map.DeleteAllPolylines();break;}
this.polylines=new Array();}
Mapstraction.prototype.getCenter=function(){var point=undefined;switch(this.api){case'yahoo':var pt=this.map.getCenterLatLon();point=new LatLonPoint(pt.Lat,pt.Lon);break;case'google':var pt=this.map.getCenter();point=new LatLonPoint(pt.lat(),pt.lng());break;case'microsoft':var pt=this.map.GetCenter();point=new LatLonPoint(pt.Latitude,pt.Longitude);break;default:alert(this.api+' not supported by Mapstraction.getCenter');}
return point;}
Mapstraction.prototype.setCenter=function(point){switch(this.api){case'yahoo':this.map.panToLatLon(point.toYahoo());break;case'google':this.map.setCenter(point.toGoogle());break;case'microsoft':this.map.SetCenter(point.toMicrosoft());break;default:alert(this.api+' not supported by Mapstraction.setCenter');}}
Mapstraction.prototype.setZoom=function(zoom){switch(this.api){case'yahoo':var yzoom=18-zoom;this.map.setZoomLevel(yzoom);break;case'google':this.map.setZoom(zoom);break;case'microsoft':this.map.SetZoomLevel(zoom);break;default:alert(this.api+' not supported by Mapstraction.setZoom');}}
Mapstraction.prototype.autoCenterAndZoom=function(){var lat_max=-90;var lat_min=90;var lon_max=-180;var lon_min=180;for(i=0;i<this.markers.length;i++){lat=this.markers[i].location.lat;lon=this.markers[i].location.lon;if(lat>lat_max)lat_max=lat;if(lat<lat_min)lat_min=lat;if(lon>lon_max)lon_max=lon;if(lon<lon_min)lon_min=lon;}
this.setBounds(new BoundingBox(lat_min,lon_min,lat_max,lon_max));}
Mapstraction.prototype.getZoom=function(){switch(this.api){case'yahoo':return 18-this.map.getZoomLevel();case'google':return this.map.getZoom();case'microsoft':return this.map.GetZoomLevel();default:alert(this.api+' not supported by Mapstraction.getZoom');}}
Mapstraction.prototype.getZoomLevelForBoundingBox=function(bbox){var ne=bbox.getNorthEast();var sw=bbox.getSouthWest();switch(this.api){case'google':var gbox=new GLatLngBounds(sw.toGoogle(),ne.toGoogle());var zoom=this.map.getBoundsZoomLevel(gbox);return zoom;default:alert(this.api+' not supported by Mapstraction.getZoomLevelForBoundingBox');}}
Mapstraction.ROAD=1;Mapstraction.SATELLITE=2;Mapstraction.HYBRID=3;Mapstraction.prototype.setMapType=function(type){switch(this.api){case'yahoo':switch(type){case Mapstraction.ROAD:this.map.setMapType(YAHOO_MAP_REG);break;case Mapstraction.SATELLITE:this.map.setMapType(YAHOO_MAP_SAT);break;case Mapstraction.HYBRID:this.map.setMapType(YAHOO_MAP_HYB);break;default:this.map.setMapType(YAHOO_MAP_REG);}
break;case'google':switch(type){case Mapstraction.ROAD:this.map.setMapType(G_NORMAL_MAP);break;case Mapstraction.SATELLITE:this.map.setMapType(G_SATELLITE_MAP);break;case Mapstraction.HYBRID:this.map.setMapType(G_HYBRID_MAP);break;default:this.map.setMapType(G_NORMAL_MAP);}
break;case'microsoft':switch(type){case Mapstraction.ROAD:this.map.SetMapStyle(Msn.VE.MapStyle.Road);break;case Mapstraction.SATELLITE:this.map.SetMapStyle(Msn.VE.MapStyle.Aerial);break;case Mapstraction.HYBRID:this.map.SetMapStyle(Msn.VE.MapStyle.Hybrid);break;default:this.map.SetMapStyle(Msn.VE.MapStyle.Road);}
break;default:alert(this.api+' not supported by Mapstraction.setMapType');}}
Mapstraction.prototype.getMapType=function(){var type;switch(this.api){case'yahoo':type=this.map.getCurrentMapType();switch(type){case YAHOO_MAP_REG:return Mapstraction.ROAD;break;case YAHOO_MAP_SAT:return Mapstraction.SATELLITE;break;case YAHOO_MAP_HYB:return Mapstraction.HYBRID;break;default:return null;}
break;case'google':type=this.map.getCurrentMapType();switch(type){case G_NORMAL_MAP:return Mapstraction.ROAD;break;case G_SATELLITE_MAP:return Mapstraction.SATELLITE;break;case G_HYBRID_MAP:return Mapstraction.HYBRID;break;default:return null;}
break;case'microsoft':type=this.map.GetMapStyle();switch(type){case Msn.VE.MapStyle.Road:return Mapstraction.ROAD;break;case Msn.VE.MapStyle.Aerial:return Mapstraction.SATELLITE;break;case Msn.VE.MapStyle.Hybrid:return Mapstraction.HYBRID;break;default:return null;}
break;default:alert(this.api+' not supported by Mapstraction.getMapType');}}
Mapstraction.prototype.getBounds=function(){switch(this.api){case'google':var gbox=this.map.getBounds();var sw=gbox.getSouthWest();var ne=gbox.getNorthEast();return new BoundingBox(sw.lat(),sw.lng(),ne.lat(),ne.lng());break;case'yahoo':var ybox=this.map.getBoundsLatLon();return new BoundingBox(ybox.LatMin,ybox.LonMin,ybox.LatMax,ybox.LonMax);break;case'microsoft':var mbox=this.map.GetMapView();var nw=mbox.TopLeftLatLong;var se=mbox.BottomRightLatLong;return new BoundingBox(se.Latitude,nw.Longitude,nw.Latitude,se.Longitude);break;}}
Mapstraction.prototype.setBounds=function(bounds){var sw=bounds.getSouthWest();var ne=bounds.getNorthEast();switch(this.api){case'google':var gbounds=new GLatLngBounds(new GLatLng(sw.lat,sw.lon),new GLatLng(ne.lat,ne.lon));this.map.setCenter(gbounds.getCenter(),this.map.getBoundsZoomLevel(gbounds));break;case'yahoo':if(sw.lon>ne.lon)
sw.lon-=360;var center=new YGeoPoint((sw.lat+ne.lat)/2,(ne.lon+sw.lon)/2);var container=this.map.getContainerSize();for(var zoom=1;zoom<=17;zoom++){var sw_pix=convertLatLonXY_Yahoo(sw,zoom);var ne_pix=convertLatLonXY_Yahoo(ne,zoom);if(sw_pix.x>ne_pix.x)
sw_pix.x-=(1<<(26-zoom));if(Math.abs(ne_pix.x-sw_pix.x)<=container.width&&Math.abs(ne_pix.y-sw_pix.y)<=container.height){this.map.drawZoomAndCenter(center,zoom);break;}}
break;case'microsoft':this.map.SetMapView([new VELatLong(sw.lat,sw.lon),new VELatLong(ne.lat,ne.lon)]);break;}}
Mapstraction.prototype.getMap=function(){return this.map;}
function LatLonPoint(lat,lon){this.lat=lat;this.lon=lon;this.lng=lon;}
LatLonPoint.prototype.toYahoo=function(){return new YGeoPoint(this.lat,this.lon);}
LatLonPoint.prototype.toGoogle=function(){return new GLatLng(this.lat,this.lon);}
LatLonPoint.prototype.toMicrosoft=function(){return new VELatLong(this.lat,this.lon);}
LatLonPoint.prototype.toString=function(){return this.lat+', '+this.lon;}
LatLonPoint.prototype.distance=function(otherPoint){var d,dr;with(Math){dr=0.017453292519943295;d=cos(otherPoint.lon*dr-this.lon*dr)*cos(otherPoint.lat*dr-this.lat*dr);return acos(d)*6378.137;}
return-1;}
LatLonPoint.prototype.equals=function(otherPoint){return this.lat==otherPoint.lat&&this.lon==otherPoint.lon;}
function BoundingBox(swlat,swlon,nelat,nelon){this.sw=new LatLonPoint(swlat,swlon);this.ne=new LatLonPoint(nelat,nelon);}
BoundingBox.prototype.getSouthWest=function(){return this.sw;}
BoundingBox.prototype.getNorthEast=function(){return this.ne;}
BoundingBox.prototype.isEmpty=function(){return this.ne==this.sw;}
BoundingBox.prototype.contains=function(point){return point.lat>=this.sw.lat&&point.lat<=this.ne.lat&&point.lon>=this.sw.lon&&point.lon<=this.ne.lon;}
BoundingBox.prototype.toSpan=function(){return new LatLonPoint(Math.abs(this.sw.lat-this.ne.lat),Math.abs(this.sw.lon-this.ne.lon));}
function Marker(point){this.location=point;this.onmap=false;this.proprietary_marker=false;this.pinID="mspin-"+new Date().getTime()+'-'+(Math.floor(Math.random()*Math.pow(2,16)));}
Marker.prototype.setChild=function(some_proprietary_marker){this.proprietary_marker=some_proprietary_marker;this.onmap=true}
Marker.prototype.setLabel=function(labelText){this.labelText=labelText;}
Marker.prototype.setInfoBubble=function(infoBubble){this.infoBubble=infoBubble;}
Marker.prototype.setIcon=function(iconUrl){this.iconUrl=iconUrl;}
Marker.prototype.toYahoo=function(){var ymarker;if(this.iconUrl){ymarker=new YMarker(this.location.toYahoo(),new YImage(this.iconUrl));}else{ymarker=new YMarker(this.location.toYahoo());}
if(this.labelText){ymarker.addLabel(this.labelText);}
if(this.infoBubble){var theInfo=this.infoBubble;YEvent.Capture(ymarker,EventsList.MouseClick,function(){ymarker.openSmartWindow(theInfo);});}
return ymarker;}
Marker.prototype.toGoogle=function(){var options=new Object();if(this.labelText){options.title=this.labelText;}
if(this.iconUrl){options.icon=new GIcon(G_DEFAULT_ICON,this.iconUrl);}
var gmarker=new GMarker(this.location.toGoogle(),options);if(this.infoBubble){var theInfo=this.infoBubble;GEvent.addListener(gmarker,"click",function(){gmarker.openInfoWindowHtml(theInfo);});}
return gmarker;}
Marker.prototype.toMicrosoft=function(){var pin=new VEPushpin(this.pinID,this.location.toMicrosoft(),this.iconUrl,this.labelText,this.infoBubble);return pin;}
Marker.prototype.openBubble=function(){if(this.api){switch(this.api){case'yahoo':var ypin=this.proprietary_marker;ypin.openSmartWindow(this.infoBubble);break;case'google':var gpin=this.proprietary_marker;gpin.openInfoWindowHtml(this.infoBubble);break;case'microsoft':var pin=this.proprietary_marker;var el=$(this.pinID+"_"+this.map.GUID).onmouseover;setTimeout(el,1000);}}else{alert('You need to add the marker before opening it');}}
function Polyline(points){this.points=points;this.onmap=false;this.proprietary_polyline=false;this.pllID="mspll-"+new Date().getTime()+'-'+(Math.floor(Math.random()*Math.pow(2,16)));}
Polyline.prototype.setChild=function(some_proprietary_polyline){this.proprietary_polyline=some_proprietary_polyline;this.onmap=true;}
Polyline.prototype.setColor=function(color){this.color=color;}
Polyline.prototype.setWidth=function(width){this.width=width;}
Polyline.prototype.setOpacity=function(opacity){this.opacity=opacity;}
Polyline.prototype.toYahoo=function(){var ypolyline;var ypoints=[];for(var i=0,length=this.points.length;i<length;i++){ypoints.push(this.points[i].toYahoo());}
ypolyline=new YPolyline(ypoints,this.color,this.width,this.opacity);return ypolyline;}
Polyline.prototype.toGoogle=function(){var gpolyline;var gpoints=[];for(var i=0,length=this.points.length;i<length;i++){gpoints.push(this.points[i].toGoogle());}
gpolyline=new GPolyline(gpoints,this.color,this.width,this.opacity);return gpolyline;}
Polyline.prototype.toMicrosoft=function(){var mpolyline;var mpoints=[];for(var i=0,length=this.points.length;i<length;i++){mpoints.push(this.points[i].toMicrosoft());}
var color;var opacity=this.opacity||1.0;if(this.color){color=new VEColor(parseInt(this.color.substr(1,2),16),parseInt(this.color.substr(3,2),16),parseInt(this.color.substr(5,2),16),opacity);}else{color=new VEColor(0,255,0,opacity);}
mpolyline=new VEPolyline(this.pllID,mpoints,color,this.width);return mpolyline;}
var geo_maps=new Array();var num_maps=0;var geo_map;function geopress_storezoom(elem){$('geopress_map_zoom').value=geo_map.getZoom();}
function geopress_makemap(map_id,name,lat,lon,map_format,map_type,map_controls,map_zoom){num_maps=geo_maps.push(new Mapstraction("geo_map"+map_id,map_format))-1;var myPoint=new LatLonPoint(lat,lon);if(map_controls)
geo_maps[num_maps].addControls(map_controls);geo_maps[num_maps].setCenterAndZoom(myPoint,map_zoom);geo_maps[num_maps].setMapType(map_type);var marker=new Marker(myPoint);marker.setInfoBubble(name);geo_maps[num_maps].addMarker(marker);}
function geopress_setmap(){geo_map.removeAllMarkers();var myPoint=new LatLonPoint(30,-90);geo_map.setCenterAndZoom(myPoint,8);var marker=new Marker(myPoint);marker.setInfoBubble("@ Pointed");geo_map.addMarker(marker);}
var geocoder=new GClientGeocoder();function addPointToMap(point){geo_map.removeAllMarkers();marker=new Marker(point);geo_map.setCenterAndZoom(point,10);marker.setInfoBubble(point.toString());geo_map.addMarker(marker);}
function returnObjById(id)
{if(document.getElementById)
var returnVar=document.getElementById(id);else if(document.all)
var returnVar=document.all[id];else if(document.layers)
var returnVar=document.layers[id];return returnVar;}
function addAddressToMap(response,element){if(!element)
element="geometry";if(!response||response.Status.code!=200){alert("Sorry, we were unable to geocode that address");}else{place=response.Placemark[0];point=new LatLonPoint(place.Point.coordinates[1],place.Point.coordinates[0]);addPointToMap(point);returnObjById(element).value=place.Point.coordinates[1]+", "+place.Point.coordinates[0];}}
function showLocation(addr,geometry){if(!addr)
addr='addr';if(!geometry)
geometry='geometry';var address=returnObjById(addr).value;var geom=returnObjById(geometry).value;if(geom){if(matches=geom.match(/(.+),[ ]+(.+)/)){setMapPoint(new LatLonPoint(matches[1],matches[2]));return false;}}
if(address){if(matches=address.match(/\[(.+),[ ]?(.+)\]/)){setMapPoint(new LatLonPoint(matches[1],matches[2]));}else{geocoder.getLocations(address,function(response){addAddressToMap(response,geometry)});}}}
function geocode(element,geometry){if(element==null)
element='addr';returnObjById('geometry').value="";showLocation(element,geometry);}
function findLocation(address){returnObjById('addr').value=address;showLocation();}
var gPoint;function setMapPoint(point){geo_map.removeAllMarkers();addPointToMap(point);}
function setClickPoint(point){returnObjById('geometry').value="";returnObjById('addr').value="["+point+"]";return setMapPoint(point);}
function geopress_resetMap(){geo_map.setCenterAndZoom(new LatLonPoint(0,0),1);}
function geopress_addEvent(obj,evType,fn){if(obj.addEventListener){obj.addEventListener(evType,fn,false);return true;}else if(obj.attachEvent){var r=obj.attachEvent("on"+evType,fn);return r;}else{return false;}}
function geopress_loadsaved(oSel){var addr=oSel.options[oSel.selectedIndex].value;var name=oSel.options[oSel.selectedIndex].text;document.getElementById("geometry").value="";addrobj=document.getElementById("addr");locnameobj=document.getElementById("locname");addrobj.value=addr;locnameobj.value=name;oSel.selectedIndex=0;}
function checkEnter(e,elem){var characterCode;if(e&&e.which){e=e
characterCode=e.which}
else{e=event
characterCode=e.keyCode}
if(characterCode==13){geocode();return false}
else{return true}}
function geopress_change_controls(oSel){var map_controls_pan=document.getElementById("map_controls_pan").checked;var map_controls_zoom=document.getElementById("map_controls_zoom").value;var map_controls_overview=document.getElementById("map_controls_overview").checked;var map_controls_map_type=document.getElementById("map_controls_map_type").checked;var map_controls_scale=document.getElementById("map_controls_scale").checked;geo_map.addControls({pan:map_controls_pan,zoom:map_controls_zoom,overview:map_controls_overview,scale:map_controls_scale,map_type:map_controls_map_type});}
function geopress_change_map_format(){var map_format=document.getElementById("map_format").value;geo_map.swap(map_format);}
function geopress_change_view(){var type_string=document.getElementById("map_view_type").value;var type;switch(type_string){case"satellite":type=Mapstraction.SATELLITE;break;case"road":type=Mapstraction.ROAD;break;case"hybrid":type=Mapstraction.HYBRID;break;default:type=Mapstraction.HYBRID;break;}
geo_map.setMapType(type);}
function geopress_change_zoom(){var zoom_level=document.getElementById("default_zoom_level").value;geo_map.setZoom(zoom_level);}
