create bouncing ball using javascript