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

function mini_create ()
	
	if flags.minipart then
		for i=1053,1060,1 do
			speciale_action(2,i)
		end;

		init_mini(1);
		StartTimer(4321,3);
		BlockCursor(true);
		create_mini(1000,8,1,2000,600,false,1029);
		
	return;end;
	init_mini(1);
	create_mini(8128);
end;
--function mini_msg_proc (id)
function gameinput (sender,id,attachedID)

	
	if sender==16 then
	   BlockCursor(false);
		if not help then
			help=true;
			CreateWindow(200,200,"2",100,"messageinfo")
		end;		   
	return;end;
	if sender==30 then
		setcurentleaf("arend_room",19,0);
		DarkScreen(false);
		if flags.minicomplete1 then		
			StopEmiter("Wkaf");
			Set_Cursor(44,3);
			if flags.all then	    
				flags.loc1=true;
				if flags.loc2 then
					flags.minitext2=true;
				return;end;				
			return;end;
			flags.minitext1=true;

		return;end;	
	return; end;
	if sender==36 then
		if id==4321 then
		   BlockCursor(false);
		return;end;
		if id==2100 then
		BlockCursor(false);
		clear_satelite_leaf("arend_room");
		return;end;
	return;end;
	if sender==37 then
	   skipping=true;
	return;end;	
	if sender==10 then
		flags.minicomplete1=true;
		StartTimer(2100,3);
		playeffect("miniC");	
		BlockCursor(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,"2",100,"messageinfo")
		return;end;		
		if id==1000 then
			finish_mini_game(false);
			playeffect("close");
			clear_satelite_leaf("arend_room");
			DeleteResource("am1_btn");
			DeleteResource("am1_blank");
			DeleteResource("am1_shadow");
			DeleteResource("am1_buttons");
			DeleteResource("am1_bg1");
			DeleteResource("am1_cloth1");
			DeleteResource("am1_cloth2");
			DeleteResource("am1_cloth3");
			DeleteResource("am1_cloth4");
			DeleteResource("am1_cloth5");
			DeleteResource("am1_cloth6");
			DeleteResource("am1_cloth7");
			DeleteResource("am1_cloth8");
			DeleteResource("am1_bg");		
			DeleteResource("frame1");
			DeleteResource("frame2");	
			DeleteResource("pust");			
		return;end;       
		
		if id==5000 and skipping then
			if not flags.minicomplete1 then
				playeffect("skip");
				finish_mini_game(true);
			
			return;end;
		return;end;
		
		if id>=1020 and id<=1027 then
			if not buttons[id+25] then 
				playeffect("but");
			    buttons[id+25]=true;
				speciale_action(2,id+25)
				step=step+1;
				if step==9 then 
					-- for i=1029,1044,1 do
						-- speciale_action(2,i)
					-- end;
					for i=1053,1060,1 do
						speciale_action(2,i)
					end;
					
					flags.minipart=true;
					init_mini(1);
					create_mini(1000,8,1,2000,600,false,1029);
					StartTimer(4321,3);
					BlockCursor(true);
					HideSkipBtn ()	
					StartProgress(5001,30,true)
				return;end;
			return;end;
		return;end;
	
		if id>=1029 and id<=1044 then
			playeffect("BoxOpen");
			check_mini_game_memory(id);
		return;end;	
	return;end;
	
end;
function mini_delete ()

end;
function MessageFromMinigame(nCount,Param1,Param2)
	-- MoveByVector(Param1,x[Param2],y[Param2],1,100);
	-- MoveByVector(Param2,x[Param1],y[Param1],1,100);
	-- MoveByVector(Param1-8,x[Param2],y[Param2],1,100);
	-- MoveByVector(Param2-8,x[Param1],y[Param1],1,100);	
	-- tempX=x[Param1]
	-- tempY=y[Param1]
	-- x[Param1]=x[Param2]
	-- y[Param1]=y[Param2]
	-- x[Param2]=tempX
	-- y[Param2]=tempY
end;
function MixCards(nCount,Param1,Param2,Param3,Param4,Param5,Param6,Param7,Param8)

  -- for i=1041,1052,1 do
    -- SetObjectPosition(i-28,x[i],y[i]);
    -- SetObjectPosition(i-40,x[i],y[i]);
  -- end;
end;
function PairsCounter(nCount,Param1)
end;