function MessageFromMenu(nCount,Param1)
-- if Param1==2000029 then
	-- if flags.water then
		-- CreateWindow(200,200,"217",100,"messageinfo") 
	-- return;end;
	-- if flags.reakt then
		-- CreateWindow(200,200,"218",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,"5",100,"messageinfo")
		end;		
			BlockCursor(false);
	return;end;
	if sender==37 then
	   skipping=true;
	return;end;
	if sender==30 then
		setcurentleaf("photo",5,1);
		DarkScreen(false);
		if flags.minicomplete4 then
			-- if not flags.water then
				-- DeleteElement("gr",228);
			-- end;
			-- if not flags.reakt then
				-- DeleteElement("gr",227);
			-- end;		
			-- if not flags.photo1 then
			   -- DeleteElement("gr",218);
			   -- DeleteElement("gr",219);
			-- end;
			StopEmiter("Prov")			
			speciale_action(2,226,true);
			speciale_action(2,231,true);
			setcolor(226,0,0,0,1,1);
			speciale_action(2,32,true);
			Set_Cursor(53,3);
savegame(SaveLevel())
		return; end;

		if flags.water then
		   AddElement("gr",1028);
		end;
		if flags.reakt then
		   AddElement("gr",1027);
		end;	
		-- if flags.photo1 then
			-- DeleteElement("gr",4);
		-- end;
	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",4);
			DeleteElement("gr",9);	
		flags.minicomplete4=true;
		playeffect("miniC");
		BlockCursor(true);
		StartTimer(2100,3)				
	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.water then
				CreateWindow(200,200,"217",100,"messageinfo") 
			return;end;
			if flags.reakt then
				CreateWindow(200,200,"218",100,"messageinfo") 
			return;end;			
			CreateWindow(200,200,"4",100,"messageinfo") 
		return;end;		
		
		if id==5000 and skipping then
		playeffect("skip");
			finish_mini_game(true);	
			BlockCursor(true);			
			if not flags.water then
				DeleteElement("gr",1028);
				speciale_action(2,5);
			end;
			if not flags.reakt then
				DeleteElement("gr",1027);
				speciale_action(2,3);
			end;			
			DeleteElement("gr",1018);
			DeleteElement("gr",1019);
			
			speciale_action(2,4,true);
		return;end;		
		

		
		if id==3 then
		if flags.reakt then
			if attachedID==1018 or attachedID==1019 then
				if not flags.photo1 and flags.emptyslot then
					playeffect("pclick");
					RemoveFromMouse(attachedID);
					DeleteElement("gr",attachedID);
					speciale_action(2,6);
					speciale_action(2,4,true,3);
					step=2;
					flags.emptyslot=false;
				return;end;	
				if flags.photo1 and flags.emptyslot then
					playeffect("pclick");
					RemoveFromMouse(attachedID);
					DeleteElement("gr",attachedID);
					speciale_action(2,6);
					speciale_action(2,9,true,3);
					flags.emptyslot=false;
				return;end;	
			return;end;			
			if attachedID~=-1 and attachedID~=218 and attachedID~=219 then
				CreateWindow(100,100,"200");
			return;end;		
			if attachedID==-1 then
				CreateWindow(100,100,"218");
			return;end;
		return;end;	
		return;end;
		
		if id==7 then
			if attachedID==1028 then
				playeffect("pclick");
				RemoveFromMouse(attachedID);
				DeleteElement("gr",attachedID);
				speciale_action(2,5,true);
				flags.water=true;
				CreateWindow(100,100,"217");
			return;end;
			if attachedID~=-1 and attachedID~=228 then
				CreateWindow(100,100,"200");
			return;end;		
			if attachedID==-1 then
				CreateWindow(100,100,"216");
			return;end;
		return;end;
		
		if id==5 then
			if flags.water then
			if attachedID==1027 then
				playeffect("pclick");
				RemoveFromMouse(attachedID);
				DeleteElement("gr",attachedID);
				speciale_action(2,3,true);
				flags.reakt=true;
				CreateWindow(100,100,"218");
			return;end;
			if attachedID~=-1 and attachedID~=228 then
				CreateWindow(100,100,"200");
			return;end;		
			if attachedID==-1 then
				CreateWindow(100,100,"217");
			return;end;		
			return;end;		
		return;end;
		if attachedID==-1 then
	
			if id==1 then
				playeffect("close");
				finish_mini_game(false);
				clear_satelite_leaf("photo");	
				DeleteResource("d_btn");
				DeleteResource("d_0003");
				DeleteResource("d_0004");
				DeleteResource("d_0005");		
				DeleteResource("d_0006");
				DeleteResource("d_0007");
				DeleteResource("d_0008");
				DeleteResource("d_0009");
			return;end;
			
			if id==4 then
				speciale_action(2,6);
				speciale_action(2,4);
				collaps_obj(id,0,0,5,0.5);
				--AddElement("gr",id);
				--MoveObjectToTree(id); 
				flags.photo1=true;
				flags.emptyslot=true;
			return;end;
			
			if id==9 then
				speciale_action(2,6);
				speciale_action(2,9);
				--AddElement("gr",id);
				--MoveObjectToTree(id); 
				flags.emptyslot=true;
				finish_mini_game(true);

			return;end;		
			
		return;end;		
	return;end;
	
	if sender==14 then
	    addObjectToMouse(id);
	return; end;	
end;
