Please do not hijack an old post...I've moved this to a new topic.
You've posted a considerable amount of code with no explanation or question. I'd suggest 1) boiling it down to an SSCCE 2) ask a...