Crockford (page 120) recommends that vars should not be declared mid-block (and if you were to use JSLint it would choke). See Crockford page 120.