Constructing a Rectangle with a Given Diagonal

Construction Algorithm
1 Construct a line AC as a given diagonal of the rectangle.
2 Construct M as a midpoint of the diagonal AC.
3
Construct a free line through M.
4 Construct a circle centered at M and has a radius AM.
5 Generate the intersection points between the circle and the free line at B and D to get the third and the fourth vertices of the rectangle.
6 Join up the four points A, B, C and D to get the required rectangle.
7 Switch to Move Mode. Pick a free element. Move it around to check your construction.
Construction Theorems
A rectangle is a parellelogram with two equal diagonals.

A parallelogram is a quadrilateral, in which diagonals bisect each other.
Please enable Java for an interactive construction (with Cinderella).