You can use the standard HTML link elements to include JavaScript files, just like you would in plain HTML. Some
JSF tagsets do support a special "include script" tag which has the added convenience that it allows you to use an app-relative URL to find the script instead of having to hard-code the application context part of the script URL. I can't tell if IceFaces is one of them - they don't seem to carry a "reference card" listing of the tags available for quick lookup.
jQuery has a standard and well-documented way of calling functions when a page has loaded. You can use this to start your timer.
The secret of how to be miserable is to constantly expect things are going to happen the way that they are "supposed" to happen.
You can have faith, which carries the understanding that you may be disappointed. Then there's being a willfully-blind idiot, which virtually guarantees it.