  We investigate the Josephson current between two superconductors (S) which
are connected through a diffusive magnetic junction with a complex structure
(F$_{c}$). Using the quantum circuit theory, we obtain the phase diagram of 0
and $\pi$ Josephson couplings for F$_{c}$ being a IFI
(insulator-ferromagnet-insulator) double barrier junction or a IFNFI structure
(where N indicates a normal metal layer). Compared to a simple SFS structure,
we find that the width of the transition, defined by the interval of exchange
fields in which a $0-\pi$ transition is possible, is increased by insulating
barriers at the interfaces and also by the presence of the additional N layer.
The widest transition is found for symmetric F$_{c}$ structures. The symmetric
SIFNFIS presents the most favorable condition to detect the temperature induced
$0-\pi$ transition with a relative width, which is five times larger than that
of the corresponding simple SFS structure.
