<div class="panel_section">
<div class="panel_content">
	<div><font class="red_sub_header" style="color:#4D4D4D;">
		{$lang.catalog.edit_cat_form}
	</font></div><br>
	<div class="help_text" style="display:block;-moz-border-radius: 10px 10px 10px 10px;">
            <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.edit_form_hint}
            </div>
        </div>
	
<!--AVAILABLE SECTIONS TABLE-->
	<table cellpadding="5" cellspacing="1" width="100%">
		<tr class="table_row">
			<td class="main_content_text" align="left">
				<input type="hidden" name="id_form_1" id="id_form_1" value="{$id_form}">
				<input type="hidden" name="id_section_1" id="id_section_1" value="{$id_section}">
				<span class="main_header_text">{$lang.forms.avail_sections}:</span>&nbsp;
                                <select onchange="LoadSectionAttrs(this.value, {$id_form}, 'form_div', 'section_div', 'sec_dest');">
                                    <option value='-1'>{$lang.button.nothing}</option>
				{section name=s loop=$sections}
                                    <option value='{$sections[s].id}'>{$sections[s].name}</option>
				{/section}
                                </select>
			</td>
		</tr>
	</table>
<!--/AVAILABLE SECTIONS TABLE-->

<!--FORM PANELS-->
	<table cellspacing=0 cellpadding=0 width="100%">
		<tr class="table_row">
			<td class="main_content_text" valign="top" id="reg_td" width="500px">
				<div class="handle" id="form_name">{$lang.forms.cat}:&nbsp;{$form_name}</div>
				<div style="position: relative;{if $total_count==0}height: 25px;{/if}display:none;" id="form_div" class="section">
					{foreach name=s item=item key=key from=$form_attrs}
						<div style="position: relative;" id="{if $item.is_const=='Y'}const{else}item{/if}_{$item.id}" class="lineitem">
							{if $item.is_const=='Y'}<span class="main_error_text">{/if}
								<b>{$item.field_name}:</b>&nbsp;
								{if $item.control_type=='select' && ($item.setup.select_type=='boxes' || $item.setup.select_type=='radio')}<br>{/if}
							{if $item.is_const=='Y'}</span>{/if}
							{if $item.control_type=='place'}
								{$lang.forms.place_text}
							{elseif $item.control_type=='file'}
								{$item.html.code}
								{if isset($item.html.href)}
									<br><a href="{$item.html.href}">{$lang.common.view_file}</a>
									&nbsp;<input type="checkbox" name="delfile_{$item.id}" value="1">&nbsp;{$lang.common.del_file}
								{/if}
							{else}
								{$item.html}
							{/if}
						</div>
					{/foreach}
				</div>
			</td>
			<td class="main_content_text" valign="top" id="sec_td">
				<div id="sec_dest">
				</div>
			</td>
		</tr>
	</table>
<!--FORM PANELS-->

<div style="padding:2px" align="right">
	{*<input type="button" value="{$lang.button.close}" class="button" onclick="javascript: ClearWindow('dest_div');">&nbsp;*}
	<a class="admin_button_cancel" onclick="javascript: window.location.reload();">{$lang.button.close}<span>&nbsp;</span></a>
</div>
<script language="javascript" type="text/javascript">
{literal}

{/literal}

var id_form={$id_form};
var id_section={$id_section};
var attr;

//LoadSectionAttrs(id_section, {$id_form}, 'form_div', 'section_div', 'sec_dest');
</script>
</div></div>