Effects of the relative phase relationships of gratings on diffraction from thick holograms