Repair my dotSUB SRT

The SRT like exported by dotSUB can't be read by tools like Subtitle Workshop because of missing zeros. This page/script repairs that problem.
Paste the SRT like exported by dotSUB into the Text area and press "Repair!".
Save the corrected SRT in a text file again. Now you can open the subtile file in Subtitle Workshop.

Repair Code (c) 2007 Pierre Gorissen. Re-use any way you like, just have a look at the page source.
All you need is a couple of regular expressions and some JavaScript code.