www.simple-palm.com

Scroll down to the 'Treo Button' app.

It lets you customize the behavior when the treo's lid is opened, as well as when the jog-dial is activated while the lid is closed.

Check it out.