A Galerkin approximation for the Zakai equation