Hi,

I just had a quick look through the source of SWFObject (here - though I don't know if this is the latest version?) It looks like it does use the object element for IE. Actually, it also looks like it only writes the object tag for IE and only the embed tag for other browsers. This would simplify my function a little, since you would now only need a single value for the id attribute as SWFObject would handle setting up the id on the correct element. Then to get the movie all you'd need would be,

Code:
var mov = document.getElementById('the-movie-id');
As for the zIndex function, IE's z-indexing has been driving me nuts recently too. It was something I'd hoped IE 7 would sort - but apparently not. In your function the document.layers stuff is all to support netscape 4.x. To be honest, I don't know how many people still include that in their requirements as a browser that needs to be supported. I'm certain I haven't written any code for it in quite a while (which is something that makes me very happy )

For your general DOM access/modification/creation as long as you have a pretty much well formed document to begin with all the getElementById, getElementsByTagName, createElement, appendChild, removeChild, innerHTML and so on, should be reliable across all modern (and some not so modern) browsers - I'd reckon this would cover IE 5+, Firefox, Opera 7+ and Safari (off the top of my head the only common exception I can think of running into was that IE 5.x doesn't understand getElementsByTagName('*'))

Other areas are less solid. For example event handling, IE has it's own model that's frustratingly different (and lacking in features) compared with the W3C model. So you often find lot's of code that handles the differences there. Although this is one of the areas I think all the Javascript libraries really do a good job with (I think I mentioned YUI's event utility before )

In general I don't think it's nearly as hopeless a situation as with CSS

Oh yeah, http://www.quirksmode.org has excellent browser compatibility charts.