{* Smarty *}

{literal}
<script type="text/javascript">
//<![CDATA[
function ReIndex(){
  $.ajax({
    async: false,
    timeout: 3000,
    type: 'GET',
    url: "{/literal}{$MS_SP->Sp_PathTop}{$MS_SP->Sp_PathToSite}/AjaxServer/ReIndexSave.ajax.php{literal}",
    beforeSend: function(){
      $("#MessageLoading").dialog("open");
    },
    complete: function(){
    },
    success: function(responseText){
      $("#MessageLoading").dialog("close");
      if(typeof(responseText['error'])=='undefined'){
        DialogStandartMessageOpen("message", responseText['message']);
      }
      else{
        DialogStandartMessageOpen("error", responseText['error']);
      }
    }
  });
}
//]]>
</script>
{/literal}

<div class="ui-widget-content ui-corner-all">
  <h3 class="ui-widget-header ui-corner-all">&nbsp;Индексирование базы данных</h3>
  <div style="padding: 10px;">
    <button class="AltButtons" onclick="ReIndex();">Индексировать</button>
  </div>
</div>