[BISERVER-9012] -- Updated launch.js to use common function, replacing c...

...ode repetition