<div>
  <?php echo form_tag('', array('onsubmit'=>'executeSearch(); return false;')) ?>
    <?php echo input_tag('searchInput', 'Tìm kiếm...', array('onclick'=>'if (this.value=="Tìm kiếm...") this.value="";')) ?>
    <?php echo submit_tag('Tìm') ?>
    <?php if (blogStore::$blogName!='main'): ?>
      <br>
      <?php echo radiobutton_tag('searchAll', 0, true, 'id=sone') ?>
      <?php echo label_for('sone', 'Trang này') ?>&nbsp;&nbsp;
      <?php echo radiobutton_tag('searchAll', 1, false, 'id=sall') ?>
      <?php echo label_for('sall', 'violet.vn') ?>
    <?php else: ?>
      <?php echo input_hidden_tag('sone', 1) ?>
    <?php endif;?>
    <br>
    <?php echo link_to('Tìm kiếm nâng cao', 'block/advancesearch') ?>

    <script>
      function executeSearch() {
        var main = document.getElementById('main');
        main.innerHTML = '<div id="search_result"></div>';
        var host = $F('sone') == 0? '<?php echo $thishost ?>': 'violet.vn';
        var addition = 'site:' + host + ' inurl:show/entry_id';
        <?php echo $dosearch ?>('"' + $F("searchInput") + '"', addition);
      }
    </script>
  </form>
</div>
<div id="searchcontrol" style="display:none">Loading...</div>
