javascript for GUI