function doHighlight(elementName)
{
var defaultBGcolor="#eee";
var defaultFGcolor="#000";
var hoverBGcolor="yellow";
var hoverFGcolor="#006";
for (var i=0;i<whatTag(elementName).length;i++)
    {
    var currentEl=whatTag(elementName)[i];
    if (document.getElementById)
        {
        currentEl.onfocus=function(){this.style.backgroundColor=hoverBGcolor;this.style.color=hoverFGcolor;};
        currentEl.onblur=function(){this.style.backgroundColor=defaultBGcolor;this.style.color=defaultFGcolor;};
        }
    }
}
function highlightFormInput()
{
doHighlight("INPUT");
doHighlight("TEXTAREA");
doHighlight("SELECT");
}
function whatTag(tagName)
{
var value=document.getElementByTagName?document.getElementByTagName(tagName):document.all.tags(tagName);
    return value;
}
if (document.all)
{
    window.onload = highlightFormInput;
}
var notAlpha    = /[^a-z \-\.\,']/gi;
var isEmail     = /^\w(\.?[\w-])*@\w(\.?[\w-])*\.[a-z]{2,6}(\.[a-z]{2})?$/i;
var isDecimal   = /^\d+(\.\d+)?$/;