{*if $ajax eq 0}
{include file="$admingentemplates/admin_top.tpl"}
<font class=red_header>{$lang.addition.razdel_name}</font><font class=red_sub_header>&nbsp;|&nbsp;{$lang.faq.cat_list}</font>
<div class="help_text">
    <div class="close_help">
        <img src="{$site_root}{$template_root}/images/close_help.png" alt="">
    </div>
    <div class="help_body">
        <span class="help_title">{$lang.help}:</span>{$lang.admin_help.area_faq_category}
    </div>
</div>
{/if*}
<div id="tooltip" onclick="hideToolTip()" style="text-align:center; background-color: #FFFFFF; border: 1px dotted; text-align: {$default_left}; position:absolute; display:none; padding:5px;"></div>
{literal}
<script type="text/javascript">
$(function() {
$('#tool_tip_4 *').tooltip();
});
</script>
{/literal}
	<table border="0" cellspacing="0" cellpadding="0" width="100%">
		<tr class="table_header">
			<td align="center" width="5%">{$lang.faq.number}</td>
			<td align="left" >{$lang.faq.category}</td>
			<td align="left" width="65%" >{$lang.faq.cat_descr}</td>
			{if $local_config.use_status eq '1'}
			<td align="center" >{$lang.descr_spr.status}</td>
			{/if}
			<td align="right" width="10%" >{$lang.button.action}</td>
			{*<td align="center" width="10%" >&nbsp;</td>*}
		</tr>
		{if $cat_list}
		{section name=c loop=$cat_list}
			<tr {if $smarty.section.c.index mod 2 eq 1}class="table_row even"{else}class="table_row odd"{/if}>
				<td align="center" valign="top" style="padding:4px;">{$smarty.section.c.iteration}</td>
				<td align="left" valign="top" style="padding:4px;"><a href="{$cat_list[c].item_link}" onclick="ShowBlock('show_block','{$cat_list[c].item_link}');return false;">{$cat_list[c].name}</a></td>
				<td align="left"   valign="top" style="padding:4px;">{$cat_list[c].descr}</td>
				{if $local_config.use_status eq '1'}
				<td align="center" valign="top" style="padding:4px;">{if $cat_list[c].status eq '1'}+{else}-{/if}</td>
				{/if}
				<td align="right" valign="top" style="padding:4px;">
{*					<a class="admin_button" onclick="ShowBlock('show_block','{$cat_list[c].edit_link}');return false;">{$lang.button.edit}<span>&nbsp;</span></a>
					<a class="admin_button" onclick="ShowBlock('show_block','{$cat_list[c].del_link}');return false;">{$lang.button.delete}<span>&nbsp;</span></a>*}
					<div class="block_action fr" style="display: none;">
						<div class="action_del" style="display: block;">
							<img width="16" alt="" src="{$site_root}{$template_root}/images/photo_delete.png" onmouseout="javascript:hideToolTip();" onmouseover="javascript: showToolTip(event,'{$lang.button.delete}');return false" onclick="ShowBlock('show_block','{$cat_list[c].del_link}');return false;">
						</div>
					</div>			
					<div style="width:10px;float:right;" class="fl">&nbsp;</div>
					<div class="block_action fr" style="display: none;">
						<div class="action_del" style="display: block;">
							<img width="16" alt="" src="{$site_root}{$template_root}/images/edit.png" onmouseout="javascript:hideToolTip();" onmouseover="javascript: showToolTip(event,'{$lang.button.edit}');return false" onclick="ShowBlock('show_block','{$cat_list[c].edit_link}');return false;">
						</div>
					</div>										
				</td>
			</tr>
		{/section}
		{else}
		<tr height="40">
			<td class="main_error_text" align="left" colspan="{if $local_config.use_status eq '1'}5{else}6{/if}" bgcolor="#FFFFFF">{$lang.faq.empty}</td>
		</tr>
		{/if}
		<tr class="table_header">
			<td colspan="7">
				&nbsp;
			</td>
		</tr>
	</table>
	<table style="margin-top:15px;">
		<tr height=40>
			<td>
				<a href="{$form.add_link}" class="admin_button_major" onclick="ShowBlock('show_block','{$form.add_link}');return false;">{$lang.faq.cat_add}<span>&nbsp;</span></a>
			</td>
		</tr>
	</table>
<script type="text/javascript">
{literal}
		function showToolTip(e,text){
			if(document.all)e = event;
			var obj = document.getElementById('tooltip');
			obj.innerHTML = text;
			obj.style.display = 'block';
			var st = Math.max(document.body.scrollTop,document.documentElement.scrollTop);
			if(navigator.userAgent.toLowerCase().indexOf('safari')>=0)st=0;
			var leftPos = e.clientX - $('#tooltip').width()-10;
			if(leftPos<0)leftPos = 0;
			obj.style.left = leftPos + 'px';
			obj.style.top = e.clientY - obj.offsetHeight -10 + st + 'px';
		}
		function hideToolTip(){
			document.getElementById('tooltip').style.display = 'none';
		}
{/literal}		
</script>
<script type="text/javascript">
	tab_link = 'admin_advice.php?par=faq&ajax=1';
</script>
{*if $ajax eq 0}
{include file="$admingentemplates/admin_bottom.tpl"}
{/if*}
