/* ---------------------------------------------------------------------------------------- Graceful E-Mail Obfuscation - JavaScript function (decodes e-mail addresses) Last updated: July 31th, 2007 by Roel Van Gils ---------------------------------------------------------------------------------------- window.onload = function() { geo(); }//end fn */ /** * FUNCTION geo() * */ function geo() { if (!document.getElementsByTagName) { // Check for browser support return false; } else { var links = document.getElementsByTagName('a'); // Get all anchors for (var l=0; l= FF 1, N 4, IE 5.5 var address = href.replace(/.*stcatnoc\/([A-Za-z0-9\.\%\!\#\$\&\'\*\+\-\?\=\^\_\`\{\|\}]+)\~([a-z0-9._%-àáâãäåāăąæçćĉċčďđèéêëēĕėęěŋðĝğġģĥħìíîïĩīĭįıĵķĸĺļľłñńņňòóôõöøōŏőœŕŗřśŝşšţťŧþùúûüũūŭůűųŵýÿŷźżž]+)\~([a-z.]+)/i, '$1' + '@' + '$2' + '.' + '$3'); var linktext_new = href.replace(/(.*stcatnoc\/)([A-Za-z0-9\.\%\!\#\$\&\'\*\+\-\?\=\^\_\`\{\|\}]+)\~([a-z0-9._%-àáâãäåāăąæçćĉċčďđèéêëēĕėęěŋðĝğġģĥħìíîïĩīĭįıĵķĸĺļľłñńņňòóôõöøōŏőœŕŗřśŝşšţťŧþùúûüũūŭůűųŵýÿŷźżž]+)\~([a-z.]+)/i, '$2' + '@' + '$3' + '.' + '$4'); var linktext = anchor.innerHTML; // IE Fix if (href != address) { // replace decrypted url with mailto plus original e-mail address anchor.setAttribute('href','mailto:' + str_rot13(address,map)); // Add mailto link // the placeholder is being erplaced by the decrypted e-mail address (anchor text, visible, clickable text) if (!linktext.search(/(E-Mail)/i)) { linktext = str_rot13(linktext_new,map); }//end if anchor.innerHTML = linktext; // IE Fix /** change tooltip (tooltip is set to none-js-version per default and altered via these lines) */ anchor.setAttribute('title',tooltip_js_on); // Display tooltip when links are hovered }//end if }//end fn /** * FUNCTION rot13init() * */ function rot13init() { var map = new Array(); var s = "abcdefghijklmnopqrstuvwxyz"; for (var i = 0 ; i < s.length ; i++) map[s.charAt(i)] = s.charAt((i+13)%26); for (var i = 0 ; i < s.length ; i++) map[s.charAt(i).toUpperCase()] = s.charAt((i+13)%26).toUpperCase(); return map; }//end fn /** * FUNCTION str_rot13() * */ function str_rot13(a,map) { var s = ""; for (var i = 0 ; i < a.length ; i++) { var b = a.charAt(i); s += (b>='A' && b<='Z' || b>='a' && b<='z' ? map[b] : b); }//end for return s; }//end fn