What you want is a combination of cases 2,3 and 5:
PHP Code:
      case 2://active only (all tops when no cat selected)
        
if($cPath_top != $path_top and $cPath_top != 0$skip_cat 1;
        break;
      case 
3://full active tree, others per level
        
if($cPath_top != $path_top$test_level 1;
        break;

      case 
5:// show active, no top, per levels
        
if ($cat_depth == or $cPath_top != $path_top) {
          
$skip_cat 1;
        }else{
          
$test_level 1;
        } 
Something like this:
PHP Code:
      case 6://full active tree, per levels (only all tops when no cat selected)
        
if($cPath_top != $path_top and $cPath_top != 0$skip_cat 1;//skip all non-active tree
        
if($cPath_top == and $cat_depth != 0$skip_cat 1;//skip all subcats when none active
        
if($cPath_top == $path_top and $cPath_top != 0$test_level 1;//show active tree per level settings
        
break; 
Then use 6|1|3 for your define.
This allows your specific layout desire as well as many other variations of it.