var crypt_key = "5ODGJP@-NbuYktjy_ziqCcngrHBafU037oZ2sQhE.m19MKeLpIARvxlVdWX8FS6w4T"; var chr_base = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz@.0123456789_-"; function Print_Mail(encoded, linkText) { document.write("<a hr"+"ef=\"ma"+"ilto"+":"+decode(encoded)+"\">"+decode(encoded)+"</"+"a>"); } function decode(str) { return codec(crypt_key, chr_base, str); } function codec(from, to, str) { var codedResult = ""; for (i = 0; i < str.length; i++) { current = str.charAt(i); idx = from.indexOf(current); nextVal = (idx == -1) ? current : to.charAt(idx); codedResult += nextVal; } return codedResult; } 