Alexey,

Super! Not only did you get it working but you did a very intelligent thing, , you did your best, got some tips, and then plowed ahead and solved it yourself and learned by doing so. Most excellent, glad to help. (And I bet others reading your work learned something too!)

Toadman