{if $ajax eq 0}
	{include file="$admingentemplates/admin_top.tpl"}
	<div class="back">
		<a href="{$site_url}{$site_root}/admin/admin_modules.php">{$lang.button.back}</a>
	</div>
	<div class="cr"></div>
	<div class="show_help" style="display: none;">&nbsp;</div>
	<font class=red_header>{$lang.admin_menu.av_module}</font>
	<div class="cr">&nbsp;</div>
	<div class="cr">&nbsp;</div>
	<div style="display:block;" 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.av_module}
		</div>
	</div>
	<div class="cr">&nbsp;</div>
	<div style="display:table;width:100%;">
		<ul class="tabs">
			<li>
				<a {if $par eq '0'}class="current"{else}href="{$file_name}"{/if}>{$lang.admin_menu.settings}</a>
			</li>
			<li>
				<a {if $par eq 1}class="current"{else}href="{$site_url}{$site_root}/topcmm_123flashchat/admin/basicsetting.php"{/if}>{$lang.settings.123flashchat}</a>
			</li>
			<li>
				<a {if $par eq 2}class="current"{else}href="{$site_url}{$site_root}/admin/admin_chat7.php"{/if}>{$lang.settings.flashcoms}</a>
			</li>
			{*<li>
				<a {if $par eq 3}class="current"{else}href="{$site_url}{$site_root}/admin/admin_toksta.php?app=chat"{/if}>{$lang.settings.toksta}</a>
			</li>*}
			<li>
				<a {if $par eq 4}class="current"{else}href="{$site_url}{$site_root}/admin/webmessenger/connlist.php"{/if}>{$lang.settings.userplane}</a>
			</li>
			<li>
				<a {if $par eq 5}class="current"{else}href="{$site_url}{$site_root}/admin/admin_av_module.php?sel=cometchat"{/if}>Cometchat</a>
			</li>
			<!--{$site_url}{$site_root}/admin/{$file_name}?par=4-->
		</ul>
		<div class="user_operation_line" style="height:4px;font-size:0px;">&nbsp;</div>
	</div>	
	{if $par != '4'}
	<div align="left">
	<form id="av_module" name="av_module" action="{$file_name}" method="post">
		<input type="hidden" name="sel" value="save">
		<input type="hidden" name="par" value="{$par}">
		
		<table cellpadding="0" cellspacing="0" border="0" width="100%">
			<tr class="table_header">
				<td width="40%" class="main_header_text">&nbsp;</td>
				<td width="20%" class="main_header_text" align="center">{$lang.av_module.chat}</td>
				<td width="20%" class="main_header_text" align="center">{$lang.av_module.messenger}</td>
				<td width="20%" class="main_header_text" align="center">{$lang.av_module.recorder}</td>
			</tr>
			<tr class="odd">
				<td align="left" nowrap class="main_content_text" width="350">{$lang.settings.123flashchat} :&nbsp;</td>
				<td class="main_content_text" align="center"><input type="radio" name="chat" value="1" {if $data.use_pilot_module_123flashchat}checked{/if}></td>
				<td class="main_content_text" align="center"></td>
				<td class="main_content_text" align="center"></td>
			</tr>
			<tr class="even">
				<td align="left" nowrap class="main_content_text" width="350">{$lang.settings.flashcoms} :&nbsp;</td>
				<td class="main_content_text" align="center"><input type="radio" name="chat" value="2" {if $data.use_pilot_module_flashcomschat}checked{/if}></td>
				<td class="main_content_text" align="center"><input type="radio" name="im" value="2" {if $data.use_pilot_module_flashcomsmessenger}checked{/if}></td>
				<td class="main_content_text" align="center"></td>
			</tr>
			{*<tr class="odd">
				<td align="left" nowrap class="main_content_text" width="350">{$lang.settings.toksta} :&nbsp;</td>
				<td class="main_content_text" align="center"><input type="radio" name="chat" value="3" {if $data.use_pilot_module_toksta_chat}checked{/if}></td>
				<td class="main_content_text" align="center"><input type="radio" name="im" value="3" {if $data.use_pilot_module_toksta_im}checked{/if}></td>
				<td class="main_content_text" align="center"></td>
			</tr>*}
			<tr class="odd">
				<td align="left" nowrap class="main_content_text" width="350">{$lang.settings.userplane} :&nbsp;</td>
				<td class="main_content_text" align="center"><input type="radio" name="chat" value="4" {if $data.use_pilot_module_webchat}checked{/if}></td>
				<td class="main_content_text" align="center"><input type="radio" name="im" value="4" {if $data.use_pilot_module_webmessenger}checked{/if}></td>
				<td class="main_content_text" align="center"><input type="checkbox" name="recorder" value="4" {if $data.use_pilot_module_webrecorder}checked{/if}></td>
			</tr>
			<tr class="even">
				<td align="left" nowrap class="main_content_text" width="350">{$lang.settings.default} :&nbsp;</td>
				<td class="main_content_text" align="center"><input type="radio" name="chat" value="5" {if $data.use_pilot_module_flashchat}checked{/if}></td>
				<td class="main_content_text" align="center"><input type="radio" name="im" value="5" {if $data.use_pilot_module_im}checked{/if}></td>
				<td class="main_content_text" align="center"></td>
			</tr>
			<tr class="odd">
				<td align="left" nowrap class="main_content_text" width="350">Cometchat :&nbsp;</td>
				<td class="main_content_text" align="center"><input type="radio" name="chat" value="6" {if $data.use_pilot_module_cometchat}checked{/if}></td>
				<td class="main_content_text" align="center"></td>
				<td class="main_content_text" align="center"></td>
			</tr>
		</table>
		</div>
		<div class="cr">&nbsp;</div>
		{if !$notice}
		<table>
			<tr>
				<td align="left" colspan="4">
					<a class="admin_button_major" onclick="javascript: document.av_module.submit();">{$button.save}<span>&nbsp;</span></a>
				</td>
			</tr>
		</table>
		{/if}
	</form>
	{/if}
{/if}		
{if $par eq '4'}
<div class="ajax_load" id="ajax_load" style="overflow:hidden;">
	<div id="user_status_line" class="user_status_line" style="margin-bottom:-1px;">
		<div id="tab_chat" class="user_status_elem{if $subtabs eq 'chat'}_active{/if}" onclick="List('chat')">
		<!-- onclick="location.href='{$site_url}{$site_root}/admin/{$file_name}?par=4&subtabs=chat'" -->
			{if $subtabs eq 'mess' || $subtabs eq 'rec'}<a>{/if}{$lang.av_module.chat} {if $subtabs eq 'mess' || $subtabs eq 'rec'}</a>{/if}
		</div>
		<div id="tab_mess" class="user_status_elem{if $subtabs eq 'mess'}_active{/if}" onclick="List('mess');">
		<!--  onclick="location.href='{$site_url}{$site_root}/admin/{$file_name}?par=4&subtabs=mess'" -->
			{if $subtabs eq 'chat' || $subtabs eq 'rec'}<a>{/if}{$lang.av_module.messenger} {if $subtabs eq 'chat' || $subtabs eq 'rec'}</a>{/if}
		</div>
		<div id="tab_rec" class="user_status_elem{if $subtabs eq 'rec'}_active{/if}" onclick="List('rec');">
		<!--  onclick="location.href='{$site_url}{$site_root}/admin/{$file_name}?par=4&subtabs=rec'"-->
			{if $subtabs eq 'chat' || $subtabs eq 'mess'} <a>{/if}{$lang.av_module.recorder} {if $subtabs eq 'chat' || $subtabs eq 'mess'}</a>{/if}
		</div>
	</div>
	<table width="100%" cellpadding="0" cellspacing="0" id="div_content_value">
		<tr class="table_header"><td></td></tr>
		<tr><td>
		<div style="margin:10px 0;">
		{if $subtabs eq 'chat'}
			<select onchange="location.href=this.options[this.selectedIndex].value">
				<option value="{$site_url}{$site_root}/admin/webchat/roomlist.php">{$chats.upc_rooms}</option>
				<option value="{$site_url}{$site_root}/admin/webchat/connlist.php">{$chats.upc_connections}</option>
				<option value="{$site_url}{$site_root}/admin/webchat/banlist.php">{$chats.upc_bans}</option>
				<option value="{$site_url}{$site_root}/admin/webchat/modlist.php">{$chats.upc_moderators}</option>
				<option value="{$site_url}{$site_root}/admin/webchat/banopts.php">{$chats.upc_ban_options}</option>
				<option value="{$site_url}{$site_root}/admin/webchat/annlist.php">{$chats.upc_announcements}</option>
				<option value="{$site_url}{$site_root}/admin/webchat/settings.php">{$chats.upc_settings}</option>
				<option value="{$site_url}{$site_root}/webchat/wc.php">{$chats.upc_login_to_chat}</option>
				<!-- "window.open('{$site_url}{$site_root}/webchat/wc.php','chat','menubar=0,resizable=1,scrollbars=0,status=0,toolbar=0,width=800,height=600')" -->
			</select>			
			<div></div>
		{/if}
		{if $subtabs eq 'mess'}
			<!--Connections - Quick messages - Settings-->
			<select onchange="List_select(this.options[this.selectedIndex].value);">
				<option value="{$site_url}{$site_root}/admin/webmessenger/connlist.php">{$chats.upc_connections}</option>
				<option value="{$site_url}{$site_root}/admin/webmessenger/qmeslist.php">{$chats.upm_quickmessages}</option>
				<option value="{$site_url}{$site_root}/admin/webmessenger/settings.php">{$chats.upc_settings}</option>
			</select>
		{/if}
		{if $subtabs eq 'rec'}
			<select onchange="List_select(this.options[this.selectedIndex].value);">
				<option value="{$site_url}{$site_root}/admin/webrecorder/recslist.php" {if $val eq 'reclist'}selected{/if}>{$chats.upc_settings}</option>
				<option value="{$site_url}{$site_root}/admin/webrecorder/settings.php" {if $val eq 'settings'}selected{/if}>{$chats.upr_recslist}</option>
			</select>
			{if $val eq 'reclist'}
				
			{/if}
			{if $val eq 'settings'}
			
			{/if}
		{/if}
		</div>
		</td></tr>
		
		<tr class="table_header"><td></td></tr>	 
	</table>
	<div></div>	
