function MessageFromMenu(nCount,Param1)
-- if Param1==2000029 then
	-- if flags.paper and flags.filtr and flags.film then
		-- CreateWindow(200,200,"220",100,"messageinfo") 
	-- return;end;
	-- CreateWindow(200,200,"4",100,"messageinfo") 
-- return;end;
showoptons(0);
return;end;

function mini_create ()
show_help_wnd=true;
			init_mini(1);
			create_mini(8128);
end;

function gameinput (sender,id,attachedID)


	
	if sender==16 then
		if not help then
			help=true;
			CreateWindow(200,200,"4",100,"messageinfo")
		end;	
	   BlockCursor(false);
	return;end;
	-- if sender==16 then
		-- if id==3 then
			-- BlockCursor(false);
		-- return;end
	-- return;end;
	if sender==37 then
	   skipping=true;
	return;end;
	if sender==30 then
		setcurentleaf("photo",5,1);
		DarkScreen(false);

		if flags.minicomplete3 then
			-- if not flags.film then
			    -- DeleteElement("gr",106);
			-- end;
			-- if not flags.paper then
				-- DeleteElement("gr",238);
			-- end;			
			-- if not flags.filtr then
			    -- DeleteElement("gr",233);
			-- end;			
			StopEmiter("Lamp")
			Set_Cursor(45,3);
			Set_Cursor(44,3);
			
			if not flags.photo1_in then
				collaps_obj(218,0,0,0,0);
				collaps_obj(1018,0,0,0,0);
				AddElement("gr",1018);
				--setcolor(218,0,0,0,0.5,1);
				MoveObjectToTree(1018); 
				flags.photo1_in=true
			end;
			collaps_obj(219,0,0,0,0);
			collaps_obj(1019,0,0,0,0);
			AddElement("gr",1019);
			--setcolor(219,0,0,0,0.5,1);
			MoveObjectToTree(1019); 	
			flags.photo2_in=true
				
			flags.minitext1=true;	

			
		return; end;		
			if flags.photo then
				--DeleteElement("gr",18);
				collaps_obj(218,0,0,0,0);
				collaps_obj(1018,0,0,0,0);
				AddElement("gr",1018);
				MoveObjectToTree(1018); 
				flags.photo1_in=true				
			end;		
		   DeleteResource("c_photo");
		   DeleteResource("c_paper");
		   DeleteResource("c_light");
		   DeleteResource("c_print");
		   DeleteResource("c_btn");
		   DeleteResource("c_bg1");			
		   DeleteResource("c_film");
		   DeleteResource("c_filtr");
		   DeleteResource("c_bg");
		   DeleteResource("c_for_photo");
		   DeleteResource("c_for_film");		   
		   DeleteResource("c_for_filtr");
		   DeleteResource("m0018");		
	return; end;

	if sender==36 then
		if id==2100 then
		BlockCursor(false);
		clear_satelite_leaf("photo");	
		return;end;
	return;end;
	
	if sender==10 then
		DeleteElement("gr",18);
		DeleteElement("gr",19);
		flags.minicomplete3=true;
		playeffect("miniC");
		StartTimer(2100,2);
		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
			if flags.paper and flags.filtr and flags.film then
				CreateWindow(200,200,"220",100,"messageinfo") 
			return;end;
			CreateWindow(200,200,"4",100,"messageinfo") 
		return;end;		
		
		if id==13 then
			if attachedID==106  then		
				RemoveFromMouse(attachedID);
				DeleteElement("gr",attachedID);
				speciale_action(2,10,true,2)
				flags.film=true;
				playeffect("pclick");
				if flags.paper and flags.filtr and flags.film then
					CreateWindow(100,100,"220");
				return;end;
			 return;end;		
			 if (attachedID>-1) and (attachedID~=106) then
				CreateWindow(100,100,"200");
			 return;end;
			 if (attachedID==-1)  then
				CreateWindow(100,100,"214");
			 return;end;		
		
		return;end;
		
		if id==15 then
			if attachedID==1033  then		
				RemoveFromMouse(attachedID);
				DeleteElement("gr",attachedID);
				speciale_action(2,14,true,2)
				flags.filtr=true;
				playeffect("pclick");
				if flags.paper and flags.filtr and flags.film then
					CreateWindow(100,100,"220");
				return;end;
			 return;end;		
			 if (attachedID>-1) and (attachedID~=1033) then
				CreateWindow(100,100,"200");
			 return;end;
			 if (attachedID==-1)  then
				CreateWindow(100,100,"214");
			 return;end;				
		return;end;

		if id==12 then
			if attachedID==1038  then		
				RemoveFromMouse(attachedID);
				DeleteElement("gr",attachedID);
				speciale_action(2,1,true,2)
				flags.paper=true;
				playeffect("pclick");
				if flags.paper and flags.filtr and flags.film then
					CreateWindow(100,100,"220");
				return;end;
			 return;end;		
			 if (attachedID>-1) and (attachedID~=1038) then
				CreateWindow(100,100,"200");
			 return;end;
			 if (attachedID==-1)  then
				CreateWindow(100,100,"214");
			 return;end;				
		return;end;
		
	if attachedID==-1 then
		if id==5000 and skipping then
		playeffect("skip");
			if not flags.minicomplete3 then
				finish_mini_game(true);	
				if not flags.film then
					DeleteElement("gr",106);		
					speciale_action(2,10);
				end;	
				if not flags.paper then
					speciale_action(2,1);
					DeleteElement("gr",1038);
				end;
				if not flags.filtr then
					speciale_action(2,14);
					DeleteElement("gr",1033);
				end;		
				speciale_action(2,100,true);	
			return;end;		
		return;end;				
			if id==4 then
				playeffect("close");
			   finish_mini_game(false);
				if flags.photo then
					DeleteElement("gr",18);			
				end;				   
			   clear_satelite_leaf("photo");
			return;end;
			
			if id==100 then
				
				printing=false;
				speciale_action(2,100);
				speciale_action(2,2);
				if step==1 then
					collaps_obj(18,0,0,0,0);
					AddElement("gr",18);
					MoveObjectToTree(18); 
					flags.photo=true;
				return;end;
				if step==2 then
					collaps_obj(19,0,0,0,0);
					AddElement("gr",19);
					MoveObjectToTree(19); 
					finish_mini_game(true);
				return;end;			
			return;end;	

			if id==7 then
			if not printing then
				if filmx>257 then
					playeffect("pclick");
					frame=frame-1;
					filmx1=filmx;
					filmx=filmx-25;
					MoveObjectX(10,filmx1,filmx);
				return;end;
			return;end;	
			return;end;
			
			if id==8 then
			if not printing then
				if filmx<347 then
					playeffect("pclick");
					frame=frame+1;
					filmx1=filmx;
					filmx=filmx+25;
					MoveObjectX(10,filmx1,filmx);					
				return;end;
			return;end;		
			return;end;
			
			if id==3 then
			if flags.film and flags.paper and flags.filtr then
			if frame==framek1 or frame==framek2 then			
				if step==0 then 
					playeffect("pclick");
					pframe=frame;
					speciale_action(2,2);
					speciale_action(2,100,true,2);
					printing=true;
					step=step+1;
				return;end;
				if step==1 then
					if frame~=pframe then
						playeffect("pclick");
					   speciale_action(2,2);
					   speciale_action(2,100,true,2);
					   printing=true;
					   step=step+1;
					return;end;
					CreateWindow(100,100,"215");
				return;end;
			return;end;
			CreateWindow(100,100,"221");			
			return;end;	
			CreateWindow(100,100,"219");
			return;end;
		return;end;		
	return;end;

	-- if sender==6 then
	    -- if not flags.minicomplete3 then
		    -- CreateWindow(100,100,"219");
		-- return;end;
	-- return; end;
	
	if sender==14 then
	    addObjectToMouse(id);
	return; end;	
	
end;
