In IE.
window === top; // false
window === window.window // false
window == top; // true
window == window.window // true
In FF3.6 & Chr
window tends to be the global object, rather than the page. window.window would be a property of that global object called "window" so in theory they should never be identical (===) but may be similar (==) since that global object is in the global scope.
I haven't tested this, but as a guess, you may have better luck comparing self (the current page) and parent