Did you read the sample code that does what your asking in the _samples folder? It's called modifying a dialog using JS or something like that. MMan I'm feeling sassy.
See how far that gets you and come back. You can probably force the _target thing by adding a another event watcher, or just setting the default or something
Re: Modifying the Link dialog
See how far that gets you and come back. You can probably force the _target thing by adding a another event watcher, or just setting the default or something