Surface waves in finite one-dimensional photonic crystals: mode coupling