I would like to execute a JavaScript function after the page was loaded. At the moment I have a commandButton and everything works fine. However it would be more comfortable
Include (at the bottom of your page) jQuery library within your and then use $(document).ready as usual:
$(document).ready
...