function writescemanage(filename,filepath,mode)
%   

%   This software is protected by german copyright and international treaties.             
%   Copyright 2004 Markus Junghöfer & Peter Peyk. All Rights Reserved.                     
%                                                                                          
%   THIS SOFTWARE AND DOCUMENTATION IS PROVIDED "AS IS," AND COPYRIGHT HOLDERS MAKE        
%   NO REPRESENTATIONS OR WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO,    
%   WARRANTIES OF MERCHANTABILITY OR FITNESS FOR ANY PARTICULAR PURPOSE OR THAT THE USE    
%   OF THE SOFTWARE OR DOCUMENTATION WILL NOT INFRINGE ANY THIRD PARTY PATENTS, COPYRIGHTS,
%   TRADEMARKS OR OTHER RIGHTS. COPYRIGHT HOLDERS WILL NOT BE LIABLE FOR ANY DIRECT,       
%   INDIRECT, SPECIAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF ANY USE OF THE SOFTWARE      
%   OR DOCUMENTATION.                                                                      

global writescewindow blockradio pauseradio stimulilist designlist blockradio countdownradio neutralsradio pauseradio prestimeedit

writescewindow = figure('Units','points', ...
	'Color',[0.8 0.8 0.8], ...
	'Position',[364.5 156.25 161.25 354.25], ...
    'Tag','writescewindow',...
    'NumberTitle','off', ...
    'Name','writesce');

stimulilist = uicontrol('Parent',writescewindow, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Position',[10 330.75 145 20.25], ...
	'Style','popupmenu', ...
    'String',['picture';'sound  '],...
    'Tag','stimulilist');

designlist = uicontrol('Parent',writescewindow, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Position',[10 305.75 145 20.25], ...
	'Style','popupmenu', ...
    'String',['alternate';'random   ';'block    '],...
    'Tag','designlist');


blockradio = uicontrol('Parent',writescewindow, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Position',[9 245 144.75 20.25], ...
	'String','zwei Bloecke', ...
	'Style','radiobutton', ...
    'Tag','blockradio',...
    'Callback','pauseenable(blockradio,pauseradio);');
countdownradio = uicontrol('parent',writescewindow,...
   'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Position',[9 220 144.75 20.25], ...
	'Style','radiobutton', ...
    'String','Countdown', ...
   'Tag','countdownradio', ...
   'Value',[0]);
neutralsradio = uicontrol('Parent',writescewindow, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Position',[9 195 144.75 20.25], ...
	'String','Start mit 10 Neutrals', ...
	'Style','radiobutton', ...
   'Tag','neutralsradio');
pauseradio = uicontrol('Parent',writescewindow, ...
	'Units','points', ...
    'Enable','off',...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Position',[9 170 144.75 20.25], ...
	'String','Pause zwischen Blöcken', ...
	'Style','radiobutton', ...
    'Tag','pauseradio');


prestimelabel = uicontrol('Parent',writescewindow, ...
	'Units','points', ...
	'BackgroundColor',[0.8 0.8 0.8], ...
	'Position',[9 275 100 20.25], ...
    'HorizontalAlignment','left',...
	'String','Präsentationsdauer in ms:', ...
	'Style','text', ...
   'Tag','StaticText1');
prestimeedit = uicontrol('parent',writescewindow,...
   'Units','points', ...
	'BackgroundColor',[1 1 1], ...
	'Position',[110 280 45 16.5], ...
	'Style','edit', ...
   'Tag','prestimeedit', ...
   'Value',[0]);

f = uicontrol('Parent',writescewindow, ...
	'Units','points', ...
	'Position',[9 10.5 58.5 26.25], ...
	'String','abbrechen', ...
   'Tag','Pushbutton1', ...
	'Callback','close'); 
g = uicontrol('Parent',writescewindow, ...
	'Units','points', ...
	'Position',[85.5 10.5 65.25 26.25], ...
	'String','ok', ...
   'Tag','Pushbutton2',...
	'Callback','writesce(filename,filepath,mode,writescewindow,blockradio,pauseradio,stimulilist,designlist,blockradio,countdownradio,neutralsradio,pauseradio,prestimeedit);'); 

return