Synchronization Between the Laser and Electron Beam in a Photocathode RF Gun