Creating a anti-gravity [repulsion] field

Hey there,

Im trying to create anti gravity field. I have a ball that starts at the top of the stage, and is forced down by gravity. As it reaches the bottom of the field, id like it to fly back up against gravity. The net result is that the ball will bob around between the gravity and the anti gravity.

I need to set this up so that the repulsion force is stronger near the bottom of the stage, and that gravity is stronger nearer to the top. At the moment my code is simply:


_root.gravity = 0.8;

_root.onEnterFrame = function() {
_root.ball._y += _root.gravity;

This is obviously linear and wont do! Im assuming I can do the same thing, but make the ball._y -= repulsion force? I dont know how to do it on a log scale, im not very good at maths. Any thoughts?!