// This file is used to hide the email links from spiders and spambots
function buildaddresses(id) {
  firstpart = ['info','vidatansey','sannavr','irishhorsemanship'];
  nextpart = ['midlandwesterndressage','hotmail','yahoo','horsetrekkingireland'];
  lastpart = ['com','ie'];
  addresses = [['info',0,0,0],['vidatansey',1,1,0],['rosannaryan',2,1,0],['karenvincencio',3,2,1],['sineadmcgrath',0,3,0]];
  for (i = 0; i < addresses.length; i++) {
    if (id == addresses[i][0]) {
      return address = firstpart[addresses[i][1]] + '@' + nextpart[addresses[i][2]] + '.' + lastpart[addresses[i][3]];
    }
  }
}

function sendemail(id) {
  buildaddresses(id);
  window.document.location.href = 'mailto:' + address;
}

function writeemail(id) {
  buildaddresses(id);
  window.document.write('<a href="#" onClick="sendemail(\''+id+'\');return false;" title="click to send an email" onMouseOver="window.status=\'\';return true;">' + address + '</a>');
}
