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

function mini_create ()
	show_help_wnd=true;
	
	if not flags.handle1 then
		init_mini(1);
		create_mini(19,6,30,310,158,923,556,1004,1,10,0,1000);
	return;end;
end;
--function mini_msg_proc (id)
function gameinput (sender,id,attachedID)

	if sender==33 then
	BlockCursor(false);
	return;end;
	if sender==30 then
		setcurentleaf("tir",7,1);
		DarkScreen(false);
		if flags.minicomplete4 then
			speciale_action(2,51,true);	
			speciale_action(10,51);	
			speciale_action(2,3,true);
			flags.handle1=true;
			Set_Cursor(4,3);
			Set_Cursor(51,3);
			Set_Cursor(69,4);
			setcolor(53,0,0,0,1,1);
			setcolor(250,0,0,0,1,1);	
			flags.rollet=true;			
			StopEmiter("Handle");
			AddParticleToObject(69,"Tir",558,337);
			StartEmiter("Tir");
			MoveEmiter("Tir",600,277);	
			flags.rolletout=true;
			
		return; end;
	return; end;
	
	if sender==10 then
		flags.handle1=true;
		speciale_action(2,1001);
		playeffect("mech");
		HideSkipBtn ()
		-- RotateObject(1011,0,360,3,true)
		-- RotateObject(1012,0,360,3,true)
		-- for i=1004,1006,1 do
			-- RotateObject(i,0,360,3,true)
		-- end;
		-- for i=1007,1009,1 do
			-- RotateObject(i,0,-360,3,true)
		-- end;
	return; end;
	
	if sender==16 then
		if not help then
			help=true;
			CreateWindow(200,200,"4",100,"messageinfo")
		end;		
	    BlockCursor(false);
		if id==1002 then
			BlockCursor(true);
		    flags.minicomplete4=true;
			RotateObject(1011,0,-360,8,true)
			RotateObject(1012,0,360,8,true)
			RotateObject(1004,0,360,7,true)
			RotateObject(1005,0,-360,7,true)
			RotateObject(1006,0,360,4,true)
			RotateObject(1007,0,-360,7,true)
			RotateObject(1008,0,360,4,true)
			RotateObject(1009,0,-360,7,true)		
			StartTimer(2100,3);
		--	BlockCursor(false);
		return;end;
	return;end;
	
	if sender==36 then
		if id==2100 then
		BlockCursor(false)
		clear_satelite_leaf("tir");			
		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 id==6000 then
		   CreateWindow(200,200,"4",100,"messageinfo")
		return;end;		
		if id==5000 and skipping and attachedID==-1 then
			if not flags.minicomplete4 then
				playeffect("skip");
				SkipMini();
			return;end;	
		return;end;	
		if id==1021 and attachedID==-1 then
			playeffect("close");
		    clear_satelite_leaf("tir");
			DeleteResource("dm_parts");
			DeleteResource("dm_btn");	
			DeleteResource("d_1000");	
			DeleteResource("d_1001");
			DeleteResource("d_1002");
			DeleteResource("d_1003");	
			DeleteResource("d_1010");			
			DeleteResource("d_1011");
			DeleteResource("d_1012");
			DeleteResource("d_1013");
			if not flags.handle1 then
				finish_mini_game(false);
			return;end;
		return;end;
		
		if id==1001 then
		   	 if attachedID==205  then					
				RemoveFromMouse(attachedID);
				DeleteElement("gr",attachedID);			 
				speciale_action(2,1002,true);
				BlockCursor(true);
			 return;end;		
			 if (attachedID>-1) and (attachedID~=205) then
				CreateWindow(100,100,"200");
			 return;end;
			 if (attachedID==-1)  then
				CreateWindow(100,100,"203");
			 return;end;
		return;end;
		
		if id==1002 then
		   speciale_action(2,1000,true);
		   speciale_action(2,1002,true);
		   BlockCursor(true)
		return;end;
		if not flags.minicomplete4 then
			if id>=1004 and id<=1009 and objectid==0 then --нажимаем на часть телеграммы
				add_to_mouse(id);
				mousepresed=true;
				objectid=id;
			return 0; end	
		return; end;  
	return; end;  	

	if sender == 6 --Отпустили левую кнопку мышки
	then		
		if mousepresed==true
		then
			playeffect("KeyIns");
			RemoveFromMouse(objectid);
			check_mini_game_puzzle(objectid);
			mousepresed=false;
			objectid=0;
		end
	return; end;	
	
	if sender==14 then
	    addObjectToMouse(id);
	return; end;	
end;
function mini_delete ()

end;