Javascript pagecontrollers