function isEmail(txt) { return (/^\w+([\.-]?\w+)*@\w+([\.-]?\w+)*(\.\w{2,3})+$/.test(txt)); }
function isZip(txt) { return (/(^\d{5}$)|(^\d{5}-\d{4}$)/.test(txt)); }

function prepareInputsForHints()
{
  var inputs = document.getElementsByTagName("input");
  for (var i=0; i<inputs.length; i++)
  {
    inputs[i].onfocus = function ()
    {
      if (this.parentNode.getElementsByTagName("span")[0]) this.parentNode.getElementsByTagName("span")[0].style.display = "inline";
    }
    inputs[i].onblur = function ()
    {
      if (this.parentNode.getElementsByTagName("span")[0]) this.parentNode.getElementsByTagName("span")[0].style.display = "none";
    }
  }
}