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

function mini_create ()
show_help_wnd=true;
			init_mini(1);
	create_mini(8128);
	--finish_mini_game(true);
end;
--function mini_msg_proc (id)
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==30 then
		setcurentleaf("tir",7,1);
		SoberCursor(1016)
		FreeCustomCursor(1016);
		DarkScreen(false);
	    if flags.minicomplete5 then 
		    StopEmiter("Tir");
			speciale_action(2,64,true);
			speciale_action(2,68,true);	
			speciale_action(2,69,true);	
			Set_Cursor(68,3);
			Set_Cursor(69,3);
			Set_Cursor(41,3);
			setcolor(64,0,0,0,1,1);
			flags.tickets=true;
		return;end;
	return; end;
	
	if sender==36 then
		if id==2100 then
		finish_mini_game(true);
		BlockCursor(false);
		return;end;
	return;end;
	if sender==37 then
	   skipping=true;
	return;end;	
	if sender==10 then
		flags.minicomplete5=true;
		flags.minirun5=false;
		playeffect("miniC");
		clear_satelite_leaf("tir");		
		--BlockCursor(true);
	return; end;
	
	if sender==8128 then
	--	messageboxi(id);
		if id>=356 and attachedID>=155 and id<=706 and attachedID<=499 then
			playeffect("shoot");
		   addactivobjecttogame(idhole,"em_hole",id-20,attachedID-20,"","");
		   speciale_action(4,idhole);
		   idhole=idhole+1;
		   if not ok[1] then
		        if id>=480 and attachedID>=237 and id<=507 and attachedID<=256 then
				ok[1]=true;
				SetAlfa(1001,1,1,1)
				end;
		   end;
		   if not ok[2] then
		    if id>=595 and attachedID>=341 and id<=622 and attachedID<=365 then
				ok[2]=true;
				SetAlfa(1002,1,1,1)
				end;
		   end;
		   if not ok[3] then
		    if id>=479 and attachedID>=424 and id<=503 and attachedID<=448 then
				ok[3]=true;
				SetAlfa(1003,1,1,1)
				end;
		   end;		 
			if ok[1] and ok[2] and ok[3] then
				StartTimer(2100,1);
			end;
	   end;
	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,"5",100,"messageinfo")
		return;end;		
			if id==5000 and skipping then	
				playeffect("skip");
				finish_mini_game(true);
			return;end;	
		if id==1013 then
			playeffect("close");
			DeleteResource("em_numbers");
			DeleteResource("em_cursor");
			DeleteResource("em_hole");
			DeleteResource("em_btn");	
			DeleteResource("em_bg");

			DeleteResource("em_ok");
			finish_mini_game(false);	   
			clear_satelite_leaf("tir");
		return;end;	
		
		-- if id>=1005 and id<=1010 then
			-- score=score+(id-1000);
			-- number3=math.floor(math.fmod(score,10))
			-- number2=math.floor(math.fmod(score/10,10))
			-- number1=math.floor(math.fmod(score/100,10))			
				-- number1=number1*31;
				-- number2=number2*31;
				-- number3=number3*31;			
				-- set_pos_in_img(1001,0,number1,12,31);
				-- set_pos_in_img(1002,0,number2,12,31);
				-- set_pos_in_img(1003,0,number3,12,31);
			-- if score>=30 then
			   -- BlockCursor(true);
			   -- StartTimer(2100,2);	
			-- end  
		-- return;end;
		
	return;end;

end;
function mini_delete ()

end;