Electrooptical Switching in a One-Dimensional Photonic Crystal