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);
end;
--function mini_msg_proc (id)
function gameinput (sender,id,attachedID)

	
	if sender==16 then
	   BlockCursor(false);
		if not help then
			help=true;
			CreateWindow(200,200,"1",100,"messageinfo")
		end;		   
	return;end;
	if sender==30 then
	    RemoveFromMouse(obj);
		setcurentleaf("photolab",20,0);
		--Emitters(true);
		DarkScreen(false);
		if flags.minicomplete then
			StopEmiter("Gor");
			Set_Cursor(3,3);
			flags.levelcomplete=true;
			ShowMenu(false);
			StopEmiter("water");
			StopEmiter("probirka_b");
			StopEmiter("probirka_y");
			StopEmiter("banka");						
			delete_tree_leaf("Root","photolab");
			delete_tree_leaf("Root","mini");
			setnextlavel(29);
			loadlavel();			
			return; end;

	return; end;
	if sender==36 then
	if id==2100 then
		BlockCursor(false);
		clear_satelite_leaf("photolab");
		return;end;
	return;end;
	if sender==37 then
	   skipping=true;
	return;end;	
	if sender==10 then
	    RemoveFromMouse(attachedID);
		playeffect("miniC");	
		flags.minicomplete=true;
		StartTimer(2100,2);
		BlockCursor(true);
	return; end;
	if sender==26 then
		if id==1 then
		    finish_mini_game(true);
		return;end;
	return;end;
	if sender==8 then

		if obj==1009 then
			obj=0
			RemoveFromMouse(1009);
			SetObjectPosition(1009,560,320);
speciale_action(2,1010);			
			-- speciale_action(2,1010);				
			-- speciale_action(2,1007);
			-- water=true;
		return;end;	
		if obj==1003 then
			obj=0
			RemoveFromMouse(1003);
			SetObjectPosition(1003,608,136);					
		return;end;
		if obj==1004 then
			obj=0
			RemoveFromMouse(1004);
			SetObjectPosition(1004,699,134);						
		return;end;					
	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,"1",100,"messageinfo")
		return;end;	
		if id==5000 and skipping and attachedID==-1 then
			if not flags.minicomplete then
				playeffect("skip");
				finish_mini_game(true);
				if not flags.water then
					speciale_action(2,1007);
				end;
				speciale_action(2,1005,true)				
			return;end;		
		return;end;		
		if id==1000 and   attachedID==-1 then
			playeffect("close");
			finish_mini_game(false);
			clear_satelite_leaf("photolab");
			DeleteResource("m1_btn" );
			DeleteResource("m1_0003");			
			DeleteResource("m1_0004");
			DeleteResource("m1_0005");
			DeleteResource("m1_0006");
			DeleteResource("m1_0007");
			DeleteResource("m1_0008");
			DeleteResource("m1_0009");
			DeleteResource("m1_0010");
			DeleteResource("m1_0011");
			DeleteResource("m1_0012");
			DeleteResource("m1_0013");
			DeleteResource("m1_0014");
			DeleteResource("m1_0015");
			DeleteResource("m1_0016");
			DeleteResource("m1_0017");
		return;end;
		
		if id==1009 or id==1003 or id==1004 then
		if attachedID==-1 then
		   addObjectToMouse(id);
		   obj=id;
		   if id==1009 then
				speciale_action(2,1010);
		   return;end
		return;end;
		return;end;
		
		if id==1006 then
			if not water then
				if attachedID==1009 then
					RemoveFromMouse(1009);
					SetObjectPosition(1009,593,312);	
					speciale_action(2,1010);				
					speciale_action(2,1007);
					water=true;
					playeffect("liquid");
				return;end;	
				if attachedID==1003 then
						RemoveFromMouse(1003);
						SetObjectPosition(1003,608,136);					
				return;end;
				if attachedID==1004 then
						RemoveFromMouse(1004);
						SetObjectPosition(1004,699,134);						
				return;end;					
			return;end;
			if water then
				if attachedID==1009 then
					RemoveFromMouse(1009);
					SetObjectPosition(1009,593,312);	
					speciale_action(2,1010);
					CreateWindow(200,200,"230");						
				return;end;				
				if attachedID==1003 then
				    if him2 or him1 then
						RemoveFromMouse(1003);
						SetObjectPosition(1003,608,136);		
						CreateWindow(200,200,"229");						
					return;end;	
						RemoveFromMouse(1003);
						SetObjectPosition(1003,608,136);					
						speciale_action(2,1008);
						him1=true;
						playeffect("liquid");
				return;end;
				if attachedID==1004 then
				    if him2 or him1 then
						RemoveFromMouse(1004);
						SetObjectPosition(1004,699,134);	
						CreateWindow(200,200,"229");						
					return;end;	
						RemoveFromMouse(1004);
						SetObjectPosition(1004,699,134);					
						speciale_action(2,1008);
						him2=true;
						playeffect("liquid");
						if t2 then
						    speciale_action(2,1005,true)
							finish_mini_game(true);
						end;
				return;end;	
				if attachedID==-1 then
					-- if ok then
						-- finish_mini_game(true);
					-- return;end;
					water=false
					playeffect("liquid");
					speciale_action(2,1007);
					if him1 or him2 then
						speciale_action(2,1008);
						him1=false;
						him2=false;
					return;end;
				return;end;							
			return;end;
			if attachedID==1003 then
				RemoveFromMouse(1003);
				SetObjectPosition(1003,608,136);
			return;end;
			if attachedID==1004 then
				RemoveFromMouse(1004);
				SetObjectPosition(1004,699,134);				
			return;end;			
		return;end;		
		if not ok then
		if id==1014 then
			if not t1 then
				speciale_action(2,1013);
				t1=true;
				if t2 then
					speciale_action(2,1012);
					t2=false;
				return;end;
				if t3 then
					speciale_action(2,1011);
					t3=false;
				return;end;		
			return;end;	
		return;end;
		
		if id==1015 then
			if not t2 then
				speciale_action(2,1012);
				t2=true;
				if him2 then
					speciale_action(2,1005,true)
					finish_mini_game(true);
				end;
				if t1 then
					speciale_action(2,1013);
					t1=false;
				return;end;
				if t3 then
					speciale_action(2,1011);
					t3=false;
				return;end;		
			return;end;		
		return;end;

		if id==1016 then
			if not t3 then
				speciale_action(2,1011);
				t3=true;
				if t2 then
					speciale_action(2,1012);
					t2=false;
				return;end;
				if t1 then
					speciale_action(2,1013);
					t1=false;
				return;end;			
			return;end;	
		return;end;	
		return;end;
	return;end;
			
end;
function mini_delete ()

end;