Hmmm - I've been doing some playing with the idea, and it seems that, at least with IE, it is not be possible to do it with 100% "common sense factor" built in...
What I mean by this is that it would work most of the time, but there are a few things that don't seem possible to detect - primarily:
My idea above works fine when clicking around on elements within the window (that can have a focus handler attached), but when clicking between the window and the address bar (which we cannot harness), the window would still close.
Of course, it being a popup means that you may choose to open it without an address bar... If it does not have one, the idea is quite workable - although it is still possible that things like alert boxes, popup menus, other browser modifications, etc, which cannot have a focus will still cause the window to close.
After looking into it, I'd say that it probably isn't worth (a) the hassle, or (b) the chances of a false positive.
Hope this helps,
Dan
what we would class as being blurred is not really always detectable