function winokhand

global sys HANDLES

if sys.win.n==1
   window.type=0;
   window.data.totalTime=sys.input.T;
   window.data.startTime=...
      str2num(get(HANDLES.wininpdef.edt(1),'string'));
   window.data.stopTime=...
      str2num(get(HANDLES.wininpdef.edt(2),'string'));
   sys.win.w=...
      win(sys.input.x,window)';
end

if sys.win.n==2
   window.type=2;
   window.data.totalTime=sys.input.T;
   window.data.startTime=...
      str2num(get(HANDLES.wininpdef.edt(1),'string'));
   window.data.stopTime=...
      str2num(get(HANDLES.wininpdef.edt(2),'string'));
   window.data.alpha=...
      str2num(get(HANDLES.wininpdef.edt(3),'string'));
   sys.win.w=...
      win(sys.input.x,window)';
end


if sys.win.n==3
   window.type=1;
   window.data.totalTime=sys.input.T;
   window.data.startTime=...
      str2num(get(HANDLES.wininpdef.edt(1),'string'));
   window.data.stopTime=...
      str2num(get(HANDLES.wininpdef.edt(2),'string'));
   sys.win.w=...
      win(sys.input.x,window)';
end

hideallbtns
