Thanks kleinma.

Thats a really tidy solution. just what I was looking for.