You forgot the beginning var, so you're creating a global variable here. Actually... you're creating a global variable anyhow, but it's still better to put the 'var'