You might have missed a bracket somewhere... Only such a mistake causes so many insignificant errors.
And to find it, format your code properly. It's your first debugging tool.
WaltP
Posting Sage w/ dash of thyme
11,404 posts since May 2006
Reputation Points: 3,421
Solved Threads: 1,055
Skill Endorsements: 37