Conversion of photons into gravitons and vice versa in a static electromagnetic field