Added Javascript to read settings from page