/*USO:
<a style="cursor: pointer;" href="JavaScript:transpose('domain.com','accountname')">Contatto</a>
*/
function transpose(d,n){
    // alert(n);
    var email =d+'@'+n
    NewString = reencode(email);
    parent.location = 'mailto:'+NewString;
}
function reencode(email){
    var TempBefore = '';
    var TempAfter = '';
    var NewString = '';
    var Start = 0;
    var WhereHash = email.indexOf ('@');
    for (Count = 1; Count <= WhereHash; Count ++){
        TempBefore += email.substring (Start, Count);
        Start++
    }
    Start = WhereHash;
    Start ++
    WhereHash +=2;
    for (Count = WhereHash; Count <=email.length; Count++){
        TempAfter +=email.substring (Start, Count)
        Start++
    }
    NewString = TempAfter +'@' + TempBefore;
    return NewString;
}
