/*

Email Hide Function

This function takes the username & domain of an email address and puts them together and then prints them together inside an email link inside a document to help protect inline email address from spambots.  If you want the link text to be the email address just leave 'label' blank when calling the function.

*/

function emailLink(domain, username, label) {
  var label = label || "email";
  var email = username + "@" + domain;
  if (label == "email") {
    output = "<a href=\"mailto:" + email + "\">" + email + "</a>";
  } else {
    output = "<a href=\"mailto:" + email + "\">" + label + "</a>";
  };
  document.write(output);
};