Euclidean Proof of the Pythagorean Theorem

In this model a triangle obtained by cutting one of the smaller squares along its diagonal is transformed step-by-step into a certain triangular piece of the square on the hypotenuse. Prove that the area of the triangle does not change under these transformations, and explain how to derive the Pythagorean theorem from this fact.