public static function getNavigation($callerBadgerRoot)
    {
        global $badgerDb;
        NavigationFromDB::$callerBadgerRoot = $callerBadgerRoot;
        $settings = new UserSettings($badgerDb);
        $itemTypes = array('i' => 'item', 'm' => 'menu', 's' => 'separator');
        $sql = 'SELECT navi_id, parent_id, menu_order, item_type, item_name, tooltip, icon_url, command
			FROM navi
			ORDER BY parent_id, menu_order';
        $res =& $badgerDb->query($sql);
        $menus = array();
        $row = array();
        while ($res->fetchInto($row, DB_FETCHMODE_ASSOC)) {
            $menuId = $row['parent_id'];
            //create containing menu if it does not exist
            if (!isset($menus[$menuId])) {
                $menus[$menuId] = array();
            }
            //fill most of the fields
            $menus[$menuId][] = array('type' => $itemTypes[$row['item_type']], 'name' => getBadgerTranslation2("Navigation", $row['item_name']), 'tooltip' => $row['tooltip'], 'icon' => BADGER_ROOT . "/tpl/" . $settings->getProperty("badgerTemplate") . "/Navigation/" . $row['icon_url'], 'command' => NavigationFromDB::replaceBadgerRoot($row['command']));
            //if current row is a menu
            if ($row['item_type'] == 'm') {
                //create sub-menu if it does not exist
                if (!isset($menus[$row['navi_id']])) {
                    $menus[$row['navi_id']] = array();
                }
                //add menu field to the previously created item and assign a reference to the proper
                //sub-menu to it
                $menus[$menuId][count($menus[$menuId]) - 1]['menu'] =& $menus[$row['navi_id']];
            }
        }
        //All sub-menus are within element 0 as references
        return $menus[0];
    }