JavaScript slider module based on given points of curve.