Set the id property of a form element using D6 Form API?
I would avoid changing that at all and use the Drupal-generated IDs in your Javascript. I have never been forced to do otherwise.

Keep in mind, however, that you'll have better luck if you use classes or if you prefer IDs that don't have a node ID or other sequence-based ID in them. For example, I try to avoid using IDs when theming webforms because if I create the webform on another site, the ID will change.

If there are existing styles for what you want to do, I would check which selectors they are using as well.

Remember that you can add your own classes with the theming layer and then you can use them for your Javascript or jQuery. Sometimes this is the best choice, and I've done it numerous times.

If worst comes to worst, implement hook_form_alter and change the #id in question. If your form continues working, then you're good.