Accountpreferences

I checked the javascript code with jslint and changed the code a bit
to be 100% valid with JSLint.