Update sessiontimeout.js

Fix for JS error that was breaking mega menus (and possibly other things).

Someone with a better understanding of JS should probably confirm.