[QUOTE=oneohthree;35632]Here is my revised code:

That code is entirely TOO complicated for the job you are trying to get done...
Hang tight for a bit...