function [indx,flag]=search(var)
% function to match the variables with the list in the variable windows.
global xf

indx=find(strcmp(lower(xf.varlist),lower(var))==1);
if ~isempty(indx),
	flag='all';
else
	indx=find(strcmp(lower(xf.newvarlist),lower(var))==1);
	if ~isempty(indx),
		flag='new';
	else
		flag='nop';
	end;
end;
return;


