So I did a vQmod that attaches the javascript to the order status being changed to 'completed' - on the assumption you haven't changed your order status' about, and completed is "5" for you, this ought to work. This is a 1.5.x mod - tried it on 1.5.2 & 3 - would have thought it would be fine for most.
Anyway, I've used plenty of stuff from folk on here, so thought I'd give something back
