Do you expect a helpful reply with not much info provided apart from the lines and lines of code.

Refer to my post here