function whoa(u) {
  alert("This is a very old email (circa 1999), so please consider using it carefully: " + u + ".\nIf your browser allows it, copy this email link from this alert");
}

function wurl(u) {
  var url1 = 'http://' + u;
  var url2 = 'http://web.archive.org/web/*/http://' + u;
  var yn = window.confirm("Select yes (OK) to see if the link is alive\nSelect no (Cancel) to try the wayback machine");
  if (yn) {
    window.open(url1);
  }
  else
  {
    window.open(url2);
  }
}

function wjs(u, n) {
  document.write('<a href=\'javascript:wurl(\"' + u + '\");\'>' + n + '</a>');
}

function ofs(u, d, o) {
  var n = u + '@' + d;
  if (!o) {
    o = n;
  }
  document.write('<a href=\'javascript:whoa(\"' + n + '\");\'>' + o + '</a>');
//  document.write('<a href=\"mailto:' + n + '\">');
//  document.write(o + '</a>');
}

function ofs2(u1, d1, u2, d2, o) {
  var n1 = u1 + '@' + d1;
  var n2 = u2 + '@' + d2;
  document.write('<a href=\'javascript:whoa(\"' + n1 + "%20" + n2 + '\");\'>' + o + '</a>');
//  document.write('<a href=\"mailto:' + n + '\">');
//  document.write(o + '</a>');
}
