<?php /* Smarty version 2.6.26, created on 2013-06-27 16:00:59
         compiled from Search/advanced.tpl */ ?>
<?php require_once(SMARTY_CORE_DIR . 'core.load_plugins.php');
smarty_core_load_plugins(array('plugins' => array(array('function', 'translate', 'Search/advanced.tpl', 3, false),array('function', 'js', 'Search/advanced.tpl', 120, false),array('modifier', 'count', 'Search/advanced.tpl', 26, false),array('modifier', 'escape', 'Search/advanced.tpl', 55, false),array('modifier', 'replace', 'Search/advanced.tpl', 83, false),)), $this); ?>
<form method="get" action="<?php echo $this->_tpl_vars['url']; ?>
/Search/Results" id="advSearchForm" name="searchForm" class="search">
  <div class="span-18<?php if ($this->_tpl_vars['sidebarOnLeft']): ?> push-5 last<?php endif; ?>">
    <h3><?php echo translate(array('text' => 'Advanced Search'), $this);?>
</h3>
    <div class="advSearchContent">
      <?php if ($this->_tpl_vars['editErr']): ?>
      <?php $this->assign('error', "advSearchError_".($this->_tpl_vars['editErr'])); ?>
        <div class="error"><?php echo translate(array('text' => $this->_tpl_vars['error']), $this);?>
</div>
      <?php endif; ?>
  
      <div id="groupJoin" class="searchGroups">
        <div class="searchGroupDetails">
          <label for="groupJoinOptions"><?php echo translate(array('text' => 'search_match'), $this);?>
:</label>
          <select id="groupJoinOptions" name="join">
            <option value="AND"><?php echo translate(array('text' => 'group_AND'), $this);?>
</option>
            <option value="OR"<?php if ($this->_tpl_vars['searchDetails'] && $this->_tpl_vars['searchDetails']['0']['join'] == 'OR'): ?> selected="selected"<?php endif; ?>><?php echo translate(array('text' => 'group_OR'), $this);?>
</option>
          </select>
        </div>
        <strong><?php echo translate(array('text' => 'search_groups'), $this);?>
</strong>:
      </div>
  
            <div id="searchHolder">
                <noscript>
        <?php if ($this->_tpl_vars['searchDetails']): ?>
          <?php $this->assign('numGroups', count($this->_tpl_vars['searchDetails'])); ?>
        <?php endif; ?>
        <?php if ($this->_tpl_vars['numGroups'] < 3): ?><?php $this->assign('numGroups', 3); ?><?php endif; ?>
        <?php unset($this->_sections['groups']);
