function CreateInfoItemZone(item_find, text_singular, text)
    if text_singular then
        play_field:GetLevelScreen():AddTaskSafe(CreateTask(text_singular, '', item_find:GetName()))
    end

    local zone = {}
    zone.objects = {}
    
    local pf = play_field
    local level = play_field:GetLevelScreen()
    local max_z = pf:GetMaxObjectsZ()
    local pos_x = 512
    local pos_y = 384
    
    -- Create bg
    local anim = CreateAnimation('data/Texture/Screen/YesNoScreen/YesNoScreen.png',0,0,606,333,1,0)
	anim:SetHotSpot(303,166)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	local bg_zone = pf:CreateObject('YesNoScreen',anim,512,384,100,0,1,1)

	bg_zone:SetZ(max_z + 10.);
	zone.objects[bg_zone:GetName()] = true
	
	-- Create pixel object for blocked
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	local obj = play_field:CreateObject('Back' .. item_find:GetName(),anim,512,384,100,0,1024,768)
	obj:SetZ(max_z - 1)
	obj:SetVisible(false)
	zone.back_object = obj
	
	-- Create item_find
	zone.item_find = item_find
	item_find:SetZ(max_z + 20)
	item_find:SetXY(pos_x - 160, pos_y - 10)
	item_find:GetAnimation():SetColor('0xFFFFFFFF')
    item_find:SetOpacity(0)
    
    -- Create Captions
    if text then
        local TextEntity = CreateTextEntity("WindowText28", text)
        TextEntity:AttachTo( bg_zone )
        TextEntity:SetScale(1)
        TextEntity:SetZ(20)
        TextEntity:SetXY(-50, -110)
        TextEntity:SetBorderSize(320, 180)
        TextEntity:SetName('text')
        TextEntity:SetTextAlignment(HGETEXT_MIDDLE + HGETEXT_CENTER)
        zone.objects[TextEntity:GetName()] = true
    end        
    
    local CLOSE_BUTTON_POS = Vector(0, 100)
    local name_bttn = item_find:GetName()..'close_button'
    
    -- Create bttn back
    local anim = CreateAnimation('data/Texture/GUI/Button/bttn_back.png',0,0,185,72,1,0)
	anim:SetHotSpot(92,36)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
    local obj = play_field:CreateObject(name_bttn..'back',anim,CLOSE_BUTTON_POS.x - 4,CLOSE_BUTTON_POS.y + 5,105,0,1,1)
    obj:SetZ(max_z + 1.2)
    obj:AttachTo(bg_zone)
    zone.objects[obj:GetName()] = true
	
	-- Create bttn
    zone.close_button = create_button_ex(level, 'data/Texture/GUI/Button/bttn_ok.png', name_bttn, CLOSE_BUTTON_POS.x, CLOSE_BUTTON_POS.y, 120)
	zone.close_button:SetVisible(false)
	zone.close_button:SetZ(max_z + 2)
	zone.close_button:AttachTo(bg_zone)
	
	for i, v in pairs(zone.objects) do
        if play_field:HasObject(i) then
            local obj = play_field:GetObject(i)
            
            obj:GetAnimation():SetColor('0xFFFFFFFF')
            obj:SetOpacity(0)
        end
    end
	
	AssignInfoItemZoneMethods(zone)
	local info = {}
    info.zone = zone
    info.item_find = item_find
    table.insert(game_state.info_item_zone, info)
    
    -- Check of save
    if  HasGameState(game_state.scene_path..zone.item_find:GetName(), 'play') == true and
        HasGameState(game_state.scene_path..zone.item_find:GetName(), 'hide') == false
    then
        zone.Play()
    end
    
    return zone
end

function AssignInfoItemZoneMethods(zone)
    zone.IsVisible = function()
        for i, v in pairs(zone.objects) do
            if v == true and play_field:HasObject(i) then
                local obj = play_field:GetObject(i)
                if obj:IsVisible() and obj:GetOpacity() > 0. then
                    return true
                end
            end
        end

        return false
    end
    
    zone.SetVisible = function(is_visible)
        if is_visible == zone.IsVisible() then
            return
        end
    
        zone.close_button:SetVisible(is_visible)

        if is_visible then
            zone.close_button:Go()
            game_state.locker:AddRef()
        else
            zone.close_button:Stop()
            game_state.locker:Release()
        end
        
        if is_visible then
            zone.item_find:ChangeOpacity(0, 1, ZOOM_ZONE_APPEARING_TIME)
        else
            local level = play_field:GetLevelScreen()
            if level:IsTaskObject(zone.item_find:GetName()) then
                play_field:OnObjectFound(zone.item_find)
            else
                zone.item_find:ChangeOpacity(1, 0, ZOOM_ZONE_APPEARING_TIME)
            end                
        end

        for i, v in pairs(zone.objects) do
            if v == true and play_field:HasObject(i) then
                obj = play_field:GetObject(i)
                if is_visible then
                    obj:ChangeOpacity(0, obj:GetMaxOpacity(), ZOOM_ZONE_APPEARING_TIME)
                else
                    obj:ChangeOpacity(obj:GetMaxOpacity(), 0, ZOOM_ZONE_APPEARING_TIME)
                end
            end
        end
        
        if is_visible then
			TimerDo(play_field:GetTimer(), ZOOM_ZONE_APPEARING_TIME, zone.OnShown)
		else
			TimerDo(play_field:GetTimer(), ZOOM_ZONE_APPEARING_TIME, zone.OnHidden)
		end	
        
        zone.back_object:SetVisible(is_visible)
        
        if is_visible == false then
            AddGameState(game_state.scene_path..zone.item_find:GetName(), 'hide')
        end
    end
    
    zone.Play = function()
        zone.SetVisible(true)
        
        local state = game_state.scene_path..zone.item_find:GetName()
        if HasGameState(state, 'play') == false then
            AddGameState(state, 'play')
        end
    end
    
    zone.IsPlayed = function()
        local state = game_state.scene_path..zone.item_find:GetName()
        local show = HasGameState(state, 'play')
        local hide = HasGameState(state, 'hide')
        
        return show and hide
    end
    
    zone.OnHidden = function()
    end
    
    zone.OnShown = function()
    end
end

function ShowInfoItemWindow(item)
    if game_state.info_item_zone then
	    for i, info in ipairs(game_state.info_item_zone) do
		    if item:GetName() == info.item_find:GetName() and info.zone.IsVisible() == false then
                info.zone.Play()
            end
        end -- for i, info in ipairs(game_state.zones) do
    end
end

