try adding a setInterval() to the initial functioncall from after the image loads. Just make sure to set a clearInterval() in the actual function. A lot of times this may give just enough of a delay to solve similar problems.
USually 100-250 ms is enough time… See if that does anything…