function Jiami(){var c,d,e,f,a="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=",b="abcdefghijklmnopqrstuvwxyz";this.setJmstr=function(a){var e,c={"?":"v",'"':"s","[":"p","^":"g",_:"l","(":"j","-":"x",")":"k","+":"m","~":"a",":":"w",$:"e","{":"n","&":"h","<":"t","}":"o","@":"c",".":"z","#":"d","%":"f","!":"b","]":"q","*":"i",";":"r","=":"y",">":"u"},d=a.length,f="";for(e=0;d>e;e++)f+=c[a.substr(e,1)];return b=f,f},this.base64encode=function(b){var d,f,g,h,i,j,k,l,c="",m=0;for(b=e(b);m<b.length;)d=b.charCodeAt(m++),f=b.charCodeAt(m++),g=b.charCodeAt(m++),h=d>>2,i=(3&d)<<4|f>>4,j=(15&f)<<2|g>>6,k=63&g,isNaN(f)?j=k=64:isNaN(g)&&(k=64),c=c+a.charAt(h)+a.charAt(i)+a.charAt(j)+a.charAt(k);return l=c,l=l.replace(/\+/g,"!"),l=l.replace(/\//g,"."),l=l.replace(/\=/g,":")},this.encrypt=function(a,b){if(!a)return"";var d=this.base64encode(a);return d=c(d,b)},this.uncrypt=function(a,b){if(!a)return"";var c=d(a,b);return c=this.base64decode(c)},c=function(a,c){var g,h,j,d="",e="",f=a.length,i=b,k=parseInt(14*Math.random())+1;for(c&&26==c.length&&(i=c),10==k&&k++,g=0;f>g;g++)for(e=a.charCodeAt(g).toString(),d+="0",h=0;h<e.length;h++)j=parseInt(e.substr(h,1))+k,d+=i.substr(j,1);return""!=d&&(d=d.substr(1),d+="0"+k),d},d=function(a,c){a=a.replace(/[^a-z0-9]/g,"");var f,g,j,k,l,m,n,d="",e="",h=b,i={};for(c&&26==c.length&&(h=c),j=0;j<h.length;j++)i[h.substr(j,1)]=j;for(l=a.split("0"),n=l.length,m=parseInt(l[n-1]),j=0;n-1>j;j++){for(e=l[j],f="",k=0;k<e.length;k++)g=parseInt(i[e.substr(k,1)])-m,f+=g.toString();f=parseInt(f),d+=String.fromCharCode(f).toString()}return d},this.base64decode=function(b){var d,e,g,h,i,j,k,c="",l=0;for(b=b.replace(/\!/g,"+"),b=b.replace(/\./g,"/"),b=b.replace(/\:/g,"="),b=b.replace(/[^A-Za-z0-9\+\/\=]/g,"");l<b.length;)h=a.indexOf(b.charAt(l++)),i=a.indexOf(b.charAt(l++)),j=a.indexOf(b.charAt(l++)),k=a.indexOf(b.charAt(l++)),d=h<<2|i>>4,e=(15&i)<<4|j>>2,g=(3&j)<<6|k,c+=String.fromCharCode(d),64!=j&&(c+=String.fromCharCode(e)),64!=k&&(c+=String.fromCharCode(g));return c=f(c)},e=function(a){var b,c,d;for(a=a.replace(/\r\n/g,"\n"),b="",c=0;c<a.length;c++)d=a.charCodeAt(c),128>d?b+=String.fromCharCode(d):d>127&&2048>d?(b+=String.fromCharCode(192|d>>6),b+=String.fromCharCode(128|63&d)):(b+=String.fromCharCode(224|d>>12),b+=String.fromCharCode(128|63&d>>6),b+=String.fromCharCode(128|63&d));return b},f=function(a){for(var b="",c=0,d=c1=c2=0;c<a.length;)d=a.charCodeAt(c),128>d?(b+=String.fromCharCode(d),c++):d>191&&224>d?(c2=a.charCodeAt(c+1),b+=String.fromCharCode((31&d)<<6|63&c2),c+=2):(c2=a.charCodeAt(c+1),c3=a.charCodeAt(c+2),b+=String.fromCharCode((15&d)<<12|(63&c2)<<6|63&c3),c+=3);return b}}var jm=new Jiami;