A center manifold algorithm for nonlinear dynamic systems with time-delay and parametric excitation