FSCommand help between actionscript and javascript

okay, my problem is that i am using FSCommand to call a javascript function in a parent frame, and i have to do it about 16 times or so inside a loop. well, actionscript iterates through the function calls very quickly, but javascript is extremely slow, creating timing errors for me.

so my question is, is there anyway to do a sort of wait command or something to stall a little bit so that FSCommand can return before the next one gets called? or some better way to communicate with external javascript?