The Hubbard model in the limit of strong Coulomb interaction (the (t-J) model) is studied by the diagram technique for Hubbard operators. The generalized random-phase approximation (GRPA) is formulated as an approximation taking into account electron loop-type diagrams. Within the framework of this approximation, both the dynamic magnetic and dielectric susceptibilities are calculated for a wide interval of electron concentrations, 0 < n < 1. The magnetic susceptibility shows a crossover in the magnetic behaviour of the system from pure itinerant magnetism to magnetism with localized magnetic moments. The crossover occurs at a critical point, n(c), when the chemical potential for electrons of the lower Hubbard band changes sign. Magnetic phase diagrams are constructed on the (t/U, n) plane at T = 0 for different types of crystal lattices. The behaviour of magnetic phases with temperature is also studied. The GRPA leads to a too drastic crossover, especially at low temperatures, because of insufficient allowance for the charge and spin fluctuations on a site. Summation of special diagram series shows that the Gaussian fluctuations of the effective electric and magnetic fields lead to a smoother picture of the crossover.