There are many ways to do it. You can create a "friction" variable that multiplies with the old and new x and y values to give an "ease out" effect.
A much easier way of doing it is to use the Greensock TweenLite engine and apply the easeOut settings. The smoothing functions are already built-in, and you simply select which one you want.