You need to give more information concerning the
error message. A tidbit more of the code may help. You
may need to go back and thoroughly check your syntax,
it can get confusing after looking at it for a
while. Back off momentarily and then review it, that may
help.