</div>
{/if}

{if $ajax eq 0}
	{include file="$admingentemplates/admin_bottom.tpl"}
{/if}

{literal}
<script language="JavaScript" type="text/javascript" >  
if ({/literal}"{$ajax}"{literal} == 0) 
    var tab_id_last = 'chat';
	var site_url = {/literal}"{$site_url}"{literal};
	var site_root = {/literal}"{$site_root}"{literal};
	var path = site_url+site_root+"/admin/admin_av_module.php";
		
function List(subtabs) {
	if ($('#tab_'+subtabs).find('a').text() == '') return;
	
	$('#tab_'+tab_id_last).html("<a>"+$('#tab_'+tab_id_last).text()+"<\/a>");
	$('#tab_'+subtabs).text($('#tab_'+subtabs).text());
	$('#tab_'+tab_id_last).removeClass('user_status_elem_active');
	$('#tab_'+tab_id_last).addClass('user_status_elem');
	$('#tab_'+subtabs).removeClass('user_status_elem');
	$('#tab_'+subtabs).addClass('user_status_elem_active');
	
	tab_id_last = subtabs;
	ajaxLoadingImage(1, 'ajax_load');
	$.post(path, {par:'4',subtabs:subtabs,ajax:'1'}, function(data){
		ajaxLoadingImage(0, 'ajax_load');
		$('#ajax_load').html(data);
	});
}
function List_select(value) {
	ajaxLoadingImage(1, 'div_content_value');
	$.post(value, {ajax:'1'}, function(data){
		ajaxLoadingImage(0, 'div_content_value');
		$('#div_content_value').html(data);
	});
}
</script>
{/literal}