<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<?php include_http_metas() ?>
<?php include_metas() ?>
<?php echo content_tag('title', @blogStore::$blog->getBlTitle())."\n" ?>
<?php use_javascript(sfConfig::get('sf_prototype_web_dir'). '/js/prototype.js', 'first') ?>

<?php $layout = blogStore::$moduleConfig['layout'] ?>
<?php use_stylesheet('layout/'.$layout.'/main.css') ?>
<?php use_stylesheet('layout/'.$layout.'/screen.css') ?>
<?php use_stylesheet('layout/'.$layout.'/menu.css') ?>
<?php use_stylesheet('layout/'.$layout.'/tab.css') ?>
<?php use_stylesheet('layout/'.$layout.'/iehack.css') ?>

<?php use_javascript('/plugins/dhtmlx/js/dhtmlxcommon.js') ?>
<?php use_javascript('/plugins/dhtmlx/js/dhtmlxtree.js') ?>
<?php use_stylesheet('/plugins/dhtmlx/css/dhtmlx.css') ?>
<?php use_stylesheet('/plugins/dhtmlx/css/dhtmlxtree.css') ?>
</head>

<body>
<?php blogStatistics::getInstance() ?>
<?php echo content_tag('style', blogStore::getLayoutCSS())."\n" ?>
<?php $columns = explode('_', blogStore::getParam('config/leftmenu', 'left')) ?>
<?php $onecol = count($columns) == 1 ?>
<?php $wide = blogStore::getParam('config/screenwidth') == 'wide' ?>
<?php if (sfContext::getInstance()->getModuleName() == 'admin' && !($wide && $onecol)) array_pop($columns) ?>
<div id="wrap1">
  <div id="wrap2"<?php echo $wide? ' style="width:980px"': '' ?>>
    <div id="wrap3">
      <div id="wrap4">
        <div id="top">
          <?php include_component('block', 'welcome', array('wide'=>$wide)) ?>
          <div id="top3">
            <?php echo blogStore::getSwfBanner() ?>
            <?php include_component('block', 'advbanner', array('name'=>'banner')) ?>
          </div>
          <?php include_component('block', 'topmenu') ?>
          <?php include_component('block', 'advbanner', array('name'=>'header')) ?>
        </div>
          <?php $timeouts = sfConfig::get('sf_blocknocache', array()) ?>
          <?php $sideNames = array('left', 'right') ?>

          <?php foreach ($columns as $col => $side): ?>
          <div id="side" class="span-5 nowrap" style="float:<?php echo $side ?>">
            <?php foreach (blogStore::getModules($onecol? 'left|right': $sideNames[$col]) as $name => $module): ?>
              <?php preg_match('@^\D+@', $name, $match) ?>
              <div class="side-<?php echo $match[0].' '.@$module['class'] ?>">
                <h2><?php echo @$module['name'] ?></h2>
                <div class="content">
                  <?php if ($match[0]=='block'): ?>
                    <?php echo @$module['embed'] ?>
                    <?php include_component('block', 'advbanner', array('name'=>$name)) ?>
                  <?php else: ?>
                    <?php cache_include_component('block', $name, array('params'=>@$module['params'], 'content'=>@$module['content']), @$timeouts[$match[0]]) ?>
                  <?php endif ?>
                </div>
                <div class="bottom"></div>
              </div>
            <?php endforeach ?>
          </div>
          <?php endforeach ?>

        <?php if (sfContext::getInstance()->getModuleName() != 'admin'): ?>
          <div id="mainwrap" class="nowrap">
            <div id="main">
              <?php foreach (blogStore::getModules('center') as $name=>$module): ?>
                <?php preg_match('@^\D+@', $name, $match) ?>
                <div class="frame-<?php echo $match[0].' '.@$module['class'] ?>">
                  <?php if ($match[0]=='block'): ?>
                    <div class="doc">
                      <h2><?php echo @$module['name'] ?></h2>
                      <div class="content">
                        <?php echo @$module['embed'] ?>
                        <?php include_component('block', 'advbanner', array('name'=>$name)) ?>
                      </div>
                    </div>
                  <?php elseif ($match[0]=='main'): ?>
                    <?php echo $sf_data->getRaw('sf_content') ?>
                  <?php else: ?>
                    <?php cache_include_component('block', $name, array('params'=>@$module['params']), @$timeouts[$match[0]]) ?>
                  <?php endif ?>
                </div>
              <?php endforeach ?>
            </div>
          </div>

        <?php else: ?>
          <div id="adminwrap" class="nowrap">
            <?php include_component('admin', 'topmenu') ?>
            <div class="admin-content">
              <div class="admin-content2">
                <?php echo $sf_data->getRaw('sf_content') ?>
              </div>
            </div>
          </div>
        <?php endif ?>

        <div class="clear"></div>
        <?php include_component('block', 'advbanner', array('name'=>'footer')) ?>
        <?php include_component('block', 'footer') ?>
      </div>
    </div>
  </div>
</div>
<?php include_component('block', 'advfloat') ?>
</body>
</html>
<script>g_blogname = "<?php echo blogStore::$isRoute? '': blogStore::$blogName.'/' ?>"</script>
<script src="https://www.google.com/jsapi" type="text/javascript"></script>
<script language="Javascript" type="text/javascript">google.load("search", "1", {"language":"vi_VN"});</script>
<script type="text/javascript">
  var gaJsHost = (("https:" == document.location.protocol) ? "https://ssl." : "http://www.");
  document.write(unescape("%3Cscript src='" + gaJsHost + "google-analytics.com/ga.js' type='text/javascript'%3E%3C/script%3E"));
</script>
<script type="text/javascript">
  try {var pageTracker = _gat._getTracker("UA-2600779-4");pageTracker._trackPageview();}
  catch(err) {}
</script>