// The purpose of this JavaScript is to protect em#ail addresses from harvesters. For that 
// reason, words like em#ail and mai#lto are separated with pound signs to disguise them

// This JavaScript takes a username (and an optional domain), and then opens an em#ail window
// from a Web browser; it replaces a "mai#lto" link
function emailUs(userName,domain){
  // if domain is not given, it assigns it a value of "" (empty string)
  domain = (domain == void 0 ) ? "":domain;
  var at = "@";
  
  // An obvious default error em#ail address username
  if (userName == ""){
    userName = "error";
  }
  
  // If domain is empty (99.99% of the time) this assigns it a value of 'odu.edu'
  if (domain == ""){
    domain = "odu" + "." + "ed" + "u";
  }
  
  // Concatonates em#ail address
  var wholeEmailAddress = userName + at + domain;
  
  // Writes mai#lto em#ail string
  var linkAndAll = "mai" + "lto:" + wholeEmailAddress;
  
  window.location.href = linkAndAll;
}
