/* 
 * SAFE MAILDISPLAY SCRIPT version 09-05-16
 * 
 * Stub for a "library" useful for confusing spambots etc.
 * Godric <godric(at)korh.cz>
 * 
 * This will only work, if bot doesn't interpret javaScript or at least doesn't 
 * perform any operations more complex than simple string editing (for example
 * method fromCharCode or operator ++). Note that most probable possibility
 * is bot will not interpret anything, or if he will interpret, he will be able
 * to gain mail addresses. One way or other, any function below is far better
 * solution, than writing "mailto:some@mail.com" etc. directly into html,
 * inviting all spambots directly into your e-mail.
 * 
 * Typical use:
 * <script>klikMail('godric','korh.cz')</script>
 * - Replaces this part of code by clickable link specified by host and login 
 * <script>email('godric','korh.cz')</script>
 * - Replaces this part of code by plaintext e-mail specified by host and login
 * 
 * NOTE: Why all this bullshit is even here?
 */

/* Writes clickable e-mail link (login@host) to document */   
function klikMail(login,host)
{
  a=63;
  a++;
  atMarker=String.fromCharCode(a);
  //space for additional confusing operations
  mail=login+atMarker+host;
  document.write('<a href="mailto:'+mail+'">'+mail+'</a>');
};

/* Writes plaintext e-mail (login@host) to document */
function email(login,host)
{
  a=63;
  a++;
  atMarker=String.fromCharCode(a);
  mail=login+atMarker+host;
  document.write(mail);
};

