<SCRIPT>
A = 62;
Function encode (){
VaR code = Document. getelementbyid ('code'). value;
Code = code. Replace (/[\ r \ n] +/g ,'');
Code = code. Replace (/'/g ,"\\'");
VaR TMP = code. Match (/\ B (\ W +) \ B/G );
TMP. Sort ();
VaR dict = [];
VaR I, T = '';
For (VAR I = 0; I <TMP. length; I ++ ){
If (TMP [I]! = T) dict. Push (t = TMP [I]);
}
VaR Len = dict. length;
VaR ch;
For (I = 0; I <Len; I ++ ){
Ch = num (I );
Code = code. Replace (New Regexp ('\ B' + dict [I] + '\ B', 'G'), ch );
If (CH = dict [I]) dict [I] = '';
}
Document. getelementbyid ('code '). value = "eval (function (P, A, C, K, E, D) {e = function (c) {return (C <? '': 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 }("
+ "'" + Code + "'," + A + "," + Len + ", '" + dict. join ('|') + "'. split ('|'), 0 ,{}))";
}
Function num (c ){
Return (C <? '': Num (parseint (C/A) + (C = C % A)> 35? String. fromcharcode (C + 29): C. tostring (36 ));
}
Function run (){
Eval (document. getelementbyid ('code'). value );
}
Function decode (){
VaR code = Document. getelementbyid ('code'). value;
Code = code. Replace (/^ eval /,'');
Document. getelementbyid ('code'). value = eval (CODE );
}
Function encode2 (){
VaR code = Document. getelementbyid ('code'). value;
VaR kode = code;
X = '';
For (I = 0; I <kode. length; I ++ ){
C = kode. charcodeat (I) + 3;
If (C> 128) Alert (kode. charat (I) + "___" + C + "___" + (128-c ));
// If (C> 128 ){
// X + = "\\\\" + (c-128 );
//} Else {
X + = string. fromcharcode (c)
//}
}
Kode = x
Document. getelementbyid ('code '). value = "kode = \" "+ kode. replace (/\ "/IMG ,"\\\""). replace (/\ r/IMG, "\ r "). replace (/\ n/IMG, "\ n") + "\"; "+" x = ''; for (I = 0; I <kode. length; I ++) {c = kode. charcodeat (I)-3; if (C <0) C ++ = 128; X ++ = string. fromcharcode (c)} kode = x ";
}
</SCRIPT>
<Textarea id = Code Cols = 80 rows = 20>
</Textarea>