/* With four arguments, use the zeroth as the username, the first as
the server, the second as the "title" (the hint shown when the mouse
pointer hovers over the link), and the third as the text printed on
the page.

With three arguments, use the zeroth and first as above, but also
concatenate these to obtain the printed text. Use the second as the
title.

With two arguments, as above, except no title.

With only one argument, use the only argument as the entire
address. */

function email() {
   if (arguments.length == 4) {
      document.write('<a title="'+arguments[2]+'" href="mailto:'+arguments[0]+'@'+arguments[1]+'">'+arguments[3]+'</a>');
   } else if (arguments.length == 3) {
      document.write('<a title="'+arguments[2]+'" href="mailto:'+arguments[0]+'@'+arguments[1]+'">'+arguments[0]+'@'+arguments[1]+'</a>');
   } else if (arguments.length == 2) {
      document.write('<a href="mailto:'+arguments[0]+'@'+arguments[1]+'">'+arguments[0]+'@'+arguments[1]+'</a>');
   } else if (arguments.length == 1) {
      document.write('<a href="mailto:'+arguments[0]+'">'+arguments[0]+'</a>');
   }
}

/* If javascript is enabled, we want to remove all occurences of tags
with the class 'toberemovedbyjs'. This is done with a small function
which is called when the window is loaded. */

function removetags() {
    $(".toberemovedbyjs").hide();
}

