Drupal has a Taxonomy module for categorizing content. The module can generate a select box based on the defined taxonomy. However, it does not support option groups. I figured I’d share my modification for those who’d like to do the same. It was based on code from a Drupal forum post which I think was based on Drupal 5, not 6.