{if !$elem_html}
    {assign var=elem_html value=$item.elem_html}
{/if}
<div cat="{$item.category}" id="div{if $couple}_couple{/if}_{$item.name_for_lang}" class="div_name_for_lang {if $background}{if $smarty.foreach.elements.iteration is div by 2}registration_even{else}registration_odd{/if}{/if}" name_for_lang="{$item.name_for_lang}" style="min-height: 26px;">
    <table cellpadding="{if $item.position_text == 'inline'}0{else}0{/if}" cellspacing="0" width="100%">
		{assign var=changed_field value=$item.name_for_lang}	
        <tr {if $changed_fields_arr.$changed_field}class="header"{/if}>
            {if $item.position_text == 'inline' || $item.category eq 'text_del'}
				{if $item.category ne 'text_del'}
				<td id="preview_1" class="element">
					{$elem_html}
				</td>
				{/if}

				<td {if $item.category eq 'text_del'}colspan="2"{/if} id="preview_2" mandatory="0" couple='0' enable_couple="0" enable_mandatory="0" class="name_for_lang" valign="top">
					{if $lang.profile[$item.name_for_lang] ne ''}
						{if $item.name_for_lang eq 'page_1_agreed_1'}
							{$lang_page_agreed}
						{else}    
							{$lang.profile[$item.name_for_lang]}
						{/if}
					{else}
						{$item.name_for_lang}
					{/if}
				</td>
            {else}
				<td id="preview_1" {if $item.position_text == 'top' || $item.position_text == 'left'}class="name_for_lang preview_width"  valign="top" {if $item.mandatory == '1'}mandatory="1"{/if}{else}class="element"{/if}>
				{if $item.position_text == 'top' || $item.position_text == 'left'}
					{if $item.category eq 'custom'}
						{if $lang.userspr[$item.name_for_lang] ne ''}
							{$lang.userspr[$item.name_for_lang]}
						{else}
							{$item.name_for_lang}
						{/if}
					{else}			
						{if $item.name_for_lang eq 'id_within'}
							{$lang.search.within}
						{else}
							{if $lang.profile[$item.name_for_lang] ne ''}
								{$lang.profile[$item.name_for_lang]}
							{else}						
								{if $item.name_for_lang eq 'id_within'}
									{$lang.search.within}
								{else}
									{$item.name_for_lang}
								{/if}
							{/if}
						{/if}
					{/if}
				{else}
					{$elem_html}
				{/if}
				</td>
				<td id="preview_2" {if $item.position_text == 'left'}class="element"{elseif $item.position_text == 'right'}class="name_for_lang"  valign="top" {if $item.mandatory == '1'}mandatory="1"{/if}{/if}>
					{if $item.position_text == 'left'}
						{$elem_html}
					{elseif $item.position_text == 'right'}
						{if $item.category eq 'custom'}
							{if $lang.userspr[$item.name_for_lang] ne ''}
								{$lang.userspr[$item.name_for_lang]}
							{else}
								{$item.name_for_lang}
							{/if}
						{else}
							{if $lang.profile[$item.name_for_lang] ne ''}
								{$lang.profile[$item.name_for_lang]}
							{else}
								{$item.name_for_lang}
							{/if}
						{/if}
					{/if}
				</td>
		</tr>
		<tr>
			<td id="preview_3"{if $item.position_text == 'top'}class="element"{elseif $item.position_text == 'bottom'}class="name_for_lang"  valign="top" {if $item.mandatory == '1'}mandatory="1"{/if}{/if} style="{if $item.position_text == 'top' || $item.position_text == 'bottom'}padding-top:10px; padding-bottom:10px;{else}padding-top:0px; padding-bottom:0px;{/if}">
				{if $item.position_text == 'top'}
					{$elem_html}
				{elseif $item.position_text == 'bottom'}
					{if $item.category eq 'custom'}
						{if $lang.userspr[$item.name_for_lang] ne ''}
							{$lang.userspr[$item.name_for_lang]}
						{else}
							{$item.name_for_lang}
						{/if}
					{else}
						{if $lang.profile[$item.name_for_lang] ne ''}
							{$lang.profile[$item.name_for_lang]}
						{else}
							{$item.name_for_lang}
						{/if}
					{/if}
				{/if}
			</td>
			<td style="{if $item.position_text == 'top' || $item.position_text == 'bottom'}padding-top:10px; padding-bottom:10px;{else}padding-top:0px; padding-bottom:0px;{/if}">
			</td>
		</tr>
			{/if}	
    </table>
</div>
