Use var for local variables in functions so they don't override the global