// This file is used to hide the email links from spiders and spambots
function buildaddresses(id) {
  firstpart = ['annecahill22','cassandra_h_uk','clodagh.hickey','emoloney','hennessy5','martine','naomi.donoghue','nicola','susihirschbsc','wfrank','bertelak','shellypmarsh'];
  nextpart = ['yahoo','yahoo.co','gmail','corkbic','eircom','hgtelekom','traleeequestriancentre','hotmail','castletowndressage'];
  lastpart = ['ie','uk','com','net'];
  addresses = [['annecahill',0,0,0],['cassandrafoley',1,1,1],['clodaghhickey',2,2,2],['eileenmoloney',3,3,2],['mariehennessy',4,4,3],['martinegreenlee',5,5,2],['naomidonoghue',6,2,2],['nicolahayes',7,6,2],['susihirsch',8,7,2],['wolfgangfrank',9,8,2],['louisefoley',10,1,1],['michellemarshall',11,0,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>');
}
