Using hook_theme_registry_alter to only modify specific pages instead of all pages
For simple alterations, instead of implementing hook_elements(), you could simply implement hook_form_alter() or it's cousin hook_form_FORM_ID_alter(). Both of these functions will effectively allow you to (as their name suggests) alter a form's input elements, and they are much easier to implement than hook_elements(). The former gets called for every function in the website, while the later only gets called for the FORM_ID that you specified in your hook implementation.

If the ID of the form you wish to modify is my_form, then hook_form_FORM_ID_alter() would be written as hook_form_my_form_alter(). If you want a more thorough explanation of these two hooks, I highly recommend reading Lullabot's writeup on modifying Drupal 6 Forms.