JavaScript solution

Tested on Chrome only. It would be quite sad if it didn't work on another browser - though you never know with IE...