public function filterDepth(&$Categories, $startDepth, $endDepth)
{
if ($startDepth != 1 || $endDepth) {
foreach ($Categories as $i => $Category) {
if (val('Depth', $Category) < $startDepth || $endDepth && val('Depth', $Category) > $endDepth) {
unset($Categories[$i]);
}
}
}
}