/**
 * Typo3 encryt email address
 * 
 * @info does not work on html elements
 *       nee
 * @author mp
 * @return encoded email string
 */
function UnCryptMailto( s ) {
    var n = 0;
    var r = "";
    var shift = 2;
    for( var i = 0; i < s.length; i++) {
        n = s.charCodeAt(i);
        if(n >= 8364) {
            n = 128;
        }
        r += String.fromCharCode(n - shift);
    }
    
    return r;
}

/**
 * Typo3 link encryt email address
 * Sets the link mailto link opened in the email client
 * 
 * @info does not work on html elements
 * @author mp
 * @return void
 */
function linkTo_UnCryptMailto( s ) {
    e = UnCryptMailto(s);
    e = e.replace('*', ":");
    location.href = e;
}
