A computer program for hierarchical structures having multiple levels of nodes, the computer program comprising: steps for displaying the nodes in a hierarchical menu on a graphic user interface, wherein each node can be expanded or collapsed to any level by selecting a target level; and steps for displaying in the vicinity of the name of each node a conventional expand-and-collapse icon used to swap the expanded and collapsed states of each node, characterized in that: the computer program further comprises steps for gathering statistics about the current state of the hierarchical structure, for dynamically generating information from the statistics, for displaying a dynamic menu when the cursor is hovered over an icon, and for adjusting the information generated dynamically from the statistics based on the position of a selected node in the hierarchical structure, wherein the information that are generated from the statistics and which are contained in the dynamic menu comprises at least: the path of ancestor nodes from a root node to the selected node; at which level of expansion, within the branch of the hierarchical structure, the selected node resides; and to how many descendant levels this branch of the hierarchical structure can be expanded; wherein the dynamic menu further comprises: (a) for ancestor levels of the hierarchical structure above the selected node, options to collapse the hierarchical structure to the respective ancestor levels with a single action, (b) an entry identifying the selected node and in which level of expansion within the branch of the hierarchical structure the selected node resides; and (c) for descendant levels of the hierarchical structure below the selected node, options to display the nodes at the respective descendant levels. steps for displaying the nodes in a hierarchical menu on a graphic user interface, wherein each node can be expanded or collapsed to any level by selecting a target level; and steps for displaying in the vicinity of the name of each node a conventional expand-and-collapse icon used to swap the expanded and collapsed states of each node, the computer program further comprises steps for gathering statistics about the current state of the hierarchical structure, for dynamically generating information from the statistics, for displaying a dynamic menu when the cursor is hovered over an icon, and for adjusting the information generated dynamically from the statistics based on the position of a selected node in the hierarchical structure, wherein the information that are generated from the statistics and which are contained in the dynamic menu comprises at least: the path of ancestor nodes from a root node to the selected node; at which level of expansion, within the branch of the hierarchical structure, the selected node resides; and to how many descendant levels this branch of the hierarchical structure can be expanded; (a) for ancestor levels of the hierarchical structure above the selected node, options to collapse the hierarchical structure to the respective ancestor levels with a single action, (b) an entry identifying the selected node and in which level of expansion within the branch of the hierarchical structure the selected node resides; and (c) for descendant levels of the hierarchical structure below the selected node, options to display the nodes at the respective descendant levels.