// eMail Obfuscator Script 2.1 by Tim Williams - freeware
// Modified by Steve Hunt

// The coded email address is passed to this function as a parameter.
// Each character of the encyphered address is replaced by another
// character, offset from it in the cipher string.
// The offset for the first character is determined by the length of
// the address; the offset is incremented by 1 for each successive
// character.
// Characters which do not appear in the cipher string remain unsubstituted.
// Finally the HTML anchor mark-up is output using "document.write"

function decypher(coded)

{
  cipher = "aZbYcXdWeVfUgThSiRjQkPlOmNnMoLpKqJrIsHtGuFvEwDxCyBzA1234567890"
  shift=coded.length
  link=""
  for (i=0; i<coded.length; i++)
  {
    if (cipher.indexOf(coded.charAt(i))==-1)
    {
      ltr=coded.charAt(i)
      link+=(ltr)
    }
    else
    {     
      ltr = (cipher.indexOf(coded.charAt(i))-(shift+i)+cipher.length) % cipher.length
      link+=(cipher.charAt(ltr))
    }				
  }
      document.write("<a href='mailto:"+link+"'>"+link+"</a>")
}
