I don't think I've explained this very well so I've knocked something up to do it a bit better. Everything is in-line, so the source is easy to follow (although it is a quick knock-up, so don't expect it to run through a validator first time

).
It can be found here:
http://www.bmtg.org.uk/test.html
Any assistance with this will be appreciated.
David.