OK your code is very hard to read the code tags work by putting them before the start of your code and closing them at the end not on every line.

But from the looks of things I would agree with...