Quote Originally Posted by Igor Vartanov View Post
In fact, John kindly gave you a complete explanation. If it's too difficult for you to follow it, I would suggest you to simplify your sample a bit, get it working, and only after that go with something more complex. While you fight with your code you can upload current state of your project to the forum to let other people just fix it here and there. This will be much more effective than asking people to provide you a sample for your very specific case.
Thanks Sir.