function buttonselect0123CAA(hObject, eventdata, Empty_Button, AxesC, AxesA, uonoff, uonoffC, vers)
data = get(Empty_Button,'UserData');

if data.isAFSC*data.isAFSA == 0
    if (isfield(data,'full') == 0) || (isfield(data.full,'isC')*isfield(data.full,'isA') == 0) || (data.full.isC*data.full.isA == 0)
        set(uonoff(1), 'Value', 1);
        set(uonoffC(1), 'Value', 1);
        return;
    end
end

if vers == 1
    if get(uonoff(1), 'Value')
        data.motion = 0;
        data.motionC = 0;
        set(uonoffC(1), 'Value', 1);
    elseif get(uonoff(2), 'Value')
        data.motion = 1;
        data.motionC = 0;
        set(uonoffC(1), 'Value', 1);
    elseif get(uonoff(3), 'Value')
        data.motion = 2;
        data.motionC = 0;
        set(uonoffC(1), 'Value', 1);
    else
        data.motion = 3;
        data.motionC = 0;
        set(uonoffC(1), 'Value', 1);
    end
else
    if get(uonoffC(1), 'Value')
        data.motion = 0;
        data.motionC = 0;
        set(uonoff(1), 'Value', 1);
    elseif get(uonoffC(2), 'Value')
        data.motion = 0;
        data.motionC = 1;
        set(uonoff(1), 'Value', 1);
    elseif get(uonoffC(3), 'Value')
        data.motion = 0;
        data.motionC = 2;
        set(uonoff(1), 'Value', 1);
    else
        data.motion = 0;
        data.motionC = 3;
        set(uonoff(1), 'Value', 1);
    end
end
if data.motion > 0
    data.choosen(data.motion) = 0;
end
if data.motionC > 0
    data.choosenC(data.motionC) = 0;
end
set(Empty_Button,'UserData',data);
