dude may i suggest using the 'Small' syntax tags when you post some code, it makes it MUCH easier to read, and it keeps your indentation. That code is extremely hard to follow as it is.
also based on where your compile error is, wouldnt it be at a guess, the fact that youve got