here is an another forum post wich is deals with a similar problem:
the task is not exactly the same, so you need to adapt to yours, but the logic behind is what are you need.
here is an another forum post wich is deals with a similar problem:
the task is not exactly the same, so you need to adapt to yours, but the logic behind is what are you need.