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

function mini_create ()
show_help_wnd=true;
			init_mini(1);
	create_mini(1,260,115,54,101,1001);
	--finish_mini_game(false);
end;
--function mini_msg_proc (id)
function gameinput (sender,id,attachedID)


	if sender==16 then
		if not help then
			help=true;
			CreateWindow(200,200,"6",100,"messageinfo")
		end;			
	   BlockCursor(false);
	return;end;
	if sender==30 then
		setcurentleaf("billiard",7,2);
		DarkScreen(false);
	    if flags.minicomplete6 then 
		    StopEmiter("Pool");
			speciale_action(2,31,true);
			setcolor(31,0,0,0,1,1);
			Set_Cursor(44,3);
			savegame(SaveLevel())
		return;end;
	return; end;
	if sender==37 then
	   skipping=true;
	return;end;
	if sender==36 then
		if id==2100 then
		BlockCursor(false);
	    clear_satelite_leaf("billiard");
		return;end;
	return;end;
	if sender==10 then
		flags.minicomplete6=true;
		playeffect("miniC");
		StartTimer(2100,3);
		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
		   CreateWindow(200,200,"6",100,"messageinfo")
		return;end;		
		if objectid==0 then
			if id==5000 and skipping then
				playeffect("skip");
				finish_mini_game(true);
				SetObjectPosition(1001,264,319);
				SetObjectPosition(1002,317,319);
				SetObjectPosition(1003,371,319);
				SetObjectPosition(1004,424,319);
				SetObjectPosition(1005,477,319);
				SetObjectPosition(1006,531,319);
				SetObjectPosition(1007,584,319);
				SetObjectPosition(1008,638,319);
				SetObjectPosition(1009,692,319);
				SetObjectPosition(1010,746,319);
			return;end;                
			if id>=1001 and id<=1010 then
				add_to_mouse(id);
				mousepresed=true;
				objectid=id;
			return;end;
			if id==1013 then
				playeffect("close");
				DeleteResource("pm_balls");
				DeleteResource("pm_btn");	
				DeleteResource("pm_bg");
				DeleteResource("pm_reset");
				finish_mini_game(false);	   
				clear_satelite_leaf("billiard");
			return;end;	
			if id==1016 then
				reset_game_klh();
			return;end;
		return;end;
	return;end;

	if sender == 6 --Отпустили левую кнопку мышки
	then		
		if mousepresed==true
		then
			playeffect("pclick");
			RemoveFromMouse(objectid);
			check_mini_game_money(objectid,1);
			mousepresed=false;
			objectid=0;
		end
	return; end;	
	
end;
function mini_delete ()

end;