function displayPersonSection(id) {
    // display the appropriate person div
    var allDivs = document.getElementsByTagName("div");
    for (var i=0; i<allDivs.length; i++) {
        if ((allDivs[i].className.match(/peopleDisplay/g)) && allDivs[i].id != id) {
            allDivs[i].className = allDivs[i].className.replace("peopleDisplay", "peopleHide");
        }
        if ((allDivs[i].className.match(/peopleHide/g)) && (allDivs[i].id == id)) {
            allDivs[i].className = allDivs[i].className.replace("peopleHide", "peopleDisplay");
        }
    }

    // highlight the appropriate person link
    var allLinks = document.getElementsByTagName("a");
    for (var i=0; i<allLinks.length; i++) {
        if (allLinks[i].className.match(/submenuSelectedItem/g) && (allLinks[i].id != id)) {
            allLinks[i].className = allLinks[i].className.replace("submenuSelectedItem", "submenuItem");
        }
    }

    if (document.getElementById(id + "Link") != null) {
        document.getElementById(id + "Link").className =
            document.getElementById(id + "Link").className.replace("submenuItem", "submenuSelectedItem");
    }
}

function selectPerson() {
    var loc = String(document.location);
    var args = loc.split("?")[1];
    if (args != null) {
        var person = args.split("personId=")[1];
        if (person != null) {
            person = person.split("&")[0];
            displayPersonSection(person);
        }
    }
}

addLoadEvent(selectPerson);