function mini_create ()
	init_mini(1);
	create_mini(31,7,5,0,false,48,40,62,62,62,1001);
 
for i=1001,1097,1 do
	set_visible_object(i,false)
end;
end;
flag = true;
go=true;

function gameinput (sender,id,attachedID)
MiniInterfaceHandler( sender, id );
		if sender == 10 then -- the end
		flags.mini = true;
		StartTimer(8882,0.1);
		BlockCursor(true)
			mini_start=false;
	return; end;
	  if sender == 36 then  
		if id == 8882 then
			flags.mini1_complete=true
			ClosePlushes();
		return; end;	
		
   return; end;	
  
   if sender==15 then
   speciale_action(2,1001,true,1)
   end
   
   if sender==16 then
   
   speciale_action(2,1001,true,1)
   end
	if sender==777 then	
	clear_satelite_leaf("museum2");
	end
	
	
	if sender==28 then	
		go=true;
		speciale_action(2,1001,true)	
		c("go = true \n")
	return; end;
	if sender == 33 then		
		MiniInterfaceHandler( 33, id );
		if flag then
			flag = false;			
			speciale_action(4,obj.mini_border.id)
			speciale_action(4,obj.mini_help2.id)
			speciale_action(4,obj.mini_skip2.id)
			speciale_action(4,obj.mini_skip_loading.id)
			speciale_action(4,obj.mini_menu2.id);
			
			
			speciale_action(4,obj.mini_help.id)
			speciale_action(4,obj.mini_skip.id)
			speciale_action(4,obj.mini_skip_loading.id)
			speciale_action(4,obj.mini_menu.id);
		
			speciale_action(4,obj.mini_help1.id)
			speciale_action(4,obj.mini_skip1.id)
			speciale_action(4,obj.mini_skip_loading.id)
			speciale_action(4,obj.mini_menu1.id);
			CreateWindow(CWX,CWY,"666",80870,nil,100,230);
			for i=1001,1097,1 do
				set_visible_object(i,true)
			end;
		return; end;
	return; end;
	
	if sender == 30 then
	if mini_start then
			StopAllEffects()
			setstatemenu()
			mini_start=false;
			StopMusic()
		return;end
		OpenPlushes();
		BlockCursor(false)
		SetCurrentLeaf("museum2",13,0);
		
			flags.start_draw = true;
			flags.mini_com2= true
			flags.comics2= true;
	return;end;
		
	if sender==1 then
	MiniInterfaceHandler( sender, id );
		object_id=id;
		if id==6000 then
	    	helpbtn=true;
		return;end;
		if id==5000 and skipping then
			if not flags.minicomplete2 then
				finish_mini_game(true);
			return;end;	
		return;end;
		if id == 100 then
			   playeffect("017");	
		finish_mini_game(false);			
		clear_satelite_leaf("museum2");
		end;
	return; end;
	
	if sender==26  then
		RemoveWindow(8,2.8,"DestroyMyWindow")
	end
   
if sender==6 then
	if object_id~=1001 and go then	
		  if   check_mini_game_Labyrinth()	then
				go =false				
		  else
				return
		  end
	  playeffect("090")	  
    end;	
	  	object_id=0;
    end;	
end;
function mini_delete ()

end;