function change_status(nav_list)
{
    if (document.getElementById && ('undefined' != document.style))
    {
        if ('block' == document.getElementById(nav_list).style.display)
        {
            document.getElementById(nav_list + '_button').src = '/gfx/plus.gif';
            document.getElementById(nav_list).style.display   = 'none';
        }
        else
        {
            document.getElementById(nav_list + '_button').src = '/gfx/minus.gif';
            document.getElementById(nav_list).style.display   = 'block';
        }
    }
}

function highlight_form_field(form_field)
{
    if ('undefined' != form_field.className)
    {
        form_field.className = 'highlight';
    }
}

function blur_form_field(form_field)
{
    if ('undefined' != form_field.className)
    {
        form_field.className = 'default';
    }
}

function auto_tab(field, next_field)
{
    if (field.value.length >= field.maxLength)
    {
        next_field.focus();
    }
}

window.onload = function()
{
    if (document.getElementById)
    {
        for (x = 0; x < document.forms.length; x++)
        {
            for (i = 0; i < document.forms[x].elements.length; i++)
            {
                if (('text' == document.forms[x].elements[i].type) || ('textarea' == document.forms[x].elements[i].type) || ('password' == document.forms[x].elements[i].type))
                {
                    var obj         = document.getElementById(document.forms[x].elements[i].id);
                    obj.className   = 'default';
                    obj.onfocus     = function() { highlight_form_field(this); }
                    obj.onblur      = function() { blur_form_field(this); }
                }
            }
        }
    }

    if ('undefined' != typeof(default_onload))
    {
        default_onload();
    }

    if ('undefined' != typeof(section_onload))
    {
        section_onload();
    }
}

function download_file(file, page)
{
    var sp2 = (window.navigator.userAgent.indexOf('SV1') != -1);

    if (sp2)
    {
        window.open(file,'dlwindow','toolbar=0, location=no, directories=0, status=0, scrollbars=no,resizable=0, width=1, height=1, top=0, left=0');
        window.focus();
    }

    location.href = page;
}
