function id(pId)
{
    return document.getElementById(pId);
}

function toggleVisibility(e1, e2, e3, e4, e5, e6, e7, e8, e9, e10)
{
    if (e1 != null)
        toggleElementVisibility(e1);
    if (e2 != null)
        toggleElementVisibility(e2);
    if (e3 != null)
        toggleElementVisibility(e3);
    if (e4 != null)
        toggleElementVisibility(e4);
    if (e5 != null)
        toggleElementVisibility(e5);
    if (e6 != null)
        toggleElementVisibility(e6);
    if (e7 != null)
        toggleElementVisibility(e7);
    if (e8 != null)
        toggleElementVisibility(e8);
    if (e9 != null)
        toggleElementVisibility(e9);
    if (e10 != null)
        toggleElementVisibility(e10);
    return true;
}

function toggleElementVisibility(elementId)
{
    var obj = document.getElementById(elementId);
    obj.style.display = (obj.style.display == "") ? "none" : "";
    return true;
}

function ajaxCheckPassword(pPassword, pFieldId)
{
    var fieldObj = id("pFieldId");

    var fieldTr = document.getElementById(pFieldName + "Tr");
    var fieldTd = document.getElementById(pFieldName + "Td");
    if (pPassword.length == 0)
    {
        fieldObj.style.display = "none";
    }
    else
    {
        fieldObj.style.display = "";
        var callback = function(pStatusCode, pResponseText)
        {
            fieldTd.innerHTML = pResponseText;
        };
        ajaxExecuteRequest("PasswordStrengthCheck.fvnx?password=" + pPassword, callback);
    }
}
