Displaying JQDialog in JS

Is there a way to both display and hide a TIWCGJQDialog using javascript in the browser rather than using an async call back to the server? (Clicking the "X" button at the top right closes the dialog so there must be some way to do it.)
Thanks, Peter
Thanks, Peter