Update javascript/pagecontrol.js

Fixed issue where pages/frames added with JS aren't hidden after init when switching pages.
Now, we get a fresh set of frames to be hidden before switching pages.