I forgot to save the ejs source after I modified the code. That is the reason why the previous downloaded source  did not work.
So I have to modify the code again, and it should works fine now. The initial values for mass ratios are modified as (5/3. , 2.,3. -- according to your result.) 

The applet also shown the total energy (kinetic energy+potential energy) for all the balls, you will find out that there is only a very small change during the simulation(numerical error range).