That is a lot of code and most of the comments are not in English. You will have to describe the problem that is happening, because I have no idea what this is doing and what it should be doing....