I keep seeing warnings not to use global variables in JavaScript, but it seems that the only reason people say that is because the clogs up the global namespace. I can imagi
If your script is very long and you use these variables from lots of functions it will increase your debugging time since the value of the global variable could have been changed from anywhere so if you are tracking where this changed to a non-expected value you'll have to check them all.
This scenario is even more painful if different programmers modify this variable from other scripts included in your page.