Dear All,
Thank you very much for your help and advice.
Unfortunately there is no hope for us to upgrade MediaSurface for another year or so and we don’t have a Perl developer either to help us out.
I have solved this issue with a very crude, hard-coded solution.
Thank you again for you time.