Electrooptic switch