add beforemodechange event to make sure combo is always associated with time agent see https://github.com/opengeo/mapstory/issues/535