<?php
function joomlaposition_19() {
    $document = JFactory::getDocument();
    $view = $document->view;
    $isPreview  = $GLOBALS['theme_settings']['is_preview'];
    if (isset($GLOBALS['isModuleContentExists']) && false == $GLOBALS['isModuleContentExists'])
        $GLOBALS['isModuleContentExists'] = $view->containsModules('header-middle') ? true : false;
?>
    <?php if ($isPreview || $view->containsModules('header-middle')) : ?>

    <?php if ($isPreview && !$view->containsModules('header-middle')) : ?>
    <!-- empty::begin -->
    <?php endif; ?>
    <div class="data-control-id-1385866 bd-joomlaposition-19 clearfix" <?php echo buildDataPositionAttr('header-middle'); ?>>
        <?php echo $view->position('header-middle', 'block%joomlaposition_block_19', '19'); ?>
    </div>
    <?php if ($isPreview && !$view->containsModules('header-middle')) : ?>
    <!-- empty::end -->
    <?php endif; ?>
    <?php endif; ?>
<?php
}