function selectNode(name)
{
    if(name == null) return;

    var elements = document.getElementsByName(name);
    if(elements.length == 0) return;

    var container = document.getElementById("nav");
    if(container == null) return;
    container.scrollTop = elements.item(0).offsetTop - container.offsetTop - 20;
}

function openPopup(url)
{
    var popup = window.open(url, "_popup", "height=650,width=350,location=no,menubar=no,scrollbars=yes,status=no,toolbar=no");
    if(popup == null) return;
	popup.focus();
}

function setTableRowBackground()
{
    var tables, rows, row, i, j;
    
    tables = document.getElementsByTagName("table");

    for(i = 0; i < tables.length; i++)
    {
        rows = tables[i].getElementsByTagName("tr");

        for(j = 0; j < rows.length; j++)
        {
            row = tables[i].rows[j];

            if(j % 2 == 0)
            {
                row.style.backgroundColor = "#fafafa";
                row.style.color = "#333";
            }
            else
            {
                row.style.backgroundColor = "#efefef";
                row.style.color = "#666";
            }
        }
    }
}
