// Mithat Konar's Javascript email protector
// Writes a link of the form: <a href=mailto:address@dom.com>address@dom.com<\/a>  
// Based on code by Steve Dawson http://www.b-link.co.uk/stevedawson/script_hide_email_.php

var address;
var dom;
var tld;
var linkText

function prote(address, dom, tld) {
  var first = 'ma';
  var second = 'il';
  var third = 'to:';
  document.write('<a href="');
  document.write(first+second+third);

  document.write(address);
  document.write('&#64;');
  document.write(dom);
  document.write('.');
  document.write(tld);  
  document.write('">'); 

  document.write(address);
  document.write('&#64;');
  document.write(dom);
  document.write('.');
  document.write(tld);  

  document.write('<\/a>');
}

function proteText(address, dom, tld, linkText) {
  var first = 'ma';
  var second = 'il';
  var third = 'to:';
  document.write('<a href="');
  document.write(first+second+third);

  document.write(address);
  document.write('&#64;');
  document.write(dom);
  document.write('.');
  document.write(tld);  
  document.write('">'); 

  document.write(linkText);  

  document.write('<\/a>');
}
