Eric H. Jung wrote: >I try to reuse the IDs, but this isn't always possible since sometimes >1 dialog is open at the same time, and I often need to be able to close the dialogs programmatically. > > Normally you would locate the window by its windowtype rather than its document element's id?