what changes should i do in this function so that it will print alll categories and sub categories
function nav_item($key, $navlink, $class, $level=null)
{
$this->output('<LI CLASS="qa-'.$class.'-item'.(@$navlink['opposite'] ? '-opp' : '').
(@$navlink['state'] ? (' qa-'.$class.'-'.$navlink['state']) : '').' qa-'.$class.'-'.$key.'">');
$this->nav_link($navlink, $class);
if (count(@$navlink['subnav'])>0){
$this->nav_list($navlink['subnav'], $class, 1+$level);
}
$this->output('</LI>');
}