 // With onkeypress event, this verifies “Enter” key
 /*
    Note: The verify key function is usually not necessary, but it was written to account for an bug in some older versions of Mozilla. The bug has been fixed in the latest releases, but it previously activated the onkeypress event when a user hit the Tab key, making it impossible to tab past the link without activating the event. 
    thanks to: http://cookiecrook.com/AIR/2003/train/eventhandlers.php#eh_fn03
 */
function verifyKey(oElement,oEvent){
  if(oEvent.keyCode==13 && oElement.onclick){
    oElement.onclick();
  }
}

function emailSave()
{
  var atchar = $$('span.mailattitute');
  
  atchar.each(function(el, i)
    {
       var ref = el.getProperty('title') ;
       ref = ref.replace('/pleaseNoAd/', '@');
       el.setProperty('href', ref);
       
       var value = el.innerHTML ;
       
       value = value.replace('/pleaseNoAd/', '@');
       
        var newLink = new Element('a', {
            'styles': {},
            'class': 'myClassSuperClass',
            'href': 'mailto:'+ref
        });       
       newLink.innerHTML = value;
       
       el.replaceWith(newLink);       
       
    }, this);


  return false;
}
window.addEvent('domready', emailSave);
