/*
This script decrypts the email and creates a mailto link to prevent spam
Use only the reverse function to show the email

<a href="javascript:HideSpam('se.edmolift/info','mailto')">
<script type="text/javascript">document.write(decrypt('se.edmolift/info','reverse'))</script>
</a> 
*/

function decrypt (strEmail, action){
if (action=='reverse'){
    arrEmail   = strEmail.split ('/');
    strDomainName  = arrEmail[0].split('.').reverse().join('.');
    strEmailerName    = arrEmail[1].split('.').reverse().join('.');
    return strEmailerName+'@'+strDomainName;
    }else if (action=='link'){
    window.location = 'mailto:'+ decrypt(strEmail, 'reverse');
    }
}
