// JavaScript Document function realMeat(butcher, baker, theID) { // enables hiding e-mail addresses to help prevent spam robots from grabbing the addresses off of the web pages // butcher should be the user name, baker should be the server, theID should be the id of the link // if theID is not included it is assumed that the link id is the same as the username // must use href="#" onClick="realMeat('xxx');" form for the URL // !! This will NOT WORK properly with href="javascript:realMeat('xxx')" form // construct the URL from broken up pieces and the encoded at. var salami = "mai"; var pastrami = String.fromCharCode(64); salami += "lto:"; // set the default mail server if (baker == null | baker == "") baker = "ctaar.rutgers.edu"; if (theID == null) theID = butcher; // test for a modern DOM-compliant browser if (document.getElementById) { // locate the link where we will place the address plasticWrap = document.getElementById(theID); if (plasticWrap) { plasticWrap.href = salami + butcher + pastrami + baker; } else { // someone forgot to set the link id, so just display the address. alert(butcher + pastrami + baker); } } else { // older browser, so do something different // this will work for Netscape 4.x document.location= salami + butcher + pastrami + baker; } } // end realMeat