{include file="$gentemplates/$header_tpl" show_news=1 }
	<table border="0" cellpadding="0" cellspacing="0" width="100%">
	<tr>
		{if ($org_home[3] == 'true' || $org_home[4] == 'true' || $org_home[5] == 'true' || $org_home[6] == 'true')  || !($use_pilot_module_organizer eq 1 && $hide eq 1)}
		<td width="70%" valign="top">
			{if $changed_fields_str}
			<div>
				<font class="error_msg" style="font-weight: bold;">
					*&nbsp;{$lang.sharing_tools.fbc_proile_bad_notice1}:<br>
					{$changed_fields_str}<br>
					{$lang.sharing_tools.fbc_proile_bad_notice2}
				</font>
			</div>
			<div class="sep"></div>
			{/if}
			<table cellpadding="0" cellspacing="0" width="100%" border="0">
			{if $org_home[3] == 'true' || !($use_pilot_module_organizer eq 1 && $hide eq 1) }
			<tr>
				<td class="text" style="padding-bottom: 12px;"><div align="justify">{$lang.homepage.toptext}</div></td>
			</tr>
			{if $form.err}
			<tr>
				<td style="padding-{$default_left}:15px;">
					{*<div>
						<font class="error_msg">*&nbsp;{$form.err}</font><br>&nbsp;
					</div>
                                        *}
					{if $confirm_err}
					<div>
						{$lang.homepage.confirm_link}: <input type="text" name="email" id="email" size="45" value="">
													&nbsp;<input style="margin-bottom:3px;" type="button" class="button" value="{$lang.button.send}" onclick="SendConfirm();">
													&nbsp;<font class="error_msg" id="err_confirm"></font>
													<br>&nbsp;
					</div>
					{/if}
				</td>
			</tr>
			{/if}
			<!-- main section -->{strip}
			<tr>
				<td valign="top">
					<div class="content">
						<div style="background-color: #{$css_color.hp_head_block};">
							<div class="header" style="padding-top:7px; padding-{$default_right}:10px; padding-bottom:7px; padding-{$default_left}:15px;">{$lang.section.profile}</div>
						</div>
						<div class="filled">
						<table cellpadding="0" cellspacing="0" border="0">
							<tr>
							  {if $page.icon_path}<td valign="top" style="padding-{$default_right}: 10px;"><a href="{$profile.edit_link}"><img src="{$page.icon_path}" class="icon" alt=""></a></td>{/if}
							  <td valign=top style="padding-{$default_right}: 15px;">
								<table width="100%" cellpadding="0" cellspacing="0" border="0">
								<tr>
								  <td class="text">{$header.member_since}:&nbsp;&nbsp;{$page.date_registration}</td>
								</tr>
								<tr>
								  <td class="text" style="padding-top: 2px;">{$header.last_connection}:&nbsp;&nbsp;{$page.last_login}</td>
								</tr>
								<tr><td><div style="height: 10px; font-size:0px">&nbsp;</div></td></tr>
								<tr>
								  <td class="text">
								    <div style="margin: 0px">
								      <a href="{$profile.edit_link}"><b>{$page.name}</b></a>
								    </div>
								    <div style="height: 20px; font-size:0px">&nbsp;</div>
								    <div class="completion">{$lang.homepage.completion}:&nbsp;<b>{$page.complete}%</b></div>
								    <div style="height: 20px; font-size:0px">&nbsp;</div>
								    <div style="margin-top: 2px">
								      <font class="text">{if $base_lang.city[$page.id_city]}{$base_lang.city[$page.id_city]}, {/if}{if $base_lang.region[$page.id_region]}{$base_lang.region[$page.id_region]}, {/if}{$base_lang.country[$page.id_country]}</font>
								    </div>
								    <div style="margin-top: 2px">
								      <font class="text_head">{$page.age} {$lang.home_page.ans}</font><br>
								    </div>
								    <div style="margin-top: 2px">
								      <font class="text_hidden">{$page.photo_count} {$lang.users.upload_1}</font>
								    </div>
								  </td>
								</tr>
								</table>

								{if $data.webrecorder_player}
								<div class="text"><b><a style="font-size:15px;" href="#" onclick="javascript: window.open('{$data.webrecorder_player}','video_view','menubar=0, resizable=1, scrollbars=0,status=0,toolbar=0, width={$data.webrecorder_width},height={$data.webrecorder_height}');return false;">{$lang.recorder.my_video_profile}</a></b></div>
								{/if}
								<div class="text">{$lang.homepage.top_100_place}:&nbsp;<b><a href="{$site_root}/{$seo.top_users}">{if $form.place}{$form.place}&nbsp;{$lang.homepage.place}{else}{$lang.homepage.you_arent_top_rating}{/if}</a></b>
								</div>
							  </td>
							  <td valign="top" class="border_{$default_left}_color" style="padding-{$default_left}: 15px;">
							  	<table cellpadding="0" cellspacing="0">
							  		<tr>
							  			<td class="hp_links_img"><a href="{$profile.edit_link}"><img src="{$site_root}{$template_root}{$template_images_root}/homepage_edit_my_profile.gif" alt=""></a></td>
							  			<td class="hp_links_anchor"><a href="{$profile.edit_link}">{$lang.button.gr_profile}</a></td>
							  		</tr>
							  		<tr>
							  			<td class="hp_links_img"><a href="{$profile.addf_link}"><img src="{$site_root}{$template_root}{$template_images_root}/homepage_add_photo.gif" alt=""></a></td>
							  			<td class="hp_links_anchor"><a href="{$profile.addf_link}">{$lang.button.gr_photo}...</a></td>
							  		</tr>
							  		{if $menu_path.7}
							  		<tr>
							  			<td class="hp_links_img"><a href="{$site_root}{$menu_path.7}"><img src="{$site_root}{$template_root}{$template_images_root}/homepage_search_perfect.gif" alt=""></a></td>
							  			<td class="hp_links_anchor"><a href="{$site_root}{$menu_path.7}">{$lang.top_menu.perfect_match}</a></td>
							  		</tr>
							  		{/if}
							  		{if ($use_pilot_module_blog)}
							  		<tr>
							  			<td class="hp_links_img"><a href="{$site_root}{$menu_path.19}"><img src="{$site_root}{$template_root}{$template_images_root}/homepage_my_blog.gif" alt=""></a></td>
							  			<td class="hp_links_anchor"><a href="{$site_root}{$menu_path.19}">{$lang.blog.blog_menu_1}</a></td>
							  		</tr>
							  		{/if}
							  		{if $account.lift_up_link}
							  		<tr>
							  			<td class="hp_links_img"><a href="{$account.lift_up_link}"><img src="{$site_root}{$template_root}{$template_images_root}/homepage_lift_up.gif" alt=""></a></td>
							  			<td class="hp_links_anchor"><a href="{$account.lift_up_link}">{$lang.homepage.lift_up}</a></td>
							  		</tr>
							  		{/if}
							  	</table>
							  </td>
							</tr>
							</table>
						</div>
					</div>
				</td>
			</tr>
			{/strip}<!-- /main section -->
			{/if}
			{if $use_pilot_module_123flashchat}
			<tr>
				<td valign="top" style="padding-top: 12px;" class="gradient_top">
					<div class="content" style="margin: 0px;">
						<div class="header">{$lang.123flashchat.chat_stats}</div>
					<div style="padding-top:0px; padding-{$default_right}:10px; padding-bottom:15px; padding-{$default_left}:10px">
						<table cellpadding="0" cellspacing="0" width="100%" class="hp_hotlist">
							<tr>
								{if $extendchatserver != 3}
								<td >{$lang.123flashchat.chat_rooms}:<b>{$rooms.room_numbers}</b></td>
								<td >{$lang.123flashchat.chat_connections}:<b>{$rooms.connections}</b></td>
									{/if}
								<td >{$lang.123flashchat.chat_logon_users}:<b>{$rooms.logon_users}</b></td>
							</tr>
							<tr>
								<td >{$lang.123flashchat.online_user}:<b>{$userlist}</b></td>
						 	</tr>
							<tr>
								<td>
									<a href="{$site_root}/topcmm_123flashchat/123flashchat.php" target="_blank">{$lang.123flashchat.start_chat}</a>
							 	</td>
							</tr>
						</table>
					</div>
					</div>
				</td>
			</tr>
			{/if}
			{if $org_home[4] == 'true' || !($use_pilot_module_organizer eq 1 && $hide eq 1)}
			<!-- hotlist section -->{strip}
			<tr>
				<td valign="top">
					<div class="content">
						<div style="background-color: #{$css_color.hp_head_block};">
							<div class="header" style="padding-top:7px; padding-{$default_right}:10px; padding-bottom:7px; padding-{$default_left}:15px;">{$lang.top_menu.my_stats}</div>
						</div>
						<div class="filled">
							<table cellpadding="0" cellspacing="0" width="100%" class="hp_hotlist">
							<tr>
              <td width="50%" class="text_head">{$lang.homepage.hotlist_header_1}:</td>
              <td width="50%" class="text_head">{$lang.homepage.hotlist_header_2}:</td>
							</tr>
							<tr>
            	<td>
            		<div class="sep"></div>
           			<div><a href="{$hotlist.visit_link}">{$lang.homepage.hotlist_text_1_1}:&nbsp;{$hotlist.visit_count}</a>&nbsp;&nbsp;&nbsp;</div>
           			<div class="sep"></div>
              		<div><a href="{$hotlist.kiss_me_link}">{$lang.homepage.hotlist_text_1_3}:&nbsp;{$hotlist.kiss_me_count}</a>&nbsp;&nbsp;&nbsp;</div>
              		<div class="sep"></div>
              		<div>{if $hotlist.emailed_me_new_count}<b>{/if}<a href="{$hotlist.emailed_me_link}">{$lang.homepage.hotlist_text_1_4}:&nbsp;{if $hotlist.emailed_me_new_count}({$hotlist.emailed_me_new_count}){/if} {$hotlist.emailed_me_count}</a>{if $hotlist.emailed_me_new_count}</b>{/if}&nbsp;&nbsp;&nbsp;</div>
              		<div class="sep"></div>
              		<div>{if $hotlist.meet_me_count_new}<b>{/if}<a href="{$hotlist.meetme_link}">{$lang.homepage.hotlist_text_1_2}:&nbsp;{$hotlist.meet_me_count}{if $hotlist.meet_me_count_new}({$hotlist.meet_me_count_new}){/if}</a>{if $hotlist.meet_me_count_new}</b>{/if}&nbsp;&nbsp;&nbsp;</div>
              		<div class="sep"></div>
              	</td>
              	<td>
              		<div class="sep"></div>
              		<div><a href="{$hotlist.perfect_link}">{$lang.homepage.hotlist_text_2_1}:&nbsp;{$hotlist.match_count}</a>&nbsp;&nbsp;&nbsp;</div>
              		<div class="sep"></div>
	            	<div><a href="{$hotlist.kiss_them_link}">{$lang.homepage.hotlist_text_2_3}:&nbsp;{$hotlist.kiss_them_count}</a>&nbsp;&nbsp;&nbsp;</div>
	            	<div class="sep"></div>
    	        	<div><a href="{$hotlist.emailed_them_link}">{$lang.homepage.hotlist_text_2_4}:&nbsp;{$hotlist.emailed_them_count}</a>&nbsp;&nbsp;&nbsp;</div>
    	        	<div class="sep"></div>
	        	    <div>{if $hotlist.meet_them_count_new}<b>{/if}<a href="{$hotlist.meetthem_link}">{$lang.homepage.hotlist_text_2_2}:&nbsp;{$hotlist.meet_them_count}{if $hotlist.meet_them_count_new} ({$hotlist.meet_them_count_new}){/if}</a>{if $hotlist.meet_them_count_new}</b>{/if}&nbsp;&nbsp;&nbsp;</div>
	        	    <div class="sep"></div>
    	        	{if $user_refer_frends}<div><a href="{$hotlist.referred_link}">{$lang.homepage.hotlist_text_2_5}:&nbsp;{$hotlist.referred_count}</a>&nbsp;&nbsp;&nbsp;</div>
    	        	<div class="sep"></div>
    	        	{/if}
              	</td>
							</tr>
							</table>
						</div>
					</div>
				</td>
			</tr>
			{/strip}<!-- /hotlist section -->
			{/if}
			{if $org_home[5] == 'true' || !($use_pilot_module_organizer eq 1 && $hide eq 1)}
			<!-- account section -->{strip}
			<tr>
				<td valign="top">
					<div class="content">
						<div style="background-color: #{$css_color.hp_head_block};">
							<div class="header" style="padding-top:7px; padding-{$default_right}:10px; padding-bottom:7px; padding-{$default_left}:15px;">{$lang.top_menu.my_account}</div>
						</div>
						<div class="filled">
							<table cellpadding="0" cellspacing="0" width="100%">
								<tr>
									<td class="text">{$lang.homepage.account_credit}:&nbsp;<b>{$account.account}&nbsp;{$account.units}</b></td>
								</tr>
								<tr>
									<td style="padding-top: 23px;"><a href="{$account.buy_link}">{$lang.homepage.account_buy}</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="{$account.sign_link}">{$lang.homepage.account_sign}</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="{$account.alert_link}">{$lang.homepage.account_alert}</a>&nbsp;&nbsp;|&nbsp;&nbsp;<a href="{$account.news_link}">{$lang.homepage.account_news}</a>
									</td>
								</tr>
							</table>
						</div>
					</div>
				</td>
			</tr>
			{/strip}<!-- /account section -->
			{/if}
			{if $org_home[6] == 'true' || !($use_pilot_module_organizer eq 1 && $hide eq 1)}
				{if isset($clubs) && $clubs ne 'empty'}
				<!-- clubs section -->{strip}
				<tr>
					<td valign="top">

						<div class="content">
							<div style="background-color: #{$css_color.hp_head_block};">
								<div class="header" style="padding-top:7px; padding-{$default_right}:10px; padding-bottom:7px; padding-{$default_left}:15px;">{$lang.club.club_menu_1}</div>
							</div>
							<div class="filled">
								<table cellpadding="0" cellspacing="0" width="100%">
									<tr>
										{foreach key=key item=item from=$clubs name=visited}
										<td valign="top">
											<div style="margin-top: 0px">
												<a href="{$item.link}"><img src="{$item.icon_path}" class="icon" alt=""></a>
											</div>
											<div style="margin-top: 7px">
												<a href="{$item.link}"><b>{$item.club_name}</b></a>
											</div>
											<div style="margin-top: 3px">
												<font class="text_head">{$item.category}</font>
											</div>
										</td>
										<td width="23">&nbsp;</td>
										{/foreach}
									</tr>
								</table>
							</div>
							<div style="padding-top:15px; padding-{$default_right}:10px; padding-bottom:15px; padding-{$default_left}:10px">
							<a href="{$site_root}/{$seo.club}">{$lang.home_page.show_more_clubs}</a>
							</div>
						</div>
					</td>
				</tr>
				{/strip}<!-- /clubs section -->
				{/if}
	            <!-- perfect match section -->{strip}
                <tr>
                    <td valign="top">
                        <div class="content">
                        	<div style="background-color: #{$css_color.hp_head_block};">
	                            <div class="header" style="padding-top:7px; padding-{$default_right}:10px; padding-bottom:7px; padding-{$default_left}:15px;">{$lang.subsection.perfect_match}</div>
	                        </div>
                            <div class="filled">
		                        <table cellpadding="0" cellspacing="0" border="0" width="100%">
		                        <tr>
		                            {foreach key=key item=item from=$visited name=visited}
		                            <td valign="top">
		                                <div style="margin-top: 0px">
		                                    <a href="{$item.link}"><img src="{$item.icon_path}" class="icon" alt=""></a>
		                                </div>
		                                <div style="margin-top: 7px">
		                                    <a href="{$item.link}"><b>{$item.name}</b></a>
		                                </div>
		                                <div style="margin-top: 2px">
		                                    <font class="text">{if $base_lang.city[$item.id_city]}{$base_lang.city[$item.id_city]}, {/if}{if $base_lang.region[$item.id_region]}{$base_lang.region[$item.id_region]}, {/if}{$base_lang.country[$item.id_country]}</font>
		                                </div>
		                                <div style="margin-top: 2px">
		                                    <font class="text_head">{$item.age} {$lang.home_page.ans}</font>
		                                </div>
		                                <div style="margin-top: 2px">
		                                    <font class="text_hidden">{$item.photo_count} {$lang.users.upload_1}</font>
		                                </div>
		                            </td>
		                            <td width="23">&nbsp;</td>
		                            {/foreach}
		                        </tr>
		                        </table>
                            </div>
                            <div align="{$default_right}" style="padding-top:23px; padding-{$default_right}:10px; padding-bottom:15px; padding-{$default_left}:10px"><a href="{$hotlist.perfect_link}">{$lang.homepage.view_matches}</a></div>
                        </div>
                    </td>
                </tr>
                {/strip}<!-- perfect match section -->

			{/if}
			</table>
		</td>
		<td width="1%">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
		{/if}
		<td width="29%" valign="top">
		{if $org_home[7] == 'true' || !($use_pilot_module_organizer eq 1 && $hide eq 1)}

            <!--<div id="index_quick_search" class="index_quick_search">-->
			<div class="content">
            <div class="header">{$lang.home_page.header_search}</div>
            <div class="filled" id="index_quick_search">
               <table cellpadding="0" cellspacing="0" width="100%" border="0">
               <tr>
                   <td valign="top">
                       <form action="{$form.search_action}" method="post" name="search_form" id="search_form" style="margin: 0px">
                       <input type="hidden" name="search_type" id="search_type" {if $form.search_type eq 1} value="1" {else} value="2" {/if} >
                       {$form.search_hiddens}
                       <table cellpadding="0" cellspacing="0" width="100%">
						<tr>
							<td valign="top" class="text_head" style="padding-{$default_left}:5px;">{$lang.profile.im}&nbsp;</td>
							<td>
								<div style="width: 200px;">
									{foreach name=user_type item=item from=$user_types}
									<div style="float: left;">
										<table cellpadding="0" cellspacing="0">
											<tr>
												<td><input type="radio" name="id_user_type" value="{$item.id}" {if $id_user_type && $item.id eq $id_user_type}checked="checked"{/if} id="user_type_{$item.id}" onchange="SelectUserTypes('rpt',this.value, document.getElementById('user_subtype_div'));" onClick="this.blur()"></td>
												<td style="padding-{$default_right}: 5px; margin-top: 2px;"><label for="user_type_{$item.id}">&nbsp;{$item.name}</label></td>
											</tr>
										</table>
									</div>
									{/foreach}
									<div style="clear: both;"></div>
									<div id="user_subtype_div" style="position: relative; margin-top: 15px;"></div>
								</div>
							</td>
						</tr>
						<tr>
							<td valign="top" class="text_head" style="padding-{$default_left}:5px;">{$lang.profile.looking_for}&nbsp;</td>
							<td class="text">
								<div style="width: 200px;">
									{foreach name=user_type item=item from=$user_types}
									<div style="float: left;">
										<table cellpadding="0" cellspacing="0">
											<tr>
												<td><input type="radio" name="id_looking_user_type" value="{$item.id}" {if $id_looking_user_type && $item.id eq $id_looking_user_type}checked="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;  margin-top: 2px;"><label for="looking_user_type_{$item.id}">&nbsp;{$item.name}</label></td>
											</tr>
										</table>
									</div>
									{/foreach}
									<div style="clear: both;"></div>
									<div id="looking_user_subtype_div" style="position: relative; margin-top: 15px;"></div>
								</div>
							</td>
						</tr>
						<tr>
							<td class="text_head" style="padding-{$default_left}:5px;">{$lang.users.from_big}&nbsp;</td>
							<td class="text">
								<table cellpadding="0" cellspacing="0">
									<tr>
										<td><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>
										</td>
										<td>&nbsp;{$lang.users.to_big}&nbsp;</td>
										<td>
											<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>
										</td>
									</tr>
								</table>
							</td>
						</tr>
						{foreach item=item from=$elements name=elements}
						<tr ><td colspan="2">
						<table cellpadding="0" cellspacing="0" style="padding-top: 10px;">
						<tr>
							<td style="padding-top:0px; padding-{$default_right}:0px; padding-bottom:3px; padding-{$default_left}:0px;" class="text_head">
								{if $item.position_text == 'inline'}
									{$item.elem_html}&nbsp;
									{if $lang.profile[$item.name_for_lang] ne ''}
										{$lang.profile[$item.name_for_lang]}
									{else}
										{$item.name_for_lang}
									{/if}
								{else}
									{include file="$site_path/$template_root/registration_edit_element.tpl"}
								{/if}
							</td>
						</tr>
						</table>
						</td></tr>
						{/foreach}
                       <tr>
                           <td style="padding-top: 12px;" colspan="2">
                            <table cellpadding="0" cellspacing="0">
                               <tr>
                                   <td style="padding-{$default_left}: 5px; padding-top: 10px;"><input type="checkbox" name="foto_only" value="1"></td>
                                   <td style="padding-{$default_left}: 5px; padding-top: 10px;" class="text_head">{$lang.home_page.foto}</td>
                               </tr>
                               <tr>
                                   <td style="padding-{$default_left}: 5px; padding-top: 5px;"><input type="checkbox" name="online_only" value="1"></td>
                                   <td style="padding-{$default_left}: 5px; padding-top: 5px;" class="text_head">{$lang.home_page.online_now}</td>
                               </tr>
                               </table>
                           </td>
                       </tr>
                       <tr>
                           <td>&nbsp;</td>
                           <td style="padding-top:7px; padding-{$default_right}:0px; padding-bottom:5px; padding-{$default_left}:0px;">
                               <input type="button" class="button" value="{$lang.button.search}" onclick="document.getElementById('search_form').submit();">
                           </td>
                       </tr>
                       </table>
                       </form>
                   </td>
               </tr>
               </table>
               </div>
            </div>
		{/if}
		{if $org_home[8] == 'true' || !($use_pilot_module_organizer eq 1 && $hide eq 1)}
			{if $social ne 1}
				{if $form.use_horoscope}
				<!-- begin horoscope section -->{strip}
				<div>
					<div class="content">
						<div style="background-color: #{$css_color.hp_head_block};">
	                            <div class="header" style="padding-top:7px; padding-{$default_right}:10px; padding-bottom:7px; padding-{$default_left}:15px;">{$lang.home_page.view_horoscope}</div>
	                        </div>
						<div class="filled">
						<table cellpadding="0" cellspacing="0" border="0" width="100%">
							{section name=s loop=$horoscope}
							{if $smarty.section.s.index is div by 2}<tr>{/if}
							<td class="text" width="50%" style="padding-top: 5px;" >
								<a href="{$horoscope[s].sign_link}">{$horoscope[s].sign_name}</a> {if $horoscope[s].my_sign}<sup>{$lang.horoscope.your}</sup>{/if}
							</td>
							{if $smarty.section.s.index_next is div by 2 || $smarty.section.s.last}</tr>{/if}
							{/section}
						</table>
						</div>
					</div>
				</div>
				{/strip}<!-- end horoscope section -->
				{/if}
			{else}
			   	{if $news ne 'empty'}
			   	<div style="margin-top: 12px;" class="content">
			   		<div class="header">{$lang.section.news}</div>
			   		<div style="padding-bottom: 15px;">
			   		{foreach item=item name=s from=$news}
					<div style="padding-top:10px; padding-{$default_right}:12px; padding-bottom:0px; padding-{$default_left}:12px;">
						<a href="{$item.link_read}">{$item.text}</a>
					</div>
					{/foreach}
			   		</div>
			   		<div align="{$default_right}" style="padding: 12px 12px;">
						<a href="news.php">{$lang.home_page.view_more}</a>
			   		</div>
			   	</div>
			   	{/if}
			{/if}
		{/if}
		</td>
		{if ($org_home[0] == 'false' && $org_home[1] == 'false' && $org_home[2] == 'false') || ($org_home[3] == 'false' && $org_home[4] == 'false' && $org_home[5] == 'false' && $org_home[6] == 'false') || !($use_pilot_module_organizer eq 1 && $hide eq 1)}
		<td>&nbsp;</td>
		{/if}
	</tr>
	</table>
