﻿Type.registerNamespace('eDott.WebUI');

eDott.WebUI.eDottTV = function eDott$WebUI$eDottTV()
{
    throw Error.notImplemented();
};

eDott.WebUI.eDottTV._currentCueSection = null;

eDott.WebUI.eDottTV.handlePlayerAction = function eDott$WebUI$eDottTV$handlePlayerAction(action, data)
{
    var elContainer = $get('eDottTV_SlideContainer');

    switch (action)
    {
        case 'cueSectionStart':
        {
            if (eDott.WebUI.eDottTV._currentCueSection)
                eDott.WebUI.eDottTV._currentCueSection.style.display = 'none';

            eDott.WebUI.eDottTV._currentCueSection = $get(data);
            
            if (eDott.WebUI.eDottTV._currentCueSection)
            {
                eDott.WebUI.eDottTV._currentCueSection.style.display = 'block';
            }
            else
            {
                eDott.WebUI.eDottTV._currentCueSection.style.display = 'none';
            }
            
            break;
        }

        case 'cueSectionEnd':
        case 'stop':
        {
            // Contrazione dell'area cue

            if (eDott.WebUI.eDottTV._currentCueSection)
            {
                eDott.WebUI.eDottTV._currentCueSection.style.display = 'none';
            }
               
            break;
        }
    }
};

// Compatibilità controlli esterni legacy

Type.registerNamespace('flvPlayer.WebUI.eDottTV');
flvPlayer.WebUI.eDottTV.HandlePlayerAction = eDott.WebUI.eDottTV.handlePlayerAction;

eDott.WebUI.eDottTV.registerClass('eDott.WebUI.eDottTV');