$this->_sections['groups']['name'] = 'groups';
$this->_sections['groups']['loop'] = is_array($_loop=$this->_tpl_vars['numGroups']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['groups']['show'] = true;
$this->_sections['groups']['max'] = $this->_sections['groups']['loop'];
$this->_sections['groups']['step'] = 1;
$this->_sections['groups']['start'] = $this->_sections['groups']['step'] > 0 ? 0 : $this->_sections['groups']['loop']-1;
if ($this->_sections['groups']['show']) {
    $this->_sections['groups']['total'] = $this->_sections['groups']['loop'];
    if ($this->_sections['groups']['total'] == 0)
        $this->_sections['groups']['show'] = false;
} else
    $this->_sections['groups']['total'] = 0;
if ($this->_sections['groups']['show']):

            for ($this->_sections['groups']['index'] = $this->_sections['groups']['start'], $this->_sections['groups']['iteration'] = 1;
                 $this->_sections['groups']['iteration'] <= $this->_sections['groups']['total'];
                 $this->_sections['groups']['index'] += $this->_sections['groups']['step'], $this->_sections['groups']['iteration']++):
$this->_sections['groups']['rownum'] = $this->_sections['groups']['iteration'];
$this->_sections['groups']['index_prev'] = $this->_sections['groups']['index'] - $this->_sections['groups']['step'];
$this->_sections['groups']['index_next'] = $this->_sections['groups']['index'] + $this->_sections['groups']['step'];
$this->_sections['groups']['first']      = ($this->_sections['groups']['iteration'] == 1);
$this->_sections['groups']['last']       = ($this->_sections['groups']['iteration'] == $this->_sections['groups']['total']);
?>
          <?php $this->assign('groupIndex', $this->_sections['groups']['index']); ?>
          <div class="group group<?php echo $this->_tpl_vars['groupIndex']%2; ?>
" id="group<?php echo $this->_tpl_vars['groupIndex']; ?>
">
            <div class="groupSearchDetails">
              <div class="join">
                <label for="search_bool<?php echo $this->_tpl_vars['groupIndex']; ?>
"><?php echo translate(array('text' => 'search_match'), $this);?>
:</label>
                <select id="search_bool<?php echo $this->_tpl_vars['groupIndex']; ?>
" name="bool<?php echo $this->_tpl_vars['groupIndex']; ?>
[]">
                  <option value="AND"<?php if ($this->_tpl_vars['searchDetails'] && $this->_tpl_vars['searchDetails'][$this->_tpl_vars['groupIndex']]['group']['0']['bool'] == 'AND'): ?> selected="selected"<?php endif; ?>><?php echo translate(array('text' => 'search_AND'), $this);?>
</option>
                  <option value="OR"<?php if ($this->_tpl_vars['searchDetails'] && $this->_tpl_vars['searchDetails'][$this->_tpl_vars['groupIndex']]['group']['0']['bool'] == 'OR'): ?> selected="selected"<?php endif; ?>><?php echo translate(array('text' => 'search_OR'), $this);?>
</option>
                  <option value="NOT"<?php if ($this->_tpl_vars['searchDetails'] && $this->_tpl_vars['searchDetails'][$this->_tpl_vars['groupIndex']]['group']['0']['bool'] == 'NOT'): ?> selected="selected"<?php endif; ?>><?php echo translate(array('text' => 'search_NOT'), $this);?>
</option>
                </select>
              </div>
            </div>
            <div class="groupSearchHolder" id="group<?php echo $this->_tpl_vars['groupIndex']; ?>
SearchHolder">
            <?php if ($this->_tpl_vars['searchDetails']): ?>
              <?php $this->assign('numRows', count($this->_tpl_vars['searchDetails'][$this->_tpl_vars['groupIndex']]['group'])); ?>
            <?php endif; ?>
            <?php if ($this->_tpl_vars['numRows'] < 3): ?><?php $this->assign('numRows', 3); ?><?php endif; ?>
            <?php unset($this->_sections['rows']);
$this->_sections['rows']['name'] = 'rows';
$this->_sections['rows']['loop'] = is_array($_loop=$this->_tpl_vars['numRows']) ? count($_loop) : max(0, (int)$_loop); unset($_loop);
$this->_sections['rows']['show'] = true;
$this->_sections['rows']['max'] = $this->_sections['rows']['loop'];
$this->_sections['rows']['step'] = 1;
$this->_sections['rows']['start'] = $this->_sections['rows']['step'] > 0 ? 0 : $this->_sections['rows']['loop']-1;
if ($this->_sections['rows']['show']) {
    $this->_sections['rows']['total'] = $this->_sections['rows']['loop'];
    if ($this->_sections['rows']['total'] == 0)
        $this->_sections['rows']['show'] = false;
} else
    $this->_sections['rows']['total'] = 0;
if ($this->_sections['rows']['show']):

            for ($this->_sections['rows']['index'] = $this->_sections['rows']['start'], $this->_sections['rows']['iteration'] = 1;
                 $this->_sections['rows']['iteration'] <= $this->_sections['rows']['total'];
                 $this->_sections['rows']['index'] += $this->_sections['rows']['step'], $this->_sections['rows']['iteration']++):
$this->_sections['rows']['rownum'] = $this->_sections['rows']['iteration'];
$this->_sections['rows']['index_prev'] = $this->_sections['rows']['index'] - $this->_sections['rows']['step'];
$this->_sections['rows']['index_next'] = $this->_sections['rows']['index'] + $this->_sections['rows']['step'];
$this->_sections['rows']['first']      = ($this->_sections['rows']['iteration'] == 1);
$this->_sections['rows']['last']       = ($this->_sections['rows']['iteration'] == $this->_sections['rows']['total']);
?>
              <?php $this->assign('rowIndex', $this->_sections['rows']['index']); ?>
              <?php if ($this->_tpl_vars['searchDetails']): ?><?php $this->assign('currRow', $this->_tpl_vars['searchDetails'][$this->_tpl_vars['groupIndex']]['group'][$this->_tpl_vars['rowIndex']]); ?><?php endif; ?>
              <div class="advRow">
                <div class="label">
                  <label <?php if ($this->_tpl_vars['rowIndex'] > 0): ?>class="offscreen" <?php endif; ?>for="search_lookfor<?php echo $this->_tpl_vars['groupIndex']; ?>
_<?php echo $this->_tpl_vars['rowIndex']; ?>
"><?php echo translate(array('text' => 'adv_search_label'), $this);?>
:</label>&nbsp;
                </div>
                <div class="terms">
                  <input id="search_lookfor<?php echo $this->_tpl_vars['groupIndex']; ?>
_<?php echo $this->_tpl_vars['rowIndex']; ?>
" type="text" value="<?php if ($this->_tpl_vars['currRow']): ?><?php echo ((is_array($_tmp=$this->_tpl_vars['currRow']['lookfor'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
<?php endif; ?>" size="50" name="lookfor<?php echo $this->_tpl_vars['groupIndex']; ?>
[]"/>
                </div>
                <div class="field">
                  <label for="search_type<?php echo $this->_tpl_vars['groupIndex']; ?>
_<?php echo $this->_tpl_vars['rowIndex']; ?>
"><?php echo translate(array('text' => 'in'), $this);?>
</label>
                  <select id="search_type<?php echo $this->_tpl_vars['groupIndex']; ?>
_<?php echo $this->_tpl_vars['rowIndex']; ?>
" name="type<?php echo $this->_tpl_vars['groupIndex']; ?>
[]">
                  <?php $_from = $this->_tpl_vars['advSearchTypes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['searchVal'] => $this->_tpl_vars['searchDesc']):
?>
                    <option value="<?php echo $this->_tpl_vars['searchVal']; ?>
"<?php if ($this->_tpl_vars['currRow'] && $this->_tpl_vars['currRow']['field'] == $this->_tpl_vars['searchVal']): ?> selected="selected"<?php endif; ?>><?php echo translate(array('text' => $this->_tpl_vars['searchDesc']), $this);?>
</option>
                  <?php endforeach; endif; unset($_from); ?>
                  </select>
                </div>
                <span class="clearer"></span>
              </div>
            <?php endfor; endif; ?>
            </div>
          </div>
        <?php endfor; endif; ?>
        </noscript>
      </div>
  
      <a id="addGroupLink" href="#" class="add offscreen" onclick="addGroup(); return false;"><?php echo translate(array('text' => 'add_search_group'), $this);?>
</a>
  
      <br/><br/>
  
      <input type="submit" name="submit" value="<?php echo translate(array('text' => 'Find'), $this);?>
"/>
      <?php if ($this->_tpl_vars['facetList']): ?>
        <h3><?php echo translate(array('text' => 'Limit To'), $this);?>
</h3>
        <?php $_from = $this->_tpl_vars['facetList']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['label'] => $this->_tpl_vars['list']):
?>
        <div class="<?php if ($this->_tpl_vars['label'] == 'Call Number'): ?>span-7<?php else: ?>span-4<?php endif; ?>">
          <label class="displayBlock" for="limit_<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['label'])) ? $this->_run_mod_handler('replace', true, $_tmp, ' ', '') : smarty_modifier_replace($_tmp, ' ', '')))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
"><?php echo translate(array('text' => $this->_tpl_vars['label']), $this);?>
:</label>
          <select id="limit_<?php echo ((is_array($_tmp=((is_array($_tmp=$this->_tpl_vars['label'])) ? $this->_run_mod_handler('replace', true, $_tmp, ' ', '') : smarty_modifier_replace($_tmp, ' ', '')))) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" name="filter[]" multiple="multiple" size="10">
            <?php $_from = $this->_tpl_vars['list']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['display'] => $this->_tpl_vars['value']):
?>
              <option value="<?php echo ((is_array($_tmp=$this->_tpl_vars['value']['filter'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
"<?php if ($this->_tpl_vars['value']['selected']): ?> selected="selected"<?php endif; ?>><?php echo ((is_array($_tmp=$this->_tpl_vars['display'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
</option>
            <?php endforeach; endif; unset($_from); ?>
          </select>
        </div>
        <?php endforeach; endif; unset($_from); ?>
        <div class="clear"></div>
      <?php endif; ?>
      <?php if ($this->_tpl_vars['illustratedLimit']): ?>
        <fieldset class="span-4">
          <legend><?php echo translate(array('text' => 'Illustrated'), $this);?>
:</legend>
          <?php $_from = $this->_tpl_vars['illustratedLimit']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['current']):
?>
            <input id="illustrated_<?php echo ((is_array($_tmp=$this->_tpl_vars['current']['value'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" type="radio" name="illustration" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['current']['value'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
"<?php if ($this->_tpl_vars['current']['selected']): ?> checked="checked"<?php endif; ?>/>
            <label for="illustrated_<?php echo ((is_array($_tmp=$this->_tpl_vars['current']['value'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
"><?php echo translate(array('text' => $this->_tpl_vars['current']['text']), $this);?>
</label><br/>
          <?php endforeach; endif; unset($_from); ?>
        </fieldset>
      <?php endif; ?>
      <?php if (count($this->_tpl_vars['limitList']) > 1): ?>
        <fieldset class="span-4">
          <legend><?php echo translate(array('text' => 'Results per page'), $this);?>
</legend>
          <select id="limit" name="limit">
            <?php $_from = $this->_tpl_vars['limitList']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['limitLabel'] => $this->_tpl_vars['limitData']):
?>
                            <?php if ($this->_tpl_vars['lastLimit']): ?>
                <option value="<?php echo ((is_array($_tmp=$this->_tpl_vars['limitData']['desc'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
"<?php if ($this->_tpl_vars['limitData']['desc'] == $this->_tpl_vars['lastLimit']): ?> selected="selected"<?php endif; ?>><?php echo ((is_array($_tmp=$this->_tpl_vars['limitData']['desc'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
</option>
              <?php else: ?>
                <option value="<?php echo ((is_array($_tmp=$this->_tpl_vars['limitData']['desc'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
"<?php if ($this->_tpl_vars['limitData']['selected']): ?> selected="selected"<?php endif; ?>><?php echo ((is_array($_tmp=$this->_tpl_vars['limitData']['desc'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
</option>
              <?php endif; ?>
            <?php endforeach; endif; unset($_from); ?>
          </select>
        </fieldset>
      <?php endif; ?>
      <?php if ($this->_tpl_vars['lastSort']): ?><input type="hidden" name="sort" value="<?php echo ((is_array($_tmp=$this->_tpl_vars['lastSort'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
" /><?php endif; ?>
      <?php if ($this->_tpl_vars['dateRangeLimit']): ?>
                <?php echo smarty_function_js(array('filename' => "pubdate_slider.js"), $this);?>

        <input type="hidden" name="daterange[]" value="publishDate"/>
        <fieldset class="publishDateLimit span-5" id="publishDate">
          <legend><?php echo translate(array('text' => 'adv_search_year'), $this);?>
</legend>
          <label for="publishDatefrom"><?php echo translate(array('text' => 'date_from'), $this);?>
:</label>
          <input type="text" size="4" maxlength="4" class="yearbox" name="publishDatefrom" id="publishDatefrom" value="<?php if ($this->_tpl_vars['dateRangeLimit']['0']): ?><?php echo ((is_array($_tmp=$this->_tpl_vars['dateRangeLimit']['0'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
<?php endif; ?>" />
          <label for="publishDateto"><?php echo translate(array('text' => 'date_to'), $this);?>
:</label>
          <input type="text" size="4" maxlength="4" class="yearbox" name="publishDateto" id="publishDateto" value="<?php if ($this->_tpl_vars['dateRangeLimit']['1']): ?><?php echo ((is_array($_tmp=$this->_tpl_vars['dateRangeLimit']['1'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
<?php endif; ?>" />
          <div id="publishDateSlider" class="dateSlider"></div>
        </fieldset>
      <?php endif; ?>
       </div>
  
  <div class="span-5 <?php if ($this->_tpl_vars['sidebarOnLeft']): ?>pull-18 sidebarOnLeft<?php else: ?>last<?php endif; ?>">
    <?php if ($this->_tpl_vars['searchFilters']): ?>
      <div class="filterList">
        <h3><?php echo translate(array('text' => 'adv_search_filters'), $this);?>
<br/><span>(<?php echo translate(array('text' => 'adv_search_select_all'), $this);?>
 <input type="checkbox" checked="checked" onclick="filterAll(this, 'advSearchForm');" />)</span></h3>
        <?php $_from = $this->_tpl_vars['searchFilters']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['field'] => $this->_tpl_vars['data']):
?>
        <div>
          <h4><?php echo translate(array('text' => $this->_tpl_vars['field']), $this);?>
</h4>
          <ul>
            <?php $_from = $this->_tpl_vars['data']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['value']):
?>
            <li><input type="checkbox" checked="checked" name="filter[]" value='<?php echo ((is_array($_tmp=$this->_tpl_vars['value']['field'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
:"<?php echo ((is_array($_tmp=$this->_tpl_vars['value']['value'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
"' /> <?php echo ((is_array($_tmp=$this->_tpl_vars['value']['display'])) ? $this->_run_mod_handler('escape', true, $_tmp) : smarty_modifier_escape($_tmp)); ?>
</li>
            <?php endforeach; endif; unset($_from); ?>
          </ul>
        </div>
        <?php endforeach; endif; unset($_from); ?>
      </div>
    <?php endif; ?>
    <div class="sidegroup">
      <h4><?php echo translate(array('text' => 'Search Tips'), $this);?>
</h4>
      <a href="<?php echo $this->_tpl_vars['url']; ?>
/Help/Home?topic=searchadv" class="advsearchHelp"><?php echo translate(array('text' => 'Help with Advanced Search'), $this);?>
</a><br />
      <a href="<?php echo $this->_tpl_vars['url']; ?>
/Help/Home?topic=search" class="searchHelp"><?php echo translate(array('text' => 'Help with Search Operators'), $this);?>
</a>
    </div>
  </div>

  <div class="clear"></div>
</form>

<script type="text/javascript">
//<![CDATA[
    var searchFields = new Array();
    <?php $_from = $this->_tpl_vars['advSearchTypes']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['searchVal'] => $this->_tpl_vars['searchDesc']):
