  We prove an infinite dimensional KAM theorem. As an application, we use the
theorem to study the two-dimensional nonlinear Schr\"{o}dinger equation
$$iu_t-\triangle u +|u|^2u+\frac{\partial{f(x,u,\bar u)}}{\partial{\bar u}}=0,
\quad t\in\Bbb R, x\in\Bbb T^2$$ with periodic boundary conditions, where the
nonlinearity $\displaystyle f(x,u,\bar u)=\sum_{j,l,j+l\geq6}a_{jl}(x)u^j\bar
u^l$, $a_{jl}=a_{lj}$ is a real analytic function in a neighborhood of the
origin. We obtain for the equation a Whitney smooth family of small--amplitude
quasi--periodic solutions which are partially hyperbolic.
