Is this even possible?
The situation is, I don't control the embedded flash, and I have no way of knowing whether it is embedded with wmode=tranparent/opaque or wmode=window. This means in the first 2 situations I can put my html content on top, just by using z-index, but in the last situation (wmode=window) I have no control.
Does anybody know a way to overcome this problem?
You can't, the whole point of wmode=window is to put the plugin in an overlay window that goes on top of the main browser window - it isn't actually possible for the browser to draw on top of it.