local flag = true;
vasea=-1;
function mini_create()
	init_mini(true);
	create_mini(3,202+70,76+53,207,207,10000,2,2,3,3);
end;



function gameinput(sender, obj_id, attachedID)

MiniInterfaceHandler( sender, obj_id );

if sender==26 then
RemoveWindow(8,2.8,"DestroyMyWindow")
end
	if sender==35  then	
	
	if obj_id>=10000 and obj_id<=10008 then		
	if obj_id==vasea then
	
	return;end
		setcolor(obj_id,1,0.9,0.25,1)		
	end;
	
	end
	
	
	if sender==39   then
	if obj_id==vasea then
	
	return;end
	if obj_id>=10000 and obj_id<=10008 then		
			setcolor(obj_id,1,1,1,1)
	end;
	
	end
	
	if sender==777 then
			clear_satelite_leaf("cockpit");
			flags.comics3 = true;
			flags.start_draw = true;
			flags.mini_com2= true
			flags.comics3= true;
	
	end

	if sender == 10 then -- the end
		 finish_mini_game(false)
		flags.mini = true;
		BlockCursor(true)
		StartTimer(8882,0.2);	
			mini_start=false;
	return; end;
		
	  if sender == 36 then  
    if obj_id == 8882 then
		flags.mini1_complete = true;
		ClosePlushes();
    return; end;	
   return; end;	
	if sender == 33 then	
		CreateWindow(CWX,CWY,"666",3442,nil,100,230);				
	return; end;
	
	if sender == 30 then	
			if mini_start then
				StopAllEffects()
				setstatemenu()
				StopMusic()
				mini_start=false;
			return;end
			BlockCursor(false)
			LevelComplete();
	return;end;
		
	if sender == 1 then		
			MiniInterfaceHandler( 1, obj_id );
		if obj_id>=10000 and obj_id<=10008 then
		
			vasea=obj_id
			check_mini_game_money_pation(obj_id,flag);
			playeffect("067")
			flag=not flag;
			if  flag then
			vasea=-1;
			setcolor(obj_id,1,1,1,1)
			end
		end;
	end;
	
	
	
return; end;
