// common JavaScript code shared across site...

// chgLnk fixes obfuscated e-m-a-i-l address replacing the original link
// by one created when the user moves the mouse over the link the first
// time in order to disable automated collecting by webbots
//function chgMailLnk(id,addr,domain) {
//  obj=document.getElementById(id);
//  lnk='mailto:' + addr + '\@' + domain;
//  obj.innerHTML ='<a id="'+id+'_changed" href="'+lnk+'">'+lnk+'</a>';
//  };

// showMailLink obfuscates an e-m-a-i-l address replacing the original link
// by one created when the user moves the mouse over the link the first
// time in order to disable automated collecting by webbots
function showMailLink(id,addr,domain) {
  if (addr) {
    addr = addr + '\@' + domain;
    obj=document.getElementById(id);
    if (obj.innerHTML!=addr) {
      obj.innerHTML=addr;
      obj.href='mailto:'+addr;
      };
    };
  };

// boolean function tests if enter key pressed
function rtnKey(evt) {
  evt = (evt) ? evt : event;
  var code = (evt.charCode) ? evt.charCode :
    ((evt.which) ? evt.which : evt.keyCode);
  return (code==13 || code==3);
  };

// get document element id shortcut.
var id = function (element) {
   return document.getElementById(element);
  };

// test for existance of id.
var idExists = function(id) {
  return typeof(document.getElementById(id))!="undefined";
  };

