Sorry man,

Anyway I managed to modify your code to fit my needs.
Thanks a lot.