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

function mini_create ()
	show_help_wnd=true;
	init_mini(1);
	create_mini(8128);
--	finish_mini_game(true);
end;
--function mini_msg_proc (id)
function gameinput (sender,id,attachedID)
	if sender==30 then
		setcurentleaf("black_rose",10,0);
		DarkScreen(false);
		if flags.minicomplete then
		    StopEmiter("Handle");
			Set_Cursor(53,3);
			savegame(SaveLevel())
		return;end;	
	return; end;
	
	if sender==10 then
		flags.minicomplete=true;
		playeffect("miniC");

	return; end;

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

		-- if obj_id==1025 then
			-- finish_mini_game(true);
		-- return; end;
	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 flags.minicomplete then
			clear_satelite_leaf("black_rose");
		return;end;			
		if id==6000 then
			   CreateWindow(200,200,"1",100,"messageinfo")
		return;end;	
	
		if id==5000 and skipping  then
			if not flags.minicomplete then
				playeffect("skip");
				finish_mini_game(true);
				for i=1017,1023 do
					set_pos_in_img(i-16,0,112,64,112);	
				end;
				setcolor(1032,1,0,0,1);
				setcolor(1033,0.95,0.8,0,1);
				setcolor(1034,0.9,0.9,0.2,1);
				setcolor(1035,0,1,0,1);
				setcolor(1036,0.1,0.5,0.6,1);
				setcolor(1037,0,0,1,1);
				setcolor(1038,0.4,0,0.8,1);
				
			  for i=1025,1031,1 do
					speciale_action(4,i)		
					speciale_action(2,i,true);
			  end;				
			  
		   return;end;
		return;end;
		if id==1010 then
			playeffect("close");
			clear_satelite_leaf("black_rose");	
			finish_mini_game(false);			
			DeleteResource("btn"    	);
			DeleteResource("handles"	);
			DeleteResource("switch" 	);
			DeleteResource("first"  	);
			DeleteResource("second"		);
			DeleteResource("third"		);
			DeleteResource("fourth"		);
			DeleteResource("fifth"		);
			DeleteResource("sixth"		);
			DeleteResource("seventh"	);
			DeleteResource("red"		);
			DeleteResource("orange"		);
			DeleteResource("yellow"		);
			DeleteResource("green"		);
			DeleteResource("blue"		);
			DeleteResource("darkblue"	);
			DeleteResource("purple"		);
			DeleteResource("bg1"		);
			DeleteResource("bg"			);
		return;end;
		
		if id==1017 then --синий
			check_switch(1,6,id,"darkblue")			
		return;end;

		if id==1018 then --фиолетовый
		   check_switch(2,7,id,"purple")		
		return;end;

		if id==1019 then --оранжевый
			check_switch(3,2,id,"orange")  
		return;end;

		if id==1020 then  --жёлтый
			check_switch(4,3,id,"yellow")     
		return;end;

		if id==1021 then  --красный
			check_switch(5,1,id,"red")     
		return;end;

		if id==1022 then  --зелёный
			check_switch(6,4,id,"green") 
		return;end;
		
		if id==1023 then --голубой
			check_switch(7,5,id,"blue")   
		return;end;	
		
	return;end;
			
	if sender==6 then
		if flags.minicomplete then
			clear_satelite_leaf("black_rose");
		return;end;		
	return;end;	
end;
function mini_delete ()

end;