function fcnbdBLA(hObject, eventdata, parentfig, Empty_Button, Buttons, AxesRAW, AxesZLF)
data = get(Empty_Button,'UserData');
SelTyp = get(gcbf, 'SelectionType');

if strcmp(SelTyp,'alt') == 1
    
    pt = get(hObject, 'CurrentPoint');
    sz = get(hObject, 'Position');
    x = pt(1,1:2)./sz(1,3:4);
    
    posD    = get(AxesRAW, 'Position');
    posA    = get(AxesZLF, 'Position');
    
    if (posD(1) < x(1)) && (x(1) < posD(1)+posD(3)) && (posD(2) < x(2)) && (x(2) < posD(2)+posD(4))
        tmpc = figure;
        colormap([1:-0.03:0.6]'*[1 1 1]);
        copyobj(AxesRAW,tmpc);
        tmpa = get(tmpc,'CurrentAxes');
        set(tmpa,'position',[0.15 0.15 0.75 0.75]);
        title(tmpa, 'Raw spectra');
        xlabel(tmpa,'channel');
        
    elseif (posA(1) < x(1)) && (x(1) < posA(1)+posA(3)) && (posA(2) < x(2)) && (x(2) < posA(2)+posA(4))
        tmpc = figure;
        colormap([1:-0.03:0.6]'*[1 1 1]);
        copyobj(AxesZLF,tmpc);
        tmpa = get(tmpc,'CurrentAxes');
        set(tmpa,'position',[0.15 0.15 0.75 0.75]);
        title(tmpa, 'Baseline corrected series of spectra');
        xlabel(tmpa,'channel');
        
    end
else
    if (isfield(data,'isdata') == 1) && (data.isdata == 1)
        pt = get(hObject, 'CurrentPoint');
        sz = get(hObject, 'Position');
        x = pt(1,1:2)./sz(1,3:4);

        posD = get(AxesRAW, 'Position');

        if (posD(1) < x(1)) && (x(1) < posD(1)+posD(3)) && (posD(2) < x(2)) && (x(2) < posD(2)+posD(4))

            data.iszla = 0;
            plot(AxesZLF,1,0,'w');
            onoffButton(Buttons,[],7);

            val = get(AxesRAW, 'CurrentPoint');
            data.bd.dwn = val(1,1:2);

            data.bdislive = 1;

            set(Empty_Button,'UserData',data);
        end
    end
end
