  We investigate the dynamics of an injected outflow propagating in a
progenitor in the context of the collapsar model for gamma-ray bursts (GRBs)
through two dimensional axisymmetric relativistic hydrodynamic simulations.
Initially, we locally inject an outflow near the center of a progenitor. We
calculate 25 models, in total, by fixing its total input energy to be 10^{51}
ergs s^{-1} and radius of the injected outflow to be $7\times 10^7$ cm while
varying its bulk Lorentz factor, $\Gamma_{0} = 1.05\sim 5$, and its specific
internal energy, $\epsilon_0/c^2 = 0.1\sim 30$. The injected outflow propagates
in the progenitor and drives a large-scale outflow or jet. We find a smooth but
dramatic transition from a collimated jet to an expanding outflow among
calculated models. The maximum Lorentz factor is, on the other hand, sensitive
to both of $\Gamma_0$ and $\epsilon_0$; roughly $\Gamma_{\rm max} \sim \Gamma_0
(1+\epsilon_0/c^2)$. Our finding will explain a smooth transition between the
GRBs, X-ray rich GRBs (XRRs) and X-ray Flashes (XRFs) by the same model but
with different $\epsilon_0$ values.
