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);
	
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);
		if id==1020 then
			clear_satelite_leaf("albert_kab");	
		return;end
	return;end;

	if sender==30 then
		setcurentleaf("albert_kab",17,1);
		DarkScreen(false)
		if flags.minicomplete4 then
		    StopEmiter("Shelf");
			AddParticleToObject(41,"Safe",0,0);
			StartEmiter("Safe");
			MoveEmiter("Safe",237,490)		
			playeffect("door");				
			Set_Cursor(68,3);
			speciale_action(2,66,true);
			speciale_action(2,41,true);
			Set_Cursor(41,4);
			flags.boxout=true;
			
			--AddParticleToObject(41,"./particles/particle2.psi");
		return;end
	return; end;
	if sender==10 then
		flags.minicomplete4=true;
		playeffect("miniC");
		for i=1001,1018,1 do
			if not books[i] then
				speciale_action(2,i)
			end;
		end;
		
		speciale_action(2,1019,true)	
		speciale_action(2,1021)	
		speciale_action(2,1022)		
		
	return; end;
	if sender==37 then
	   skipping=true;
	return;end;
	-- if sender==6 then
		-- finish_mini_game(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,"5",100,"messageinfo")
		return;end;	 	
		if id==5000 and skipping then
			if not 	flags.minicomplete4 then
				playeffect("skip");
				finish_mini_game(true);
			return;end;
		return;end;
		
		if id==1021 then
			speciale_action(2,1020,true)	
			speciale_action(2,1021,true)	
		return;end;
		if id==1024 then
			finish_mini_game(false);
			playeffect("close");
			clear_satelite_leaf("albert_kab");
			DeleteResource("dm1_btn");
			DeleteResource("dm1_0003");
			DeleteResource("dm1_0004");
			DeleteResource("dm1_0005");
			DeleteResource("dm1_0006");
			DeleteResource("dm1_0007");
			DeleteResource("dm1_0008");
			DeleteResource("dm1_0009");
			DeleteResource("dm1_0010");
			DeleteResource("dm1_0011");
			DeleteResource("dm1_0012");
			DeleteResource("dm1_0013");
			DeleteResource("dm1_0014");
			DeleteResource("dm1_0015");
			DeleteResource("dm1_0016");
			DeleteResource("dm1_0017");
			DeleteResource("dm1_0018");
			DeleteResource("dm1_0019");
			DeleteResource("dm1_0020");
			DeleteResource("dm1_bg2");
			DeleteResource("dm1_buttonok");
			DeleteResource("dm1_button");
			DeleteResource("dm1_bg1");
			DeleteResource("dm1_bg");		
		return;end;
		
		if id>=1001 and id <=1018 then
		
			if firsttime then 
				temp=id;
				setcolor(id,0.6,0.6,0.6,1);
				firsttime=false; 
			return;end;			  
			firsttime=true;
			setcolor(temp,1,1,1,1);
			if id==temp+9 or id==temp-9 then
			  speciale_action(2,id,true);
			  speciale_action(2,temp,true);
			  book_pairs=book_pairs+1;
				books[id]=true;
				books[temp]=true;
				 playeffect("1");
			  if book_pairs==9 then 
				finish_mini_game(true);
			  return;end;
			return;end;	
				
		return;end;
	return;end;
			
end;
function mini_delete ()

end;