Maybe you should describe what you are trying to do. If you are concerned the var is defined outside of the function, creating a global would be no different, right?