var atsynonym  = '&&1388&&'; // das @
var dotsynonym = '%%1388%%'; // Punkt
var barsynonym = '__1388__'; // Strich

function decodeString(myEncStr) {
  var tmp;
  tmp = myEncStr.replace( eval("/" + atsynonym + "/"), '@');
  tmp = tmp.replace( eval("/" + dotsynonym + "/g"), '.');
  tmp = tmp.replace( eval("/" + barsynonym + "/g"), '-');
  return(tmp);
}

function printLink(myEncStr, withclass, withcaption) {
  var decStr = decodeString(myEncStr);
  with ( document ) {
    open();
    if ( withclass && withclass != '') {
      if ( withcaption && withcaption != '') {
        document.writeln("<a href=\"mailto:" + decStr + "\" class=\"" + withclass + "\">" + withcaption + "</a>");
      } else {
        document.writeln("<a href=\"mailto:" + decStr + "\" class=\"" + withclass + "\">" + decStr + "</a>");
      }
    } else {
      if ( withcaption && withcaption != '') {
        document.writeln("<a href=\"mailto:" + decStr + "\">" + withcaption + "</a>");
      } else {
        document.writeln("<a href=\"mailto:" + decStr + "\">" + decStr + "</a>");
      }
    }
    close();
  }
}

