function MessageFromMenu(nCount,Param1)
-- if Param1==2000029 then
	-- CreateWindow(200,200,"6",100,"messageinfo") 
-- return;end;
showoptons(0);
return;end;

function mini_create ()
show_help_wnd=true;
		init_mini(1);
		
end;
--function mini_msg_proc (id)
function gameinput (sender,id,attachedID)

	if sender==100 then
	if not help then
		help=true;
		BlockCursor(false);
		CreateWindow(200,200,"6",100,"messageinfo")
	end;		
	return;end;
	
	if sender==16 then	
	   BlockCursor(false);
	return;end;

		if sender==26 then
		if id==100 then
			BlockCursor(true);
		    create_mini(1000,4,1,2000,600,false,1006);
			StartTimer(4321,3)
		return;end;
	return;end;

	if sender==36 then
		if id==4321 then
		BlockCursor(false);
		return;end;
	return;end;
	
	if sender==30 then
		setcurentleaf("private_room",3,2);
		DarkScreen(false);
		if flags.minicomplete6 then
		    StopEmiter("Dict");
			collaps_obj(25,0,0,0,0);
			setcolor(25,0,0,0,0.5,1);
		--	CreateWindow(100,100,"218"); 
			Set_Cursor(47,3);
			flags.minirun6=false;
			savegame(SaveLevel())
		return;end;
	return; end;
	if sender==10 then
		flags.minicomplete6=true;
		playeffect("miniC");
		speciale_action(2,1004,true,2);
		speciale_action(4,1004);
		 --clear_satelite_leaf("private_room");
	return; end;
	if sender==37 then
	   skipping=true;
	return;end;	
	if pause_state then
		if sender==1 or sender==6 or sender==14 then
			pause_state=false;
			set_visible_object(11111,false);
		end;	
	return;end;		
	if sender==1 then
		if id==6000 then
			CreateWindow(200,200,"6",100,"messageinfo") 
		return;end;		
		if id==1004 then
			
			clear_satelite_leaf("private_room");
		return;end;

		if id==5000 and skipping then
			playeffect("skip");
			if not flags.minicomplete6 then
				finish_mini_game(true);
			return;end;		
		return;end;		
		
		if id==1001 then
		if not flags.minicomplete6 then
		playeffect("close");
		   clear_satelite_leaf("private_room");
		   finish_mini_game(false);
			DeleteResource("qm001");
			DeleteResource("qm005");
			DeleteResource("qm006");
			DeleteResource("qm007");
			DeleteResource("qm008");
			DeleteResource("qm012");
			DeleteResource("qm020");
			DeleteResource("qm021");		   
			DeleteResource("aframe1");
			DeleteResource("aframe2");
			DeleteResource("pust");
		return;end;
		return;end;
		
		if id>=1006 and id<=1013 then
		if not flags.minicomplete6 then
			playeffect("paper")
			check_mini_game_memory(id);
		return;end;	return;end;	
	return;end;		
end;

function PairsCounter(nCount,Param1)
end;