Initial javascript for settings form logic