Move inner script in custom_dialog.xul to new JS file