
function addLoadEvent(func)
{
  // Script by Simon Willison
  // http:simon.incutio.com/
  
  var oldonload = window.onload;
  if (typeof window.onload != 'function')
  {
    window.onload = func;
  }
  else
  {
    window.onload = function()
    {
      oldonload();
      func();
    }
  }
}



// Dates
// Copyright 2006 Professional Website Design.
// For other useful scripts and tutorials, see
// http://www.professorscodingcorner.com/
// You may use or modify the script in any way
// you want, but do not remove the first four
// lines above. Although it's not required, I
// would appreciate an email to let me know
// the URL of the page where are using it.

function currentYear()
{
  if (!document.getElementById("currentyear")) return false;
  var obj = document.getElementById("currentyear");
  var today = new Date();
  var year = today.getFullYear();
  var txt = document.createTextNode(year);
  obj.appendChild(txt);
  return true;
}



function mailTo()
{
  // Copyright 2006 Professional Website Design.
  // For other useful scripts and tutorials, see
  // http://www.professorscodingcorner.com/
  // You may use or modify the script in any way
  // you want, but do not remove the first three
  // lines above. Although it's not required, I
  // would appreciate an email to let me know
  // the URL of the page where you used it.
  //
  // Modified June 24, 2007.
  // Can now have more than one email link on a
  // page. Uses Class instead of Id. Now the 
  // containing element MUST be a span.

  if (!document.getElementsByTagName("span")) return false;
  var spans = document.getElementsByTagName("span");
  for (var i=0; i<spans.length; i++)
    {
      if (spans[i].className == "mailTo")
        {
          var anch = document.createElement("a");
          var email = "webmaster@government-publicrecords.com";
          var mailto = "mailto:" + email;
          anch.setAttribute("href",mailto);
          spans[i].appendChild(anch);
          var txt = document.createTextNode(email);
          anch.appendChild(txt);
        }
    }
  return true;
}


addLoadEvent(currentYear);
addLoadEvent(mailTo);
