Bugfix: resize don't get element as parameter, so it fails in fullscreen

Coding style changes (following http://javascript.crockford.com/code.html)