function MessageFromMenu(nCount,Param1)
-- if Param1==2000029 then
	-- CreateWindow(200,200,"2",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
			if not help then
			help=true;
			CreateWindow(200,200,"2",101,"messageinfo")
		end;
	   BlockCursor(false);
	return;end;
	if sender==30 then
		setcurentleaf("photolab",4,0);
		DarkScreen(false);
		--Emitters(true);
		if flags.minicomplete1 then
		    StopEmiter("Micro")
			flags.minirun2=false;
			flags.minitext2=true;
			speciale_action(2,40,true);
			speciale_action(2,2,true);
			Set_Cursor(2,2);
			Set_Cursor(40,2);
			Set_Cursor(14,3);

		return;end;
		

		-- addactivobjecttogame(104,"a0104",0,2000,"","");
		-- AddElement("gr",104);
		-- MoveObjectToTree(104);
	return; end;
	
	-- if sender==36 then
	    -- clear_satelite_leaf("photolab");
	-- return;end;
	
	
	if sender==10 then
		flags.minicomplete1=true;
		clear_satelite_leaf("photolab");
		playeffect("miniC");
		--StartTimer(2100,2)
	return; end;
	if sender==37 then
	   skipping=true;
	return;end;
	if sender==26 then
		if id==100 then
			if ok then
				finish_mini_game(true);
			end;  			
			if objectid==1001 then 
				SetObjectPosition(objectid,663,207);
				objectid=0;
			return;end;
			SetObjectPosition(objectid,666,383);
			objectid=0;

		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,"2",100,"messageinfo") 
		return;end;
		
		if id==1000 and attachedID==-1 then
			playeffect("close");
		   clear_satelite_leaf("photolab");
		   finish_mini_game(false);
			DeleteResource("am1_btn")
			DeleteResource("am1_ashes1")
			DeleteResource("am1_ashes2")
			DeleteResource("am1_bg")	
			DeleteResource("am1_lens")				
		return;end;


		if id==5000 and skipping  and   attachedID==-1 then
		playeffect("skip");
		if not flags.minicomplete1 then
			finish_mini_game(true);
		return;end;		
		return;end;				
		-- if id ==1001 or id==1002 then


		-- return;end;		
	return;end;

	if sender==8128 then

		if id>=Ashes1X and id<=Ashes1X+width and attachedID>=Ashes1Y and attachedID<=Ashes1Y+height then
		if not ashes1 then
			add_to_mouse(1001);
			speciale_action(4,1004)
			objectid=1001;
			rX=id-Ashes1X;
			rY=attachedID-Ashes1Y;			
			mousepressed=true;	
		return;end;		
		return;end;
		if id>=Ashes2X and id<=Ashes2X+width and attachedID>=Ashes2Y and attachedID<=Ashes2Y+height then
		if not ashes2 then			
			add_to_mouse(1002);
			speciale_action(4,1004)
			objectid=1002;
			rX=id-Ashes2X;
			rY=attachedID-Ashes2Y;				
			mousepressed=true;		
		return;end;	
		return;end;		
	return;end;
	
	if sender==8129 then
		if mousepressed then
			mousepressed=false;		
			RemoveFromMouse(objectid);
			speciale_action(4,1004)
			x_id=id-rX;
			y_id=attachedID-rY;	
			if x_id>=200 and x_id<=280 and y_id>=210 and y_id<=434 then
			SetObjectPosition(objectid,218,230);
				if objectid==1001 then
					ashes1=true;
				end;
				if objectid==1002 then
					ashes2=true;
				end;			
				if second then
					CreateWindow(100,100,"219",100);
					ok=true
				return;end;
				second=true;
				CreateWindow(100,100,"218",100);
			return;end;					
			if objectid==1001 then 
			    Ashes1X=663
				Ashes1Y=207
				SetObjectPosition(objectid,663,207);
				objectid=0;
			return;end;
			Ashes2X=666
			Ashes2Y=383
			SetObjectPosition(objectid,666,383);	
			objectid=0;	
		return;end;
	return;end;
end;
function mini_delete ()

end;