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==8128 then
		mouseclick=true;
	return;end;
	if sender==8129 then
		mouseclick=false;
	return;end;	
	
	if sender==16 then
		if not help then
			help=true;
			CreateWindow(200,200,"2",100,"messageinfo")
		end;		
	   BlockCursor(false);
	return;end;
	if sender==30 then
		if object==1004 or object==1005 then FreeCustomCursor(object); end;
		setcurentleaf("stefani",9,0);		
		if flags.minicomplete1 then
			StopEmiter("Diary");
			Set_Cursor(44,3);
			savegame(SaveLevel())
			if flags.all then
				flags.levelcomplete=true;
				speciale_action(2,500,true,2);
				speciale_action(4,500);
				BlockCursor(true);
				
			return; end;
			DarkScreen(false);
		return; end;
		DarkScreen(false);
	return; end;
	
	if sender==36 then
		if id==2100 then	
		BlockCursor(false);
		flags.minicomplete1=true;
		return;end;		
	return;end;
	if sender==37 then
	   skipping=true;
	return;end;	
	if sender==10 then
		
		RemoveFromMouse(object);
		playeffect("miniC");
		StartTimer(2100,1)
	return; end;
	
	if sender==100 then
	   finish_mini_game(true);
	return;end;
	
	if sender==35 then
	  if id>=1016 and id<=max_texture then
		  if object==1005 and mouseclick then
			speciale_action(2,id);
			playeffect("Brush");
			texture[id]=true;					
			err_count=1;
			StopOnMouseOver(id)
			for i=1016,max_texture,1 do
				if not texture[i] then
					err_count=err_count+1;
				end;					
			end;	
			if err_count<4 then
				--RemoveFromMouse(object);
				--FreeCustomCursor(1004)
				WaitRender();
			return;end;
		  return;end;
	  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==5000 and skipping then

			  if not flags.minicomplete1 then
					playeffect("skip");
					for i=1016,max_texture,1 do
						if not texture[i] then
							speciale_action(2,i);
							texture[id]=true;	
						end;					
					end;		
					BlockCursor(true);
					finish_mini_game(true);	
				return;end;
			  return;end;
			  
			  if id==1001  then
				finish_mini_game(false); 
				playeffect("close");
				if object==1004 or object==1005 then FreeCustomCursor(object); end;
				clear_satelite_leaf("stefani");
				DeleteResource("am1_texture");
				DeleteResource("am1_btn");
				DeleteResource("am1_brush");
				DeleteResource("am1_brush_powd");
				DeleteResource("am1_powder");
				DeleteResource("am1_light");
				DeleteResource("am1_lampon");
				DeleteResource("am1_lamp");
				DeleteResource("am1_lampbtnon");		
				DeleteResource("am1_lampbtn");
				DeleteResource("am1_text");
				DeleteResource("am1_bg");	
				DeleteResource("am1_dark");
				DeleteResource("am1_bg1");					
			  return;end;	
			  
			  if id==1011 then
			  if not flags.light then
				playeffect("handle");
				speciale_action(2,1007);
				speciale_action(2,1008);
				speciale_action(2,1010);
				speciale_action(2,1011);
				speciale_action(2,1014);
				flags.light=true;
				HideSkipBtn ()
StartProgress(5001,30,true)				
			return;end;	
			  return;end;
			  
			  if flags.light then
				  if id==1004 then
					SetCustomCursor(1004)
				   -- addObjectToMouse(id);
				  object=id
					-- visible_object(1005);
				  return;end;
		

		  
		  if id==1006 then
			if object==1004 then
			   -- RemoveFromMouse(attachedID);
			   -- DeleteElement("gr",attachedID);
			   --visible_object(1005);	   
			   FreeCustomCursor(1004)
			   speciale_action(2,1005);
			   speciale_action(2,1004);
			   SetCustomCursor(1005)
			   -- addObjectToMouse(1005);
			   object=1005
			return;end;
		  return;end;
		  
		  -- if id>=1016 and id<=max_texture then
			  -- if object==1005 then
				-- speciale_action(2,id);
				-- playeffect("Brush");
				-- texture[id]=true;					
				-- err_count=1;
				-- for i=1016,max_texture,1 do
					-- if not texture[i] then
						-- err_count=err_count+1;
					-- end;					
				-- end;	
				-- if err_count<5 then
				    -- RemoveFromMouse(attachedID);
					-- finish_mini_game(true);
				-- return;end;
			  -- return;end;
		  -- return;end;
		return;end;
		
	--	if attachedID==-1 then
	
	--	return;end;		
	return;end;
	if sender==6 then
	if flags.minicomplete1 then
		
		clear_satelite_leaf("stefani");
	return;end;	
	return;end;

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

end;