PaulS:
It would really help you understand what your code is doing if you put every { on a new line, and used Tools + Auto Format.Code that jerks
all over the
page is very
hard to read.
I love answers like this because they fall into the "show, don't tell" category.