Because it's more or less a global, and not restricted to that function. It made more sense when I had the script tag in the head instead of at the bottom of the body. Should I put it inside?