Accessing a popup from a second popup in IE

Got a frustrating problem here - works fine in FF/Chrome/Safari etc… but IE is causing me problems - I will explain:

I am trying to access a dialog box that is launched from the tinymce editor - if I click on the image button in the editor a dialog is popped up for me to enter a url into the box - I have a 3rd party script which adds a button here so I can click on it and launch my file browser so in short the process is:

Main window ->click tinymce image button -> image dialog appears -> click ‘image finder button’ -> image manager appears - GREAT.

Now if I navigate to the image of my choice, select it - what is supposed to happen is that the new browser window closes and passes the url of the selected image back to the dialog box - works in FF etc… but not in IE.

The new file manager window uses a callback script where the error is occurring - the callback code is:

window.tinymceFileWin.document.forms[0].elements[window.tinymceFileField].value = url;
window.tinymceFileWin.focus();
window.close();

It is working perfectly in FF but not IE and the problem is in the above callback - IE does not recognise the name allocated to the window and always return null for ‘window.tinymceFileWin’ - on Firebug in FF I can see the entire document tree.

Anyone got any ideas how to make it work in IE.

Big thanks.