Study on optical switching effect of photonic crystals with negative effective index of refraction