Browser Shake

I have a javascript that will do a browser shake, but how can I get Flash (or the actionscript rather) to trigger the script? I have a client who wants a repetitive shake opening for a site. ( I know, I know, give me a break) Appreciate any quick help!!!