<script type="text/javascript">
{if $first}
	{literal}
	$(document).ready(function(){
		launchInvite(470,240);
	});
	{/literal}
	{/if}
{literal}
	$('select').live("change",(function(){
		val = $(this).val();
		name = $(this).attr('name');
		if (name == "id_country") {
			$.post(SEO_SITE_ROOT+"location.php",{sec:'rp',sel:'region', id_country:val},
			function(data){
				$("div #region_div").html(data);
				$("div #city_div select").val(0);
				$("div #city_div select").text('');
			}
		);
		} else if(name == "id_region") {
			$.post(SEO_SITE_ROOT+"location.php",{sec:'rp',sel:'city', id_region:val},
			function(data){
				$("div#city_div").html(data);
			}
		);
		}
	}));


function SendConfirm() {
	email = $("#email").val();
	var re = /^([0-9a-z]([-_.]?[0-9a-z])*@[0-9a-z]([-.]?[0-9a-z])*\.[a-wyz][a-z](fo|g|l|m|mes|o|op|pa|ro|seum|t|u|v|z)?)$/;
	if (!email.match(re)) {
		$("#err_confirm").text('{/literal}{$lang.homepage.confirm_err_mail}{literal}');
		return;
	} else {
		$.post(SEO_SITE_ROOT + "/backend.php",{sel:'confirm',email:email}, function(data){$("#err_confirm").text(data)});
	}
}

	$('.search_form').find('select[name=id_language_1]').attr('name', 'id_language_1[]');
	$('.search_form').find('select').each(function(){
		if(!$(this).hasClass('index_select')){
			if(!$(this).find('option:first').val() || $(this).find('option:first').val() == 0){
				$(this).find('option:first').val('0');
				$(this).find('option:first').text('{/literal}{$lang.button.all}{literal}');
				$(this).attr('multiple', true);
				//var size = $(this).offset();
				if($(this).height() > 150)
					$(this).height(150);

				$(this).find('option:selected').each(function(){
					$(this).attr('selected', false);
				});
			}
			else{
				if($(this).attr('name') != 'looking_for[]'){
					$(this).prepend('<option value=0>{/literal}{$lang.button.all}{literal}<\/option>');
					$(this).attr('multiple', true);
				}
			}
			$(this).find('option:first').attr('selected', true);
		}
	});

	$('.search_form').find('input[type=radio]').each(function(){
		if($(this).attr('name') != 'looking_for[]'){
			name = $(this).attr('name');
			value = $(this).val();
			var html = '<input type="checkbox" checked name="'+name+'[]" value="'+value+'" />';
			$(this).after(html).remove();
		}
	});
	$('.search_form').find('input[type=checkbox]').each(function(){
		if(($(this).attr('name') != 'foto_only') && ($(this).attr('name') != 'online_only')){
			$(this).attr('checked', true);
		}
	});
	$('select[name=id_language_2]').remove();
	$('select[name=id_language_3]').remove();

function ZipCodeCheck(zip_value) {
	if (zip_value == '') {
		document.getElementById('search_type').value = 1;
	} else {
		document.getElementById('search_type').value = 2;
	}
	return;
}
{/literal}
{if $use_pilot_module_organizer eq 1 && $hide eq 1}
	{if $org_home[7] == 'true'}

	{/if}
{/if}
	var resize=1;
</script>
{include file="$site_path$index_theme_path/like.tpl"}
{include file="$gentemplates/$footer_tpl"}
