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

function mini_create ()
	show_help_wnd=true;
	init_mini(1);
	create_mini(19,4,30,250,70,500,500,1001,1,10,0,2,false,3);
end;
--function mini_msg_proc (id)
function gameinput (sender,id,attachedID)
	if sender==16 then
	if not help then
		help=true;
		CreateWindow(200,200,"3",100,"messageinfo")
	end;	
	   BlockCursor(false);
	return;end;
	
 

	if sender==26 then
		if id==1 then
		   	flags.minicomplete2=true;
			clear_satelite_leaf("grim");		
		return;end;
	return;end;
	if sender==37 then
	   skipping=true;
	return;end;	
	if sender==30 then
	setcurentleaf("grim",1,0);
	DarkScreen(false); 
	if flags.minicomplete2 then
	    StopEmiter("Svet1");
		collaps_obj(5,0,0,0,0);
		setcolor(5,0,0,0,0.5,1);
		--flags.minitext3=true;
		--addparticlesistem("sharp_star","./particles/particle3.psi",5,true);
		Set_Cursor(6,3);
		savegame(SaveLevel())
	return; end;	
	return; end;
	
	if sender==10 then
		ok=true;
		playeffect("miniC");
		CreateWindow(100,100,"211",1)
	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,"3",100,"messageinfo") 
		return;end;
		if attachedID==-1 then
			if id==1009 then
					 playeffect("close");
				   clear_satelite_leaf("grim");		  
					finish_mini_game(false);
					SetAlfa(501,0.7,0,1);
					DeleteResource("bm_parts");
					DeleteResource("bm_bg");
					DeleteResource("bm_btn");
				return;end;
			if not flags.minicomplete2 then			
				if id>=1001 and id<=1004 then --нажимаем на часть телеграммы
				--	messageboxi(id);
					add_to_mouse(id);
					mousepresed=true;
					objectid=id;
				return 0; end	
				if id==5000 and skipping then
				playeffect("skip");
					SkipMini();
		--			finish_mini_game(true);
				return;end;
			return; end;  
		return; end;  
	return; end; 	
	if sender == 6 --Отпустили левую кнопку мышки
	then		
		if not ok then
		if mousepresed==true
		then
			RemoveFromMouse(objectid);
			playeffect("pclick");
			check_mini_game_puzzle(objectid);
			mousepresed=false;
			objectid=0;
		end
		return; end;
	return; end;
	

end;
function mini_delete ()

end;