protected function getLibrariesInUse()
    {
        $aNames = $this->getOption('dialogs.libraries', array());
        if(!is_array($aNames))
        {
            $aNames = array();
        }
        $libraries = array();
        foreach($aNames as $sName)
        {
            if(($library = $this->getLibrary($sName)))
            {
                $libraries[$library->getName()] = $library;
            }
        }
        if(($library = $this->getModalLibrary()))
        {
            $libraries[$library->getName()] = $library;
        }
        if(($library = $this->getAlertLibrary()))
        {
            $libraries[$library->getName()] = $library;
        }
        if(($library = $this->getConfirmLibrary()))
        {
            $libraries[$library->getName()] = $library;
        }
        return $libraries;
    }