  We have developed a toy model for internal shocks which has been used to
generate a large number of synthetic GRBs in order to find in the parameter
space the conditions which can lead to the formation of X-ray flashes. The key
condition appears to be a small contrast of the Lorentz factor in the
relativistic wind emitted by the central engine.
