    function goToLocation(form)
    {
        var selectedIndex = -1;
        var validate = false;
        var action;

        for (var i=selectBoxLevel.length-1; i>=0; i--) {
            if ((selectedIndex = eval("form.nvgtBarLvl" + i).selectedIndex) != 0) {
                var gidValue = eval("form.nvgtBarLvl" + i).options[selectedIndex].value;
                if (gidValue.match("itm")) {
                    gidValue = gidValue.replace("itm", "");

                    if (location.protocol.match("http"))
                        action="product_details.jsp";
                    else
                        action="product_details" + calcMD5("gid=" + gidValue) + ".html";
                }
                else {
                    gidValue = gidValue.replace("dir", "");

                    if (location.protocol.match("http"))
                        action="product_list.jsp";
                    else
                        action="product_list" + calcMD5("gid=" + gidValue) + ".html";
                }
                validate = true;
                break;
            }
        }

        if (validate) {
            if (location.protocol.match("http"))
                location = action + "?gid=" + gidValue;
            else
                location = action;
        }
        return false;
    }
    
    function getOptions(gid, recursive, level) {
        var optionArray = new Array();
        var tempArray = new Array();       
        var currentLvlItems = eval(gid);
        for (var i=0; i<currentLvlItems.length; i++) {
            if (recursive == "1" && currentLvlItems[i][0].match("dir")) {
                tempArray = getOptions(currentLvlItems[i][0], recursive);
                for (var j=0; j<tempArray.length; j++) {
                    optionArray[optionArray.length] = tempArray[j];
                }
            }
            else {
                var showName = currentLvlItems[i][1];
                if (showName.length > levelWidth[level])
                    showName = showName.substring(0,(levelWidth[level]-2)) + "...";
                optionArray[optionArray.length] = new Option(showName, currentLvlItems[i][0]);
            }
        }
        return optionArray;
    }

    function levelChange(form, selectBoxIndex) {
        levelChangeLan(form, selectBoxIndex, "Please Select");
    }
    
    function levelChangeLan(form, selectBoxIndex, str) {
        var thisLvlGid = -1;

        if (selectBoxIndex < selectBoxLevel.length-1) {
            if (selectBoxIndex == -1)
                thisLvlGid = "dir" + rootDirId;
            else {
                var thisSelectBox = eval('form.nvgtBarLvl' + selectBoxIndex);
                thisLvlGid = thisSelectBox.options[thisSelectBox.selectedIndex].value;
            }

            var nextSelectBox = eval('form.nvgtBarLvl' + (selectBoxIndex+1));

            var nextLvlOptions = getOptions(thisLvlGid, selectBoxLevel[selectBoxIndex+1], selectBoxIndex+1);

            nextSelectBox.options[0] = new Option(str, "-1");
            for (var i=0; i<nextLvlOptions.length; i++) {
                nextSelectBox.options[i+1] = nextLvlOptions[i];
            }
            for (var j=nextSelectBox.length-1; j>i; j--) {
                nextSelectBox.options[j] = null;
            }
            nextSelectBox.options[0].selected = true;
            nextSelectBox.focus();
            
            var currentSelectBox;
            for (var i=selectBoxIndex+2; i<selectBoxLevel.length; i++) {
                currentSelectBox = eval('form.nvgtBarLvl' + i);
                currentSelectBox.options[0] = new Option("---------------", "-1");

                for (var j=currentSelectBox.length-1; j>0; j--) {
                    currentSelectBox.options[j] = null;
                }
                currentSelectBox.options[0].selected = true;
            }
        }
    }