// taxonomy_image specific functions
function taxonomy_location_admin() {
  global $form_values;
  $op = $_POST['op'];
  $tid = $_POST['tid'];

  // TODO: Use menus, not arg()

  if (empty($op)) {
    $op = arg(3);
  }

  switch ($op) {
    case 'location':
      if (arg(4) == 'add' || arg(4) == 'edit') { 
        $output = drupal_get_form('taxonomy_location_form', (array)(_taxonomy_location_get(arg(5))));
        break;
      }
      $output = taxonomy_location_overview();
      break;
    case t('Save'):
      $output = taxonomy_location_save($tid);
      $output = taxonomy_location_overview();
      break;
    case t('Delete'):
      $output = taxonomy_location_delete($tid);
      $output = taxonomy_location_overview();
      break;
    default:
      $output = taxonomy_location_overview();
  }

  print theme('page', $output);
}
