This thread

has your answer.

Let me know if you need help with implementing it and i can help wink