Just read Global Variables Are Bad.
Yup, I did it for all the wrong reasons.
If it wasn't for your help doing it your way would have taken me a half hour.