var d = String.fromCharCode(46);
var a = String.fromCharCode(64);
var g = String.fromCharCode(62);
var l = String.fromCharCode(60);
document.write(l + 'style type="text/css"' + g + '.noscript { display: none } ' + l + '/style' + g);

function parsespans(){
  var spans = document.getElementsByTagName('span');
  var pattern = new RegExp("(^|\b)" + 'email' + "(\b|$)");
  for(var i = 0; i < spans.length; i++){
    if(pattern.test(spans[i].className)) convertemail(spans[i]);
  };
};
function convertemail(ipelem){
  var i = 0;
  var addr = getcontents(ipelem);
  
  if(addr.indexOf('@') > 0) ipelem.innerHTML = l + 'a href="mailto:' + addr + '"' + g + addr + l + '/a' + g;
};

function getcontents(ipelem){
  cont = '';
  if(ipelem.hasChildNodes()){ //Nasty cludge due to inconsistencies handling javascript within the node
    for(i = 0; i < ipelem.childNodes.length; i++){
      if(ipelem.childNodes[i].nodeValue != null) cont = cont + ipelem.childNodes[i].nodeValue;
    };
  }else if(typeof ipelem.innerText != undefined) cont = ipelem.innerText;
  else if(typeof ipelem.textContent != undefined) cont = ipelem.textContent;
  return cont;
};

if(window.attachEvent) window.attachEvent("onload", function(){parsespans()});
else if(window.addEventListener) window.addEventListener("load", function(){parsespans()}, false);
else document.addEventListener("load", function(){parsespans()}, false);

function dw(c){document.write(c);};
