Is focus() broken in Safari?

So I’m trying to get a web page to force browser focus onto a SWF once a page loads. The code works fine in Firefox (naturally) and in IE (very surprisingly). But focus() seems to not work at all in Safari. I’ve reinstalled Safari, yet the problem persists. Did Safari’s developers decide to abandon focus()? Javascript code as follows:



function focusSWF(){

var foci = window.document.getElementsByName('objectNameInQuestion');
foci[0].focus();

}


I have also tried the Adobe-suggested coding replacing all that foci stuff above with



window.document.objectNameInQuestion.focus();

This worked in Firefox and IE but still not in Safari.

I ran Safari’s Javascript debugger and all it threw me was this:

[COLOR=Red][The HTML that caused this error was generated by a script.] Unmatched </embed> encountered. Ignoring tag.[/COLOR]

I gather it doesn’t like the AC_FL_RunContent generated <embed> tag and is going with the explicitly coded backup <embed> tag that goes in the <noscript> tag as the SWF shows up, despite not gain browser focus.

Any ideas?