The Temperature Effect and Surface State Resonance in Medium Energy Electron Diffraction by Crystals