function spm_SVMCrossVal(varargin)

%Enter the base directory of your SPM installation
global SVMCROSSVAL_SPMDIR;
SVMCROSSVAL_SPMDIR = 'D:\SPM\spm2';
%Enter the SPM version string. Like 'SPM2', 'SPM5', 'SPM8'
global SVMCROSSVAL_SPMVERSION;
SVMCROSSVAL_SPMVERSION = 'SPM2';

% No Config from here
if strcmp(SVMCROSSVAL_SPMDIR,'') || strcmp(SVMCROSSVAL_SPMVERSION,'')
    error('spm_SVMCrossVal:main:noinstall','installation not complete!');
end

global SVMCROSSVAL_DEBUG;

defineGlobals();

switch nargin
    case 0
        SVMCROSSVAL_DEBUG = 0;
        ui_main();
    case 1
        SVMCROSSVAL_DEBUG = varargin(1);
        ui_main();
otherwise
error('spm_SVMCrossVal:main','wrong nargin');
end
end