JS to reload on each unit switch