function externalLinks() {
 if (!document.getElementsByTagName) return;
 var anchors = document.getElementsByTagName("a");
 for (var i=0; i<anchors.length; i++) {
   var anchor = anchors[i];
   if (anchor.getAttribute("href") &&
       anchor.getAttribute("rel") == "external")
     anchor.target = "_blank";
 }
}
window.onload = externalLinks;


//Encrypted Character is character_of(ascii-code(character) + 1)
//That means:
//encrypted(a) = b
//encrypted(z) = {
//encrypted(0) = 1
//encrypted(9) = :
//
//For special characters (not a-z) we use the following rules:
//encrypted(@) = %
//encrypted(-) = &
//encrypted(_) = #
//encrypted(.) = /
//
//Example:
//nbjmup;bcd&{vg#16:/rxf%uftu/dpn
//means
//mailto:abc-zuf_059.qwe@test.com
function decryptMailto( s )  {
  var n = 0;
  var r = "";
  for( var i = 0; i < s.length; i++)  {
    n = s.charCodeAt( i );
      
    if( n == 37 )  {
      n = 65;
    } else if( n == 38 )  {
      n = 46;
    } else if( n == 35 )  {
      n = 96;
    }

    r += String.fromCharCode( n - 1 );
  }
  return r;
}


function linkToDecryptMailto( s )  {
  location.href=decryptMailto( s );
} 
