{if $ajax ne '1'}
{include file="$gentemplates/$header_tpl"}
	<script type="text/javascript" src="{$site_root}{$index_theme_path}/js/class.wall_events.js"></script>
	<script type="text/javascript" src="{$site_root}{$index_theme_path}/js/jquery.jplayer.min.js"></script>
	<link href="{$site_root}{$index_theme_path}{$index_theme_css_path}/player_skin/jplayer.blue.monday_{$default_left}.css" rel="stylesheet" type="text/css" />
	{include file="$gentemplates/wall_events_audio_player.tpl"}
	
	<h2>{$lang.section.profile}:&nbsp;{$data.name}</h2>
{*if $form.err}
	<p class="error_msg">*&nbsp;{$form.err}</p>
{/if*}
<!-- begin general table -->
	{if $search_link.back_link}
		{strip}
		<dl style="overflow:hidden;">
			<dd align={$default_right} valign='top'>
				<!-- begin search links -->
				<div style="margin-bottom: 5px; margin-top:-28px;">&nbsp;
					<div style="width:100%">
						<dl>
							<dd align="{$default_right}" style="text-align:{$default_right};padding-top:10px;padding-bottom:4px;">
								{$lang.profile.showing}&nbsp;{$search_link.curent_key}&nbsp;{$lang.profile.of}&nbsp;{$search_link.count}&nbsp;
								{if $search_link.prev_link}
									<a href="{$search_link.prev_link}" class="back-page-act" title="{$lang.button.gr_prev}">&nbsp;</a>
								{else}
									<a href="javascript: void(0);" class="back">&nbsp;</a>
								{/if}
								{if $search_link.next_link}
									<a href="{$search_link.next_link}" class="next-page-act" title="{$lang.button.gr_next}">&nbsp;</a>
								{else}
									<a href="javascript: void(0);" class="next">&nbsp;</a>
								{/if}
							</dd>
						</dl>
					</div>
				</div>
				<!-- end search links -->
			</dd>
		</dl>
		{/strip}
	{/if}
	<div class="profile_info_table">
		<div class="profile_icon">
			{if $data.big_thumb_photo_path || $data.icon_path}
				<div class="profile_icon_slider">
				   <div class="slider_list">
					   <ul id="listtt" style="width:{$data.photo_count*200}px;">
					   {if $default_left eq 'left'}
						 {if $data.icon_path}
							<li><img src="{$data.icon_path}" {*onclick="load_all_images(this);"*} class="icon imgcanvas" width="200px"  alt="" /></li>
						 {/if}
							{/if}
						 {foreach from = $data.big_thumb_photo_path item=item}
						 {if $data.icon_path ne $item.path}
							<li><img class="imgcanvas" src="{$item.path}" width="200px" {*onclick="load_all_images(this)"*} alt="" /></li>
						{/if}
						 {/foreach}
						 {if $default_left eq 'right'}
							 {if $data.icon_path}
								<li><img src="{$data.icon_path}" onclick="/*load_all_images(this); return false;*/" class="icon imgcanvas" width="200px"  alt="" /></li>
							 {/if}
						 {/if}
						</ul>
				   </div>
				   <div class="signature">	   
					   <a class="prevslide" onclick="icon_slider('left');">&nbsp;</a>
					   <span id="this_icon">{if $data.big_photo_count eq 0}0{else}1{/if}</span> {$lang.users.of} <span id="count_icon">{if $data.big_photo_count == 0}0{else}{$data.big_photo_count}{/if}</span>
					   <a class="nextslide" onclick="icon_slider('right');">&nbsp;</a>
				   </div>
				</div>
			{/if}
		</div>
		{literal}
		<script>
		  function load_all_images(elem)
		  {
			  var link = elem.src.match(/[^\/]+$/);
			  launchWindow('/myprofile.php','sel=start_slide&all_images=true&img='+link,800,550);
		  };			  
		  function icon_slider(to,time)
		  {
			left = '{/literal}{$default_left}{literal}';
			 to = (to=='left')?(200):(-200);
			 time = (time && parseInt(time)>10)?parseInt(time):250;
			 time = parseInt(time/10);
			 var ul = document.getElementById('listtt');
			 if (left=='left')
				 var margin = (ul.style.marginLeft)?parseFloat(ul.style.marginLeft):0;
			else
				var margin = (ul.style.marginRight)?parseFloat(ul.style.marginRight):0;
			 var delta = to/time;
			 var iter = 0;
			 var it    = parseInt(document.getElementById('this_icon').innerHTML);
			 var count = parseInt(document.getElementById('count_icon').innerHTML);
			 it = (to<0)?(it+1):(it-1);	
			 if(it>count || it<1) return;
			 document.getElementById('this_icon').innerHTML = it;
			 var func = function()
			 {
				iter++;
				if (left=='left'){
				 var margin = (ul.style.marginLeft)?parseFloat(ul.style.marginLeft):0;
				 ul.style.marginLeft = margin + delta + 'px';
				}
				else{
					var margin = (ul.style.marginRight)?parseFloat(ul.style.marginRight):0;
					ul.style.marginRight = margin + delta + 'px';
				}
				if(iter < time) setTimeout(func,10);
			};
			func();
		  }
		</script>
		{/literal}
		<div class="profile_info">	
			<div class="block" {if $data.last_login}style="margin-bottom: 9px;"{/if}>
				<div style="width: 300px" class="float_left">
                    <h3 class="float_left">{$data.name}</h3><span class="status_{if $data.status eq $lang.status.on}link{else}text{/if} float_left" style="margin: 2px 10px">{$data.status}</span>
                    {if $data.last_login}<br /><br /><span class="text_hidden float_left">{$lang.homepage.last_connection}:&nbsp;</span> <span class="float_left">{$data.last_login}</span>{/if}
                </div>
                <div>{if $data.group}<span class="text_hidden float_left">{$lang.homepage.group}:&nbsp;</span> <span class="float_left">{$data.group}</span>{/if}</div>
			</div>
			<div class="block" {if $data.last_login}style="margin-bottom: 9px;"{/if}>
				<div style="width: 300px" class="float_left">
					{if $form.guest_user != 1}{if $data.view_on_map}
						<a href="#" class="world-icon" style="margin-top:9px;" onClick="javascript:window.open('{$data.view_on_map}', 'map', 'width=820,height=470,top=0'); return false;" title="{$lang.profile.view_location}">&nbsp;</a>
					{/if}{/if}
					
                    <div style="margin-top:7px;">{$data.age} {$lang.profile.years}</div>
					{if $data.city || $data.region || $data.country}
					<p class="text_red">
						{strip}
							{if $data.city}
								{if $data.seo_city}
									<a href="{$site_root}/{$seo.main_location}-{$data.seo_city}">
								{/if}
								{$data.city}
								{if $data.seo_city}
									</a>
								{/if},&nbsp;
							{/if}

							{if $data.region}
								{if $data.seo_region}
									<a href="{$site_root}/{$seo.main_location}-{$data.seo_region}">
								{/if}
								{$data.region}
								{if $data.seo_region}
									</a>
								{/if},&nbsp;

							{/if}
							{if $data.seo_country}
								<a href="{$site_root}/{$seo.main_location}-{$data.seo_country}">
							{/if}
							{$data.country}
							{if $data.seo_country}
								</a>
							{/if}
						{/strip}<br />					
					</p>
					{/if}
				</div>
				<div class="completion" style="float: none;">
					<p class="text_hidden">{$lang.homepage.completion}:</p>
					<div class="line_main">
						<div class="line_filled" style="width:{$data.complete}%;">
							&nbsp;
						</div>
						
					</div>
					<p>&nbsp;{$data.complete}%</p>
				</div>
			</div>
		{if $data_1.couple eq '1'}
			<div>	
			<div class="block" {if $data_1.last_login_2}style="margin-bottom: 9px;"{/if}>
				<div style="width: 300px" class="float_left">
                    <h3 class="float_left">{$data_1.login_2}</h3><span class="status_{if $data_1.status_2 eq $lang.status.on}link{else}text{/if} float_left" style="margin: 2px 10px">{$data_1.status_2}</span>
                    {if $data_1.last_login_2}<br /><br /><span class="text_hidden float_left">{$lang.homepage.last_connection}:&nbsp;</span> <span class="float_left">{$data_1.last_login_2}</span>{/if}
                </div>
                <div>{if $data_1.group_2}<span class="text_hidden float_left">{$lang.homepage.group}:&nbsp;</span> <span class="float_left">{$data_1.group_2}</span>{/if}</div>
			</div>
			<div class="block" {if $data.last_login}style="margin-bottom: 9px;"{/if}>
				<div style="width: 300px" class="float_left">
					{if $form.guest_user != 1}{if $data_1.view_on_map_2}
						<a href="#" class="world-icon" style="margin-top:9px;" onClick="javascript:window.open('{$data_1.view_on_map_2}', 'map', 'width=820,height=470,top=0'); return false;" title="{$lang.profile.view_location}">&nbsp;</a>
					{/if}{/if}
					
                    <div style="margin-top:7px;">{$data_1.age_2} {$lang.profile.years}</div>
					{if $data_1.city_2 || $data_1.region_2 || $data_1.country_2}
					<p class="text_red">
						{strip}
							{if $data_1.city_2}
								{if $data_1.seo_city_2}
									<a href="{$site_root}/{$seo.main_location}-{$data_1.seo_city_2}">
								{/if}
								{$data_1.city_2}
								{if $data_1.seo_city_2}
									</a>
								{/if},&nbsp;
							{/if}

							{if $data_1.region_2}
								{if $data_1.seo_region_2}
									<a href="{$site_root}/{$seo.main_location}-{$data_1.seo_region_2}">
								{/if}
								{$data_1.region_2}
								{if $data_1.seo_region_2}
									</a>
								{/if},&nbsp;

							{/if}
							{if $data_1.seo_country_2}
								<a href="{$site_root}/{$seo.main_location}-{$data_1.seo_country_2}">
							{/if}
							{$data_1.country_2}
							{if $data_1.seo_country_2}
								</a>
							{/if}
						{/strip}<br />					
					</p>
					{/if}
				</div>
				<div class="completion" style="float: none;">
					<p class="text_hidden">{$lang.homepage.completion}:</p>
					<div class="line_main">
						<div class="line_filled" style="width:{$data_1.complete_2}%;">
							&nbsp;
						</div>
						
					</div>
					<p>&nbsp;{$data_1.complete_2}%</p>
				</div>
			</div>
		{/if}
			<div class="block photos">
				{section loop=$data.main_thumb_photo_path name=c max=6}
					<a class="imgcanvas_container" style="text-decoration: none;" {if $form.guest_user != 1}href="#" onclick="launchWindow('{$data.main_thumb_photo_path[c].view_link.file}','{$data.main_thumb_photo_path[c].view_link.str}',800,550); return false;"{/if}>
						<img src="{$data.main_thumb_photo_path[c].path}" class="imgcanvas">
					</a>
				{/section}
			</div>
			<div class="profile_buttons p-b5" style="position: relative;">
				<div id="send_icons" style="z-index: 1000">
					{if $settings.use_mailbox == '1'}
						<p>
							<a href="{$data.email_link}" title="">{$lang.button.gr_email}</a>
						</p>
					{/if}
					<p>
						<a href="#" onclick="javascript:open_im_window({$data.id}); return false;" title="">{$lang.button.gr_im}</a>
					</p>
					<p>
						{if $data.use_kiss_types}
							<a href="#" onclick="launchWindow('{$data.kiss_link}','',600,530); return false;"  title="">{$lang.button.gr_kiss}</a>
						{else}
							<a href="{$data.kiss_link}" title="">{$lang.button.gr_kiss}</a>
						{/if}
					</p>
					{if $data.ecard_link}
						<p>
							<a href="{$data.ecard_link}" title="">{$lang.search.send_ecard}</a>
						</p>
					{/if}
					{if ($use_pilot_module_giftshop) && ($data.gift_link)}
						<p>
							<a href="{$data.gift_link}" title="">{$lang.button.gr_gift}</a>
						</p>
					{/if}
					{if $use_pilot_module_flashcomsmessenger eq 1 && $z5IsUserOnline}
						<p>
							<a href="javascript:z5messenger.SendInvitation('{$data.id}');" title="">{$lang.z5_messenger.title}</a>
						</p>
					{/if}
					<p>
						<a href="#" onclick="launchWindow('{$data.sendfriend_link}','',550,500); return false;" title="">{$lang.search.send_to_friend}</a>
					</p>
					{if $use_pilot_module_flashcomsmessenger eq 1 && $z5IsUserOnline}
						<p>
							<a href="javascript:z5messenger.SendInvitation('{$data.id}');" title="">{$lang.z5_messenger.title}</a>
						</p>
					{/if}
				</div>
				{if $form.guest_user != 1}
					<a class="mail-icon icon_bet" onClick="$('#send_icons').toggle();" title="{$lang.profile.share}">&nbsp;</a>
					{if $voipcall_feature && $phone_exist eq '1'}
						{if $data.phone}
							<span id="voip_call{$data.id}"><a class="call-icon icon_bet" {$data.phone_link} title="{$data.phone}">&nbsp;</a></span>
						{*{else}
							{$lang.voip.no_number}*}
						{/if}
						{if $data.webrecorder_player}
							<a href="#" class="video-icon icon_bet" 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;">&nbsp;</a>
						{/if}										
					{/if}
				{/if}
				{if ($use_pilot_module_blog) && ($menu.blog)}
					<a class="blog-icon icon_bet" onclick="javascript:location.href='{$menu.blog}';" title="{$lang.blog.blog_menu_1}">&nbsp;</a>
				{/if}
				<a class="rss-icon icon_bet" alt="{$lang.profile.rss}" title="{$lang.profile.rss}" onclick="{$data.rss_link}">&nbsp;</a>
				<a class="print-icon icon_bet" alt="{$lang.profile.print_version}" title="{$lang.profile.print_version}" href="#" onclick="javascript: window.open('{$data.print_link}','{$data.login}','menubar=0, resizable=1, scrollbars=1,status=0,toolbar=0, width=800,height=600');return false;">&nbsp;</a>
				{if $form.guest_user != 1 && $data_1.id_couple!=$user_id}
					{if $data.hotlisted}
						<a title="{if $data.friend_request}{$lang.search.cancel_request}{else}{$lang.search.delete_hotlist}{/if}" href="{$data.hotlist_delete}" class="fav-icon icon_bet">&nbsp;</a>
					{/if}				
					{if $data.blacklisted}
						<a href="{$data.blacklist_delete}" title="{$lang.search.delete_blacklist}" class="blacklist-icon">&nbsp;</a>
					{/if}
					{if $data.blacklist_link && !$data.hotlisted}
						<a class="addfav-icon icon_bet" href="{$data.addfriend_link}"  title="{$lang.search.add_to_hotlist}">&nbsp;</a>
						<a class="blacklist-icon icon_bet" href="{$data.blacklist_link}" title="{$lang.search.add_to_blacklist}">&nbsp;</a>	
					{/if}
				{/if}
			</div>
		</div>
	</div>
	<!-- end general table -->
	<!-- begin menu -->
	{strip}		
		<div class="main_tabs">
			<div id="menu5" class="tab_block first {if $form.page eq '5'} active{/if}">
				<a href="#" onclick="javascript: ShowTab(5,'{$menu.5}'); return false;">{$lang.section.wall}</a>
			</div>
			<div id="menu1" class="tab_block {if $form.page eq '1'} active{/if}">
				<a href="#" onclick="javascript: ShowTab(1,'{$menu.1}'); return false;">{$lang.section.description}</a>
			</div>
			<div id="menu4" class="tab_block {if $form.page eq '4'}active{/if}">
				<a href="#" onclick="javascript: ShowTab(4,'{$menu.4}'); return false;">{$lang.section.photo_album}</a>
			</div>
		</div>
	{/strip}<!-- end menu -->
		<!-- begin profile tables -->
		<div style=" margin: 0px">
		<div style="width:100%">
			<div id="tab_div">
			{/if}
				{if $form.page eq '4' || $form.page eq '5'}
					{include file="$gentemplates/viewprofile_view.tpl"}
				{else}
					{include file="$gentemplates/viewprofile_view_new.tpl"}
				{/if}
			{if $ajax ne '1'}
			</div>
		</div>
		</div>
		<!-- end profile tables -->
	
{literal}                
<script language="JavaScript" type="text/javascript">
    function Check_rss_user(login){
        $.post(SEO_SITE_ROOT+"/viewprofile.php",{sel:"check_rss",login:login},function(data){
            if (data != 'ok'){
                ShowAjaxError('', data);
            }else{
                document.location.href="{/literal}{$server}{literal}/rss.php?user_name="+login;
                //{$server}+"/rss.php?user_name="+login+"&amp;";
            }
        });
    }
</script>
{/literal}
{include file="$gentemplates/$footer_tpl"}{/if}