{include file="$gentemplates/$header_tpl"}
  <table width="100%" border="0" cellpadding="0" cellspacing="0">
  <!-- begin edit table -->
  <tr valign="middle"><td class="text"><div class="header header_cont">{$form.header}</div></td></tr>
  {*if $form.err}
  <tr valign="middle"><td height="30px"><font class="error_msg">*&nbsp;{$form.err}</font></td></tr>
  {/if*}
  <tr valign="middle"><td class="text" style="padding-top:10px">
  <form method="post" action="{$form.action}"  enctype="multipart/form-data" id="profile" name="profile">
  {$form.hiddens}
  <input type="hidden" id="pair" name="pair" value="{$pair}">
  <table border="0" cellpadding="0" cellspacing="0" width="100%">
  <tr>
    <td>
    {if $form.num eq 1}

      <!-- begin my personal info -->
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="30px" width="160" class="text_head">{$lang.users.nick} <font class="error_msg">*</font>:</td>
        <td height="30px"><input type="text" name="login" value="{$data.login}"  {if $data.root eq 1}disabled{/if}  style="width: 150px" onblur="javascript: CheckValue(this);"></td>
      </tr>

      <tr><td height="1px" colspan="3"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>

      <tr>
        <td height="30px" width="160" class="text_head" id="td1" {if $pair eq 1} style="background-color:#f2f2f2; padding-{$default_left}:10px;" {/if}>{$lang.users.fname}:</td>
        <td height="30px" id="td9" {if $pair eq 1} style="background-color:#f2f2f2;" {/if}><input type="text" name="fname" value="{$data.fname}" {if $data.root eq 1}disabled{/if}  style="width: 150px" onblur="javascript: CheckValue(this);"></td>

        <td>
        	<div id="pair1" {if $pair eq 0} style="display:none;"{/if}>
        	<table width="100%" border="0" cellpadding="0" cellspacing="0">
        		<tr>
        			<td height="30px" width="160" class="text_head" style="background-color:#f2f2f2; padding-{$default_left}:10px;border-{$default_left}:3px solid #ffffff;">{$lang.users.fname}:</td>
        			<td height="30px" style="background-color:#f2f2f2;"><input type="text" name="fname_2" value="{$data.fname_2}" {if $data.root eq 1}disabled{/if}  style="width: 150px" onblur="javascript: CheckValue(this);"></td>
        		</tr>
        	</table>
        	</div>
        </td>

      </tr>
      <tr>
        <td height="30px" width="160" class="text_head" id="td2" {if $pair eq 1} style="background-color:#f2f2f2; padding-{$default_left}:10px;" {/if}>{$lang.users.sname}:</td>
        <td height="30px" id="td10" {if $pair eq 1} style="background-color:#f2f2f2;" {/if}><input type="text" name="sname" value="{$data.sname}" {if $data.root eq 1}disabled{/if}  style="width: 150px" onblur="javascript: CheckValue(this);"></td>

        <td>
        	<div id="pair2" {if $pair eq 0} style="display:none;" {/if}>
        	<table width="100%" cellpadding="0" cellspacing="0">
        		<tr>
        			<td height="30px" width="160" class="text_head" style="background-color:#f2f2f2; padding-{$default_left}:10px;border-{$default_left}:3px solid #ffffff;">{$lang.users.sname}:</td>
        			<td height="30px" style="background-color:#f2f2f2;"><input type="text" name="sname_2" value="{$data.sname_2}" {if $data.root eq 1}disabled{/if}  style="width: 150px" onblur="javascript: CheckValue(this);"></td>
        		</tr>
        	</table>
        	</div>
        </td>

      </tr>

      <tr><td height="1px" colspan="3"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>

      <tr>
        <td height="30px" width="160" class="text_head">{$lang.users.email} <font class="error_msg">*</font>:</td>
        <td height="30px"><input type="text" name="email" value="{$data.email}" {if $data.root eq 1}disabled{/if}  style="width: 150px" onblur="javascript: CheckValue(this);"></td>
      </tr>
      <tr><td height="1px" colspan="3"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>
      {if $voipcall_feature}
      <tr>
        <td height="30" width="160" class="text_head">{$lang.users.phone} :</td>
        <td height="30"><input type="text" name="phone" value="{$data.phone}" {if $data.root eq 1}disabled{/if}  style="width: 150px" onblur="javascript: CheckValue(this);"></td>
      </tr>
      <tr><td colspan="2">{$lang.users.phone_notice}</td></tr>
      <tr><td height="1px" colspan="3"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>
      {/if}

      <tr>
        <td height="30px" width="160" class="text_head" id="td3" {if $pair eq 1} style="background-color:#f2f2f2; padding-{$default_left}:10px;" {/if}>{$lang.users.date_birthday}:</td>
        <td height="30px" id="td11" {if $pair eq 1} style="background-color:#f2f2f2;" {/if}>
          <select name="b_{$date_part1_name}" {if $data.root eq 1}disabled{/if}>
          {foreach item=item from=$date_part1}<option value="{$item.value}" {if $item.sel}selected="selected"{/if}>{$item.value}</option>{/foreach}
          </select>
          <select name="b_{$date_part2_name}" {if $data.root eq 1}disabled{/if}>
          {foreach item=item from=$date_part2}<option value="{$item.value}" {if $item.sel}selected="selected"{/if}>{$item.value}</option>{/foreach}
          </select>
          <select name="b_{$date_part3_name}" {if $data.root eq 1}disabled{/if}>
          {foreach item=item from=$date_part3}<option value="{$item.value}" {if $item.sel}selected="selected"{/if}>{$item.value}</option>{/foreach}
          </select>
        </td>

        <td>
        	<div id="pair3" {if $pair eq 0} style="display:none;"{/if}>
        	<table border="0" width="100%" cellpadding="0" cellspacing="0">
        		<tr>
        			<td height="30px" width="160" class="text_head" style="background-color:#f2f2f2; padding-{$default_left}:10px;border-{$default_left}:3px solid #ffffff;">{$lang.users.date_birthday}:</td>
        			<td height="30px" style="background-color:#f2f2f2;">
          				<select name="b_{$date_part1_name}_2" {if $data.root eq 1}disabled{/if}>
          				{foreach item=item from=$date_part1_2}<option value="{$item.value}" {if $item.sel}selected="selected"{/if}>{$item.value}</option>{/foreach}
          				</select>
          				<select name="b_{$date_part2_name}_2" {if $data.root eq 1}disabled{/if}>
          				{foreach item=item from=$date_part2_2}<option value="{$item.value}" {if $item.sel}selected="selected"{/if}>{$item.value}</option>{/foreach}
          				</select>
          				<select name="b_{$date_part3_name}_2" {if $data.root eq 1}disabled{/if}>
          				{foreach item=item from=$date_part3_2}<option value="{$item.value}" {if $item.sel}selected="selected"{/if}>{$item.value}</option>{/foreach}
          				</select>
        			</td>
        		</tr>
        	</table>
        	</div>
        </td>

      </tr>

      <tr><td height="1px" colspan="3"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>

      <tr>
        <td height="30" width="160" class="text_head">{$lang.profile.im}:</td>
        <td height="30" colspan="2">
          <table cellpadding="0" cellspacing="0">
          <tr>
                        {foreach item=item from=$user_types name=user_type}
                        <td><input type="radio" name="id_user_type" value="{$item.id}" {if $id_user_type && $item.id eq $id_user_type}checked{/if} id="user_type_{$item.id}" onchange="SelectUserTypes('rpt',this.value, document.getElementById('user_subtype_div'));" onclick="Change('{$item.pair}')"></td>
                        <td style="padding-{$default_right}: 5px;" class="text"><label for="user_type_{$item.id}">&nbsp;{$item.name}</label></td>
                        {/foreach}
          </tr>
                    <tr>
                        <td style="padding-{$default_right}: 5px; padding-top: 10px;" colspan="{$smarty.foreach.user_type.total*2}">
                        <div id="user_subtype_div" style="position: relative; top: 0px">
                            {if $user_types_val}
                            <select name="id_user_subtype" style="width:150px">
                                <option value="0">{$lang.button.select}</option>
                                    {foreach item=item from=$user_types_val}<option value="{$item.id}" {if $item.sel eq 1}selected="selected"{/if}>{$item.name}</option>{/foreach}
                            </select>
                                {/if}
                        </div>
                        </td>
                        </tr>
                    </table>
        </td>
      </tr>
      {strip}
      <tr><td height="1" colspan="3"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>
      <tr>
        <td height="30" width="160" class="text_head" rowspan="2">{$lang.profile.looking_for}:</td>
        <td height="30" class="text" colspan="2">
          {$lang.users.from_to}&nbsp;&nbsp;
          <select name="age_min" {if $data.root eq 1}disabled{/if}>
            {foreach item=item from=$age_min}<option value="{$item}" {if $min_age_sel eq $item}selected="selected"{/if}>{$item}</option>{/foreach}
          </select>&nbsp;-&nbsp;
          <select name="age_max" {if $data.root eq 1}disabled{/if}>
            {foreach item=item from=$age_max}<option value="{$item}" {if $max_age_sel eq $item}selected="selected"{/if}>{$item}</option>{/foreach}
          </select>&nbsp;
        </td>
      </tr>
            <tr>
                <td height="30" class="text" colspan="3">
                    <table cellspacing="0" cellpadding="0" border="0">
                        <tr>
                            <td>
                            <table  cellspacing="0" cellpadding="0" border="0">
                                <tr>
                                    {foreach name=user_type item=item from=$user_types}
                                    <td style="padding-top: 5px;"><input type="radio" name="id_looking_user_type" value="{$item.id}" {if $id_looking_user_type && $id_looking_user_type eq $item.id } checked {/if} id="looking_user_type_{$item.id}" onchange="SelectUserTypes('rptc',this.value, document.getElementById('looking_user_subtype_div'));" onclick="this.blur()"></td>
                                    <td style="padding-{$default_right}: 5px; padding-top: 10px;" class="text"><label for="looking_user_type_{$item.id}">&nbsp;{$item.name}</label></td>
                                    {/foreach}
                                </tr>
                            </table>
                            </td>
                        </tr>
                        <tr>
                            <td style="padding-top: 5px;" colspan="{$smarty.foreach.user_type.total*2}">
                                <div id="looking_user_subtype_div" style="position: relative; top: 0px; padding-bottom: 10px">
                                 {if $looking_user_types_val}
                                    <table cellspacing="0" cellpadding="0" border="0"><tr>
                                    {foreach item=item from=$looking_user_types_val}
                                        <td><input type="checkbox" name = "id_looking_user_subtypes[{$item.id}]" id = "id_looking_user_subtypes[{$item.id}]" value="{$item.id}" {if $item.sel eq 1}checked{/if}></td><td><label for= "id_looking_user_subtypes[{$item.id}]" >{$item.name}</label></td>
                                    {/foreach}
                                    </tr></table>
                                 {/if}
                                </div>
                            </td>
                        </tr>
                    </table>
                </td>

            </tr>
      {/strip}
      <tr>
        <td height="30px" width="160" class="text_head">{$lang.users.for}:</td>
        <td height="30px" class="text" colspan="2">
          <select name="relation[]" {if $data.root eq 1}disabled{/if} multiple style="width: 150px; height: 80px">
            <option value="0" {if $relation.sel_all}selected="selected"{/if}>{$lang.button.all}</option>
            {html_options values=$relation.opt_value selected=$relation.opt_sel output=$relation.opt_name}
          </select>
        </td>
      </tr>

      <tr><td height="1px" colspan="3"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>

      <tr>
        <td height="30px" width="160" class="text_head" id="td4" {if $pair eq 1} style="background-color:#f2f2f2; padding-{$default_left}:10px;" {/if}>{$lang.users.country}:</td>
        <td height="30px" id="td12" {if $pair eq 1} style="background-color:#f2f2f2;" {/if}>
          <select name="id_country" {if $data.root eq 1}disabled{/if} style="width: 150px" onchange="SelectRegion('mp', this.value, document.getElementById('region_div'), document.getElementById('city_div'));">
            <option value="0">{$lang.home_page.select_default}</option>
            {foreach item=item from=$country}<option value="{$item.id}" {if $item.sel}selected="selected"{/if}>{$item.value}</option>{/foreach}
          </select>
        </td>

        <td>
        	<div id="pair4" {if $pair eq 0} style="display:none;"{/if}>
        	<table width="100%" cellpadding="0" cellspacing="0">
        		<tr>
        			<td height="30px" width="160" class="text_head" style="background-color:#f2f2f2; padding-{$default_left}:10px;border-{$default_left}:3px solid #ffffff;">{$lang.users.country}:</td>
        			<td height="30px" style="background-color:#f2f2f2;">
          				<select name="id_country_2" {if $data.root eq 1}disabled{/if} style="width: 150px" onchange="SelectRegion('mp', this.value, document.getElementById('region_div_2'), document.getElementById('city_div_2'), '_2');">
            			<option value="0">{$lang.home_page.select_default}</option>
            			{foreach item=item from=$country}<option value="{$item.id}" {if $item.sel_2}selected="selected"{/if}>{$item.value}</option>{/foreach}
          				</select>
        			</td>
      			</tr>
      		</table>
      		</div>
      	</td>

      </tr>
      <tr>
        <td height="30px" width="160" class="text_head" id="td5" {if $pair eq 1} style="background-color:#f2f2f2; padding-{$default_left}:10px;" {/if}>{$lang.users.region}:</td>
        <td height="30px" id="td13" {if $pair eq 1} style="background-color:#f2f2f2;" {/if}>
        <div id="region_div">
        {if isset($region)}
          <select name="id_region" {if $data.root eq 1}disabled{/if}  style="width: 150px" onchange="SelectCity('mp', this.value, document.getElementById('city_div'));">
            <option value="0">{$lang.home_page.select_default}</option>
            {foreach item=item from=$region}<option value="{$item.id}" {if $item.sel}selected="selected"{/if}>{$item.value}</option>{/foreach}
          </select>
        {else}
            &nbsp;
        {/if}
        </div>
        </td>

        <td>
        	<div id="pair5" {if $pair eq 0} style="display:none;"{/if}>
        	<table width="100%" cellpadding="0" cellspacing="0">
        		<tr>
        			<td height="30px" width="160" class="text_head" style="background-color:#f2f2f2; padding-{$default_left}:10px;border-{$default_left}:3px solid #ffffff;">{$lang.users.region}:</td>
        			<td height="30px" style="background-color:#f2f2f2;">
        			<div id="region_div_2">
        			{if isset($region)}
          			<select name="id_region_2" {if $data.root eq 1}disabled{/if}  style="width: 150px" onchange="SelectCity('mp', this.value, document.getElementById('city_div_2'),'_2');">
            			<option value="0">{$lang.home_page.select_default}</option>
            		{foreach item=item from=$region_2}<option value="{$item.id}" {if $item.sel_2}selected="selected"{/if}>{$item.value}</option>{/foreach}
          			</select>
        			{else}
            		&nbsp;
        			{/if}
        			</div>
        			</td>
        		</tr>
        	</table>
        	</div>
        </td>

      </tr>
      <tr>
        <td height="30px" width="160" class="text_head" id="td6" {if $pair eq 1} style="background-color:#f2f2f2; padding-{$default_left}:10px;" {/if}>{$lang.users.city}:</td>
        <td height="30px" id="td14" {if $pair eq 1} style="background-color:#f2f2f2;" {/if}>
        <div id="city_div">
        {if isset($city)}
          <select name="id_city" {if $data.root eq 1}disabled{/if}  style="width: 150px">
            <option value="0">{$lang.home_page.select_default}</option>
            {foreach item=item from=$city}<option value="{$item.id}" {if $item.sel}selected="selected"{/if}>{$item.value}</option>{/foreach}
          </select>
        {else}
            &nbsp;
        {/if}
        </div>
        </td>

        <td>
        	<div id="pair6" {if $pair eq 0} style="display:none;"{/if}>
        	<table width="100%" cellpadding="0" cellspacing="0">
        		<tr>
        			<td height="30px" width="160" class="text_head" style="background-color:#f2f2f2; padding-{$default_left}:10px;border-{$default_left}:3px solid #ffffff;">{$lang.users.city}:</td>
        			<td height="30px" style="background-color:#f2f2f2;">
        			<div id="city_div_2">
        			{if isset($city)}
          				<select name="id_city_2" {if $data.root eq 1}disabled{/if}  style="width: 150px">
            				<option value="0">{$lang.home_page.select_default}</option>
            				{foreach item=item from=$city_2}<option value="{$item.id}" {if $item.sel_2}selected="selected"{/if}>{$item.value}</option>{/foreach}
          				</select>
        			{else}
            		&nbsp;
        			{/if}
        			</div>
        			</td>
        		</tr>
        	</table>
        	</div>
        </td>

      </tr>
      <tr>
        <td height="30px" width="160" class="text_head" id="td7" {if $pair eq 1} style="background-color:#f2f2f2; padding-{$default_left}:10px;" {/if}>{$lang.users.zipcode}:</td>
        <td height="30px" id="td15" {if $pair eq 1} style="background-color:#f2f2f2;" {/if}><input type="text" name="zipcode" value="{$data.zipcode}" size=30 {if $data.root eq 1}disabled{/if}  style="width: 150px"  maxlength="{$form.zip_count}"></td>

        <td>
        	<div id="pair7" {if $pair eq 0} style="display:none;"{/if}>
        	<table width="100%" cellpadding="0" cellspacing="0">
        		<tr>
        			<td height="30px" width="160" class="text_head" style="background-color:#f2f2f2; padding-{$default_left}:10px;border-{$default_left}:3px solid #ffffff;">{$lang.users.zipcode}:</td>
        			<td height="30px" style="background-color:#f2f2f2;"><input type="text" name="zipcode_2" value="{$data.zipcode_2}" size=30 {if $data.root eq 1}disabled{/if}  style="width: 150px"  maxlength="{$form.zip_count}"></td>
        		</tr>
        	</table>
        	</div>
        </td>

      </tr>

      <tr><td height="1px" colspan="3"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>

      <tr>
        <td height="30px" width="160" class="text_head" id="td8" {if $pair eq 1} style="background-color:#f2f2f2; padding-{$default_left}:10px;" {/if}>{$lang.users.nationality}:</td>
        <td height="30px" id="td16" {if $pair eq 1} style="background-color:#f2f2f2;"{/if}>
          <select name="id_nation" {if $data.root eq 1}disabled{/if} style="width: 150px">
            <option value="0">{$lang.home_page.select_default}</option>
            {foreach item=item from=$nation}<option value="{$item.id}" {if $item.sel}selected="selected"{/if}>{$item.value}</option>{/foreach}
          </select>
        </td>
        <td>
        	<div id="pair8" {if $pair eq 0} style="display:none;"{/if}>
        	<table width="100%" cellpadding="0" cellspacing="0">
        		<tr>
        			<td height="30px" width="160" class="text_head" style="background-color:#f2f2f2; padding-{$default_left}:10px;border-{$default_left}:3px solid #ffffff;">{$lang.users.nationality}:</td>
        			<td height="30px" style="background-color:#f2f2f2;">
          			<select name="id_nation_2" {if $data.root eq 1}disabled{/if} style="width: 150px">
            			<option value="0">{$lang.home_page.select_default}</option>
            			{foreach item=item from=$nation}<option value="{$item.id}" {if $item.sel_2}selected="selected"{/if}>{$item.value}</option>{/foreach}
          			</select>

        			</td>
        		</tr>
        	</table>
        	</div>
        </td>
      </tr>

      <tr><td height="1px" colspan="3"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>

      <tr>
        <td height="30px" width="160" class="text_head">{$lang.users.language}:</td>
        <td height="30px" colspan="2">
          <select name="id_lang_1" {if $data.root eq 1}disabled{/if} style="width: 150px">
            <option value="0">{$lang.home_page.select_default}</option>
            {foreach item=item from=$lang_sel}<option value="{$item.id}" {if $item.sel1}selected="selected"{/if}>{$item.value}</option>{/foreach}
          </select>&nbsp;
          <select name="id_lang_2" {if $data.root eq 1}disabled{/if} style="width: 150px">
            <option value="0">{$lang.home_page.select_default}</option>
            {foreach item=item from=$lang_sel}<option value="{$item.id}" {if $item.sel2}selected="selected"{/if}>{$item.value}</option>{/foreach}
          </select>&nbsp;
          <select name="id_lang_3" {if $data.root eq 1}disabled{/if} style="width: 150px">
            <option value="0">{$lang.home_page.select_default}</option>
            {foreach item=item from=$lang_sel}<option value="{$item.id}" {if $item.sel3}selected="selected"{/if}>{$item.value}</option>{/foreach}
          </select>
        </td>
      </tr>

      <tr>
        <td height="30px" width="160" class="text_head">{$lang.users.site_language}:</td>
        <td height="30px" colspan="2">
          <select name="site_lang" style="width: 150px">
            {foreach from=$site_langs item=item}
              <option value="{$item.id}" {if $item.sel==1}selected="selected"{/if}>{$item.name}</option>
            {/foreach}
          </select>
        </td>
      </tr>

      <tr><td height="1px" colspan="3"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>

      <tr>
        <td height="30px" width="160" class="text_head">{$lang.users.headline}:</td>
        <td height="30px" colspan="2">
          <textarea style="width: 150px" name="headline" id="headline" rows="2" cols="29" {if $data.root eq 1}disabled{/if}>{$data.headline}</textarea>
          <span id="err_headline" style="display:none;" class="error_msg">*{$lang.err.headline}</span>
        </td>
      </tr>

      <tr><td height="1px" colspan="3"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>

      <tr>
        <td height="30px" colspan="3" class="text_head"><input type="checkbox" name="use_notification" value="1" {if $data.root eq 1}disabled{/if}> {$lang.users.use_notification}</td>
      </tr>

      <tr><td height="1px" colspan="3"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>

      </table>
      <!-- end my personal info -->
    {elseif $form.num eq 2}
      <!-- begin my description -->
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="30px" width="160" class="text_head" {if $pair eq 1} style="background-color:#f2f2f2; padding-{$default_left}:10px;" {/if}>{$lang.users.weight}:</td>
        <td height="30px" {if $pair eq 1} style="background-color:#f2f2f2;" {/if}>
          <select name="id_weight" {if $data.root eq 1}disabled{/if} style="width: 150px">
            <option value="0">{$lang.home_page.select_default}</option>
            {foreach item=item from=$weight}<option value="{$item.id}" {if $item.sel}selected="selected"{/if}>{$item.value}</option>{/foreach}
          </select>
        </td>
        {if $pair eq 1}
        <td height="30px" width="160" class="text_head" style="background-color:#f2f2f2; padding-{$default_left}:10px;border-{$default_left}:3px solid #ffffff;">{$lang.users.weight}:</td>
        <td height="30px" style="background-color:#f2f2f2;">
          <select name="id_weight_2" {if $data.root eq 1}disabled{/if} style="width: 150px">
            <option value="0">{$lang.home_page.select_default}</option>
            {foreach item=item from=$weight_2}<option value="{$item.id}" {if $item.sel_2}selected="selected"{/if}>{$item.value}</option>{/foreach}
          </select>
        </td>
        {/if}
      </tr>
      <tr>
        <td height="30px" width="160" class="text_head" {if $pair eq 1} style="background-color:#f2f2f2; padding-{$default_left}:10px;" {/if}>{$lang.users.height}:</td>
        <td height="30px" {if $pair eq 1} style="background-color:#f2f2f2;" {/if}>
          <select name="id_height" {if $data.root eq 1}disabled{/if} style="width: 150px">
            <option value="0">{$lang.home_page.select_default}</option>
            {foreach item=item from=$height}<option value="{$item.id}" {if $item.sel}selected="selected"{/if}>{$item.value}</option>{/foreach}
          </select>
        </td>
        {if $pair eq 1}
        <td height="30px" width="160" class="text_head" style="background-color:#f2f2f2; padding-{$default_left}:10px;border-{$default_left}:3px solid #ffffff;">{$lang.users.height}:</td>
        <td height="30px" style="background-color:#f2f2f2;">
          <select name="id_height_2" {if $data.root eq 1}disabled{/if} style="width: 150px">
            <option value="0">{$lang.home_page.select_default}</option>
            {foreach item=item from=$height_2}<option value="{$item.id}" {if $item.sel_2}selected="selected"{/if}>{$item.value}</option>{/foreach}
          </select>
        </td>
        {/if}
      </tr>
      <tr><td height="1px" colspan="4"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>
      {section name=f loop=$info}
      <tr>
        <td height="30px" width="160" class="text_head" {if $pair eq 1} style="background-color:#f2f2f2; padding-{$default_left}:10px;" {/if}>{$info[f].name}:<input type="hidden" name="spr[{$info[f].num}]" value="{$info[f].id}"></td>
        <td height="30px" {if $pair eq 1} style="background-color:#f2f2f2;" {/if}>
        <select id="info{$info[f].num}" name="info[{$info[f].num}][]"  {if $info[f].type eq 2}multiple{/if}  style="width:150px; {if $info[f].type eq 2}height: 80px{/if}" {if $data.root eq 1}disabled{/if}>
          {if $info[f].type eq 1}<option value="">{$lang.button.nothing}</option>{/if}
          {if $info[f].type eq 2}<option value="0" {if $info[f].sel_all}selected="selected"{/if}>{$lang.button.all}</option>{/if}
          {foreach item=item from=$info[f].opt}<option value="{$item.value}" {if $item.sel}selected="selected"{/if}>{$item.name}</option>{/foreach}
        </select>
        </td>
        {if $pair eq 1}
        <td height="30px" width="160" class="text_head" style="background-color:#f2f2f2; padding-{$default_left}:10px;border-{$default_left}:3px solid #ffffff;">{$info_2[f].name}:<input type="hidden" name="spr_2[{$info_2[f].num}]" value="{$info_2[f].id}"></td>
        <td height="30px" style="background-color:#f2f2f2;">
        <select id="info_2{$info_2[f].num}" name="info_2[{$info_2[f].num}][]"  {if $info_2[f].type eq 2}multiple{/if}  style="width:150px; {if $info_2[f].type eq 2}height: 80px{/if}" {if $data.root eq 1}disabled{/if}>
          {if $info_2[f].type eq 1}<option value="">{$lang.button.nothing}</option>{/if}
          {if $info_2[f].type eq 2}<option value="0" {if $info_2[f].sel_all}selected="selected"{/if}>{$lang.button.all}</option>{/if}
          {foreach item=item from=$info_2[f].opt}<option value="{$item.value}" {if $item.sel_2}selected="selected"{/if}>{$item.name}</option>{/foreach}
        </select>
        </td>
        {/if}
      </tr>
      <tr><td height="1px" colspan="4"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>
      {/section}
      </table>
      <!-- end my description -->
    {elseif $form.num eq 3}
      <!-- begin my notice -->
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr valign="top">
        <td height="30px" width="160" class="text">{$lang.subsection.notice_text}</td>
        <td height="30px">
          <textarea cols="100" rows="5" name="annonce" {if $data.root eq 1}disabled{/if} class="hideborder" style="width:400px; height:150px">{$data.annonce}</textarea>
        </td>
      </tr>
      </table>
      <!-- end my notice -->
    {elseif $form.num eq 4}
      <!-- begin my personality -->
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
      {section name=f loop=$personal}
      <tr>
        <td height="30px" width="200" class="text_head" {if $pair eq 1} style="background-color:#f2f2f2; padding-{$default_left}:10px;" {/if}>{$personal[f].name}:<input type="hidden" name="p_spr[{$smarty.section.f.index}]" value="{$personal[f].id}"></td>
        <td height="30px" {if $pair eq 1} style="background-color:#f2f2f2;" {/if}>
        <select name="personal[{$smarty.section.f.index}][]" style="width:150px" {if $data.root eq 1}disabled{/if}>
          <option value="">{$lang.button.nothing}</option>
          {foreach item=item from=$personal[f].opt}<option value="{$item.value}" {if $item.sel}selected="selected"{/if}>{$item.name}</option>{/foreach}
        </select>
        </td>
        {if $pair eq 1}
        <td height="30px" width="200" class="text_head" style="background-color:#f2f2f2; padding-{$default_left}:10px;border-{$default_left}:3px solid #ffffff;">{$personal[f].name}:<input type="hidden" name="p_spr_2[{$smarty.section.f.index}]" value="{$personal[f].id}"></td>
        <td height="30px" style="background-color:#f2f2f2;">
        <select name="personal_2[{$smarty.section.f.index}][]" style="width:150px" {if $data.root eq 1}disabled{/if}>
          <option value="">{$lang.button.nothing}</option>
          {foreach item=item from=$personal[f].opt}<option value="{$item.value}" {if $item.sel_2}selected="selected"{/if}>{$item.name}</option>{/foreach}
        </select>
        </td>
        {/if}
      </tr>
      <tr><td height="1px" colspan="4"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>
      {/section}
      </table>
      <!-- end my personality -->
    {elseif $form.num eq 5}
      <!-- begin my portrait -->
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
      {section name=f loop=$portrait}
      <tr>
        <td height="30px" width="160" class="text_head">{$portrait[f].name}:<input type="hidden" name="port_spr[{$portrait[f].num}]" value="{$portrait[f].id}"></td>
        <td height="30px">
        <select  name="portrait[{$portrait[f].num}][]"  style="width:150px" {if $data.root eq 1} disabled{/if}>
          <option value="">{$lang.button.nothing}</option>
          {foreach item=item from=$portrait[f].opt}<option value="{$item.value}" {if $item.sel}selected="selected"{/if}>{$item.name}</option>{/foreach}
        </select>
        </td>
      </tr>
      <tr><td height="1px" colspan="2"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>
      {/section}
      </table>
      <!-- end my portrait -->
    {elseif $form.num eq 6}
      <!-- begin my interests -->
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
      {section name=f loop=$interests}
      {if $smarty.section.f.index is div by 3}<tr>{/if}
        <td height="30px" width="60" class="text_head">{$interests[f].name}:<input type="hidden" name="int_spr[{$interests[f].num}]" value="{$interests[f].id}"></td>
        <td height="30px">
          <input type="radio" name="interests[{$interests[f].num}]" value="1"{if $interests[f].sel eq 1} checked{/if}>
          <input type="radio" name="interests[{$interests[f].num}]" value="2"{if $interests[f].sel eq 2} checked{/if}>
          <input type="radio" name="interests[{$interests[f].num}]" value="3"{if $interests[f].sel eq 3} checked{/if}>
        </td>
      {if $smarty.section.f.index_next is div by 3 || $smarty.section.f.last}
      </tr>
      <tr><td height="1px" colspan="6"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>
      {/if}
      {/section}
      </table>
      <!-- end my interests -->
    {elseif $form.num eq 7}
      <!-- begin my criteria -->
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
      <tr>
        <td height="30px" width="160" class="text_head">{$lang.users.weight}:</td>
        <td height="30px">
          <select name="id_weight" {if $data.root eq 1}disabled{/if} style="width: 150px">
            <option value="0">{$lang.button.all}</option>
            {foreach item=item from=$weight}<option value="{$item.id}" {if $item.sel}selected="selected"{/if}>{$item.value}</option>{/foreach}
          </select>
        </td>
      </tr>
      <tr>
        <td height="30px" width="160" class="text_head">{$lang.users.height}:</td>
        <td height="30px">
          <select name="id_height" {if $data.root eq 1}disabled{/if} style="width: 150px">
            <option value="0">{$lang.button.all}</option>
            {foreach item=item from=$height}<option value="{$item.id}" {if $item.sel}selected="selected"{/if}>{$item.value}</option>{/foreach}
          </select>
        </td>
      </tr>
      <tr><td height="1px" colspan="2"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>
      <tr>
        <td height="30px" width="160" class="text_head">{$lang.users.country}:</td>
        <td height="30px">
          <select name="id_country[]" {if $data.root eq 1}disabled{/if} style="width: 150px; height: 80px" multiple>
            <option value="0" {if $default.id_country eq 1}selected="selected"{/if}>{$lang.button.all}</option>
            {foreach item=item from=$country_match}<option value="{$item.id}" {if $item.sel}selected="selected"{/if}>{$item.value}</option>{/foreach}
          </select>
        </td>
      </tr>
      <tr><td height="1px" colspan="2"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>
      <tr>
        <td height="30px" width="160" class="text_head">{$lang.users.nationality}:</td>
        <td height="30px">
          <select name="id_nation[]" {if $data.root eq 1}disabled{/if} style="width: 150px; height: 80px" multiple>
            <option value="0" {if $default.id_nation eq 1}selected="selected"{/if}>{$lang.button.all}</option>
            {foreach item=item from=$nation_match}<option value="{$item.id}" {if $item.sel}selected="selected"{/if}>{$item.value}</option>{/foreach}
          </select>
        </td>
      </tr>
      <tr><td height="1px" colspan="2"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>
      <tr>
        <td height="30px" width="160" class="text_head">{$lang.users.language}:</td>
        <td height="30px">
          <select name="id_lang[]" {if $data.root eq 1}disabled{/if} style="width: 150px; height: 80px" multiple>
            <option value="0" {if $default.id_lang eq 1}selected="selected"{/if}>{$lang.button.all}</option>
            {foreach item=item from=$lang_sel_match}<option value="{$item.id}" {if $item.sel}selected="selected"{/if}>{$item.value}</option>{/foreach}
          </select>
        </td>
      </tr>
      <tr><td height="1px" colspan="2"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>
      {section name=f loop=$info}
      <tr>
        <td height="30px" width="160" class="text_head">{$info[f].name}:<input type="hidden" name="spr[{$info[f].num}]" value="{$info[f].id}"></td>
        <td height="30px">
        <select id="info{$info[f].num}" name="info[{$info[f].num}][]"  {if $info[f].type eq 2}multiple{/if}  style="width: 150px; {if $info[f].type eq 2}height: 80px{/if}" {if $data.root eq 1}disabled{/if}>
          <option value="0"{if $info[f].sel_all} selected="selected"{/if}>{$lang.button.all}</option>
          {foreach item=item from=$info[f].opt}<option value="{$item.value}" {if $item.sel}selected="selected"{/if}>{$item.name}</option>{/foreach}
        </select>
        </td>
      </tr>
      <tr><td height="1px" colspan="2"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>
      {/section}
      </table>
      <!-- end my criteria -->
    {elseif $form.num eq 8}
      <!-- begin my interests -->
      <table width="100%" border="0" cellpadding="0" cellspacing="0">
      {section name=f loop=$interests}
      {if $smarty.section.f.index is div by 3}<tr>{/if}
        <td height="30px" width="60" class="text_head">{$interests[f].name}:<input type="hidden" name="int_spr[{$interests[f].num}]" value="{$interests[f].id}"></td>
        <td height="30px">
          <input type="checkbox" name="interests[{$interests[f].num}][1]" value="1"{if $interests[f].sel_1 eq 1} checked{/if}>
          <input type="checkbox" name="interests[{$interests[f].num}][2]" value="2"{if $interests[f].sel_2 eq 1} checked{/if}>
          <input type="checkbox" name="interests[{$interests[f].num}][3]" value="3"{if $interests[f].sel_3 eq 1} checked{/if}>
        </td>
      {if $smarty.section.f.index_next is div by 3 || $smarty.section.f.last}
      </tr>
      <tr><td height="1px" colspan="6"><div style="height: 1px; margin: 10px 0px" class="delimiter"></div></td></tr>
      {/if}
      {/section}
      </table>
      <!-- end my interests -->
    {/if}
    </td>
  </tr>
  </table>
  </form>
  <div style="margin: 0px; height: 43px"><input type="button" class="button" onclick="javascript: document.location.href='{$form.menu}';" value="{$lang.button.back}"> <input type="button" class="button" onclick="{if $form.num eq 1}Save();{else}document.getElementById('profile').submit();{/if}" value="{$lang.button.save}"> </div>
  </td></tr>
  <!-- end edit table -->

  </table>
  {literal}
  <script language="JavaScript" type="text/javascript">
      function CharCountChecker(obj){
        if(obj.value.length>=165)
          return false;
        else
          return true;
      }

      function CheckValue(obj){
        if(obj.name=='login' && (obj.value.length <5 || obj.value.length>20)){
          alert({/literal}"{$lang.err.login_length|escape:javascript}"{literal});
          obj.focus();
          return false;
        }
        if(obj.name=='sname' && obj.value == ""){
          alert({/literal}"{$lang.err.invalid_name|escape:javascript}"{literal});
          obj.focus();
          return false;
        }
        if(obj.name=='fname' && obj.value == ""){
          alert({/literal}"{$lang.err.invalid_name|escape:javascript}"{literal});
          obj.focus();
          return false;
        }
        {/literal}
        {if $voipcall_feature}
        {literal}
        if(obj.name=='phone' && (obj.value != "" && obj.value.search(/^\d{10,15}(x\d{1,5})?$/) == -1)){
          alert({/literal}"{$lang.err.phone_bad|escape:javascript}"{literal}); return false;
        }
        {/literal}
        {/if}
        {literal}
      }

  function showcouple()
      {
         couple=document.forms.profile.elements.couple;
         couple_show=true;
         for (i=0;i<couple.length;i++)
          {
            if ((couple[i].checked)&&(couple[i].value=="0"))
             {
               couple_show=false;
               break;
             }
          }
         if (couple_show)
          {
            document.getElementById('couple_user_form').style.display="block";
          }
         else
          {
            document.getElementById('couple_user_form').style.display="none";
          }
         return false;
  }
  //showcouple();

  function Change(par) {
		if (par == 'N') {
			for (var i=1; i<9; i++) {
				document.getElementById('pair'+i).style.display = 'none';
				document.getElementById('td'+i).style.backgroundColor = '#ffffff';
				document.getElementById('td'+i).style.padding = '0px 0px 0px 0px';
				document.getElementById('td'+(i+8)).style.backgroundColor = '#ffffff';
			}
			document.getElementById('pair').value = '0';
		} else if (par == 'Y') {
			for (var i=1; i<9; i++) {
				document.getElementById('pair'+i).style.display = 'block';
				document.getElementById('td'+i).style.backgroundColor = '#f2f2f2';
				document.getElementById('td'+i).style.padding = '0px 0px 0px 10px';
				document.getElementById('td'+(i+8)).style.backgroundColor = '#f2f2f2';
			}
			document.getElementById('pair').value = '1';
		}
	this.blur();
	}
    
    function Save() {
          var str = document.getElementById('headline').value;
          if (str.length <= 300) {
               document.getElementById('profile').submit();
               document.getElementById('err_headline').style.display = 'none';
          } else {
               document.getElementById('err_headline').style.display = 'block';
          }
     }
  </script>
  {/literal}
{include file="$gentemplates/$footer_tpl"}