?>
    searchFields["<?php echo $this->_tpl_vars['searchVal']; ?>
"] = "<?php echo translate(array('text' => $this->_tpl_vars['searchDesc']), $this);?>
";
    <?php endforeach; endif; unset($_from); ?>
    var searchJoins = new Array();
    searchJoins["AND"]  = "<?php echo translate(array('text' => 'search_AND'), $this);?>
";
    searchJoins["OR"]   = "<?php echo translate(array('text' => 'search_OR'), $this);?>
";
    searchJoins["NOT"]  = "<?php echo translate(array('text' => 'search_NOT'), $this);?>
";
    var addSearchString = "<?php echo translate(array('text' => 'add_search'), $this);?>
";
    var searchLabel     = "<?php echo translate(array('text' => 'adv_search_label'), $this);?>
";
    var searchFieldLabel = "<?php echo translate(array('text' => 'in'), $this);?>
";
    var deleteSearchGroupString = "<?php echo translate(array('text' => 'del_search'), $this);?>
";
    var searchMatch     = "<?php echo translate(array('text' => 'search_match'), $this);?>
";
    var searchFormId    = 'advSearchForm';
//]]>
</script>
<?php echo smarty_function_js(array('filename' => "advanced_search.js"), $this);?>

<script type="text/javascript">
//<![CDATA[
  <?php if ($this->_tpl_vars['searchDetails']): ?>
    <?php $_from = $this->_tpl_vars['searchDetails']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }if (count($_from)):
    foreach ($_from as $this->_tpl_vars['searchGroup']):
