function theme_taxonomy_tree($vid) {
$terms = taxonomy_get_tree($vid);
$tree = array();
$items = array();
foreach($terms as $term) {
$items[$term->tid]['data'] = theme('term_in_tree', $term);
$tree[$term->tid] =& $items[$term->tid];
foreach($term->parents as $parent_tid) {
if($parent_tid != 0) {
unset($tree[$term->tid]);
$items[$parent_tid]['children'][$term->tid] =& $items[$term->tid];
}
}
}
return theme('item_list', array_values($tree));
}