JS: Firefox and onLoad

Hi,
I’m having a problem with Firefox executing a javascript on the page’s startup.
I’ve got a flash clip in the html that I wanna push to a certain frame right at the startup so I’ve used this:

</head>
<body onLoad="javascript:window.document.player.GotoFrame(2);

It works in IE but not in FF. When the page opens it just remains on the first frame which could be very confusing for the user. I’ve got to know that IE and FF treat this function differently but couldn’t figure out any working solution.
Any ideas?