http://www.delphi-helper.com/daupd1.zip

The original version of the AVL tree code contained a bug that made it perform some rotations incorrectly. To reproduce the bug, add these items in order:

	0 1 2 3 4 5 6 7 8 9

Then delete these items in order:

	2 1 0 7

You will notice that some of the nodes have disappeared.

The program was doing the Right-Left rotation incorrectly (page 166). It was doing the first half correctly, but then it did not update the parent of the node it swapped during ReplaceRightmost. That left the parent pointing its old child not the swapped one.

I added a parent parameter to ReplaceRightmost so it can correctly update that pointer.
