Hey Kev,
I just read an article that talked about a javascript function that will pass variables back to the parent window. I have the bookmark at work, so I can post it up tommorrow, but just so you know in the mean time: yes it can be done.
The other thing to consider is that session variables can be accessed and assigned over multiple browsers. The javascript way is much easier for what you want to do I think.
jack