Some JS to manage the ui of a portal with