Is there some reason you are putting all these functions in window.document?   Usually you just declare them as globals, like:

```
setSize = function (size) { ...
```

Also, it's confusing to me that you setMaximum, setValue, etc. are both the id's of DOMNodes and the names of global functions.   Perhaps that caused a conflict and that's why you put the functions in window.document, but it would be clearer to me if you just named them differently.