ims_get_mode
now = ims_get_mode(inm, ims, 1);
then = ims_get_mode(inm, ims, 0);
if (fmode != ims_get_mode(inm, ims, 1)) {