if ncase
	rew = 0;
	h_1 = WndCreat ([], "Binary to Multiple", [NaN,NaN,296,480], 2);
	
	CtrCreat (h_1, 510, [9,9,104,16], "All variables");
	h_2 = CtrCreat (h_1, 320, [9,25,112,199], lcase(GetVarName(find(DataVarType))),"h_g=h_2;update();");

	CtrCreat (h_1, 510, [169,9,104,16], "Depedent variable");
	h_3 = CtrCreat (h_1, 320, [169,25,112,20], "","h_g=h_3;update();");
    CtrMaxList(h_3,1);
	h_4 = CtrCreat (h_1, 150, [129,25,32,20], "","");
	CtrConect(h_4,h_2,h_3);

    CtrCreat (h_1, 510, [169,54,104,16], "Attribute variables");
	h_31 = CtrCreat (h_1, 320, [169,68,112,224-68-45], "","h_g=h_31;update();");
	h_41 = CtrCreat (h_1, 150, [129,125,32,20], "","");
	CtrConect(h_41,h_2,h_31);
	
	CtrCreat (h_1, 510, [169,224-16-20, 104, 16], "Split variable");
	h_32 = CtrCreat (h_1, 320, [169,224-20,112,20], "","h_g=h_32;update();");
    CtrMaxList(h_32,1);
	h_42 = CtrCreat (h_1, 150, [129,224-20,32,20], "","");
	CtrConect(h_42,h_2,h_32);

	CtrCreat (h_1, 140, [9,233,272,64], "Active variable label");
	h_5 = CtrCreat (h_1, 510, [17,249,256,40], "");
	
	h_6 = CtrCreat (h_1, 140, [9,297,272,112-16], "Options");
	CtrCreat (h_1, 510, [41,316,144,16], "Bottom boxes:");
	h_7 = CtrCreat (h_1, 410, [185,313,56,20], "1 2");
	CtrCreat (h_1, 510, [41,340,128,16], "Just right:");
	h_8 = CtrCreat (h_1, 410, [185,337,56,20], "3");
	CtrCreat (h_1, 510, [41,364,128,16], "Top boxes:");
	h_9 = CtrCreat (h_1, 410, [185,361,56,20], "4 5");

	
	CtrCreat (h_1, 110, [ 97,417,56,24], "OK","check; if chi;WndClose(h_1);pa(dependent_var, vars, split_var, pa_split(bb), pa_split(jb), pa_split(tb));end;");
	CtrCreat (h_1, 110, [161,417,56,24], "Cancel","WndClose(h_1)");
	CtrCreat (h_1, 110, [225,417,56,24], "Paste","check; if chi;paste;WndClose(h_1);end;");
else
	MsgBox([],"Morate prvo ucitati SPSS podatke");
end


global macro update
	vars = CtrGet(h_g,1);
	if size(vars,1)
		vars = ucase(vars);
		labVar=GetVarLabel(vars(1));
		CtrSet(h_5,labVar);
	end
end

global macro check
	chi = 0;
	split_var = CtrGet(h_32);
	dependent_var = CtrGet(h_3);
	if ~size(dependent_var,1)
		MsgBox(h_1,"Niste izabrali DEPENDENT varijablu!",1);
		return;
	end
    vars = CtrGet(h_31);
	if ~size(vars,1)
		MsgBox(h_1,"Niste izabrali nijednu varijablu!",1);
		return;
	end
	bb = CtrGet(h_7);
	if ~strlen(bb)
		MsgBox(h_1,"Niste naveli bottom boxes!",1);
		return;
	end
	jb = lcase(CtrGet(h_8));
	if ~strlen(jb)
		MsgBox(h_1,"Niste naveli just right boxes!",1);
		return;
	end
	tb = lcase(CtrGet(h_9));
	if ~strlen(tb)
		MsgBox(h_1,"Niste naveli bottom boxes!",1);
		return;
	end
	chi = 1;
end

global macro paste
	str = "\n\n!pa vars = ";
	for i=1:max(size(vars))
		str = str+" "+vars(i);
	end
	str = str+"/\n    dependent = " + dependent_var;
	if size(split_var,1)
		str = str+"/\n    by = " + split_var;
	end
	str = str+"/\n    bottom = " + bb;
	str = str+"/\n    middle = " + jb;
	str = str+"/\n    top = " + tb;
	str = str+" .";
	syntax(str);
end