var _id = 1;
function gonav(obj) {
    //    var content = document.getElementById("topdiv");
    //    var n = content.getElementsByTagName("li").length;
    var id = obj.id.split("nav")[1];
    if (id != _id) {
        document.getElementById("nav" + _id).className = "nav";
        if (id != "0" && id != "1") {
            document.getElementById("nav" + (Number(_id) - 1)).className = "nav";
            document.getElementById("nav" + (Number(id) - 1)).className = "nav1";
        }

        if (id == "1") {
            document.getElementById("nav0").className = "navleft";
        }
        else {
            document.getElementById("nav0").className = "navleft1";
        }
        document.getElementById("nav" + id).className = "navxz";
        _id = id;
    }
}
function setNav() {
    var content = document.getElementById("topdiv");
    var n = content.getElementsByTagName("li").length;
    for (var i = 0; i < n; i++) {
        document.getElementById("nav" + i).onclick = function() { gonav(this) };
        if (document.getElementById("nav" + i).className == "navxz") {
            _id = i;
        }
    }
}

function setNavLink(url1, url2) {
    var objLeft = window.parent.frames['LeftIframe'];
    var objContent = window.parent.frames['InfoFrame'];

    objLeft.location.href = url1;
    if (url2.length > 0) {
        objContent.location.href = url2;
    }
}