
function getElement(id) {
    if (document.getElementById)
    {
        // this is the way the standards work
        return document.getElementById(id);
    }
    else if (document.all)
    {
        // this is the way old msie versions work
        return document.all[id];
    }
    else if (document.layers)
    {
        // this is the way nn4 works
        return document.layers[id];
    }
}

function toggleLayer(whichLayer)
{
    var style = getElement(whichLayer).style;
    style.display = style.display == "block" ? "none" : "block";
}

function togglePassword(passwordfieldID) 
{
    getElement("PasswordSpan").style.display = "inline"
    getElement(passwordfieldID).focus();
    getElement("ShadowPasswordSpan").style.display = "none";
}

function clearField(fieldID) 
{
    getElement(fieldID).value = "";
}