?>
      <?php $_from = $this->_tpl_vars['searchGroup']['group']; if (!is_array($_from) && !is_object($_from)) { settype($_from, 'array'); }$this->_foreach['groupLoop'] = array('total' => count($_from), 'iteration' => 0);
if ($this->_foreach['groupLoop']['total'] > 0):
    foreach ($_from as $this->_tpl_vars['search']):
        $this->_foreach['groupLoop']['iteration']++;
?>
        <?php if ($this->_foreach['groupLoop']['iteration'] == 1): ?>
    var new_group = addGroup('<?php echo ((is_array($_tmp=$this->_tpl_vars['search']['lookfor'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
', '<?php echo ((is_array($_tmp=$this->_tpl_vars['search']['field'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
', '<?php echo $this->_tpl_vars['search']['bool']; ?>
');
        <?php else: ?>
    addSearch(new_group, '<?php echo ((is_array($_tmp=$this->_tpl_vars['search']['lookfor'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
', '<?php echo ((is_array($_tmp=$this->_tpl_vars['search']['field'])) ? $this->_run_mod_handler('escape', true, $_tmp, 'javascript') : smarty_modifier_escape($_tmp, 'javascript')); ?>
');
        <?php endif; ?>
      <?php endforeach; endif; unset($_from); ?>
    <?php endforeach; endif; unset($_from); ?>
  <?php else: ?>
    var new_group = addGroup();
    addSearch(new_group);
    addSearch(new_group);
  <?php endif; ?>
  // show the add group link
  $("#addGroupLink").removeClass("offscreen");
//]]>
</script>