Functional relations for the six-vertex model with domain wall boundary conditions