<script type="text/javascript">[after-reg]Profile.LoadPhoto();[/after-reg]
var startResizeCss = false;
var user_id = '{user-id}';
	$(document).ready(function(){
	$(window).scroll(function(){
		if($('#type_page').val() == 'profile'){
			if($(document).height() - $(window).height() <= $(window).scrollTop()+($(document).height()/2-250)){
				wall.page(user_id);
			}
			if($(window).scrollTop() < $('#fortoAutoSizeStyleProfile').offset().top){
				startResizeCss = false;
				$('#addStyleClass').remove();
			}
			if($(window).scrollTop() > $('#fortoAutoSizeStyleProfile').offset().top && !startResizeCss){
				startResizeCss = true;
				$('body').append('<div id="addStyleClass"><style type="text/css" media="all">.wallrecord{width:750px;margin-left:-210px}.infowalltext_f{font-size:11px}.wall_inpst{width:668px}.public_likes_user_block{margin-left:585px}.wall_fast_opened_form{width:675px;margin-left:-150px}.wall_fast_block{width:680px;margin-top:2px;margin-left:-150px}.public_wall_all_comm{width:692px;margin-top:2px;margin-bottom:-2px}.player_mini_mbar_wall{width:710px;margin-bottom:0px}#audioForSize{min-width:690px}.wall_rec_autoresize{width:690px}.wall_fast_ava img{width:50px}.wall_fast_ava{width:60px}.wall_fast_comment_text{margin-left:57px}.wall_fast_date{margin-left:57px;font-size:11px}.public_wall_all_comm{margin-left:-150px}.size10{font-size:11px}</style></div>');
			}
		}
	});
	music.jPlayerInc();
	$('#wall_text, .fast_form_width').autoResize();
	[owner]if($('.profile_onefriend_happy').size() > 4) $('#happyAllLnk').show();
	ajaxUpload = new AjaxUpload('upload_cover', {
		action: '/index.php?go=editprofile&act=upload_cover',
		name: 'uploadfile',
		onSubmit: function (file, ext) {
			if(!(ext && /^(jpg|png|jpeg|gif|jpe)$/.test(ext))) {
				addAllErr(lang_bad_format, 3300);
				return false;
			}
			$("#les10_ex2").draggable('destroy');
			$('.cover_loaddef_bg').css('cursor', 'default');
			$('.cover_loading').show();
			$('.cover_newpos, .cover_descring').hide();
			$('.cover_profile_bg').css('opacity', '0.4');
		},
		onComplete: function (file, row){
			if(row == 1 || row == 2) addAllErr('{translate=lang_781}', 3300);
			else {
				$('.cover_loading').hide();
				$('.cover_loaddef_bg, .cover_hidded_but, .cover_loaddef_bg, .cover_descring').show();
				$('#upload_cover').text(lang_edit_cover);
				$('.cover_profile_bg').css('opacity', '1');
				$('.cover_loaddef_bg').css('cursor', 'move');
				$('.cover_newpos').css('position', 'absolute').css('z-index', '70').css('margin-left', '197px').show();
				row = row.split('|');
				rheihht = row[1];
				postop = (parseInt(rheihht/2)-100);
				if(rheihht <= 210) postop = 0;
				$('#les10_ex2').css('height', +rheihht+'px').css('top', '-'+postop+'px');
				cover.init('/uploads/users/'+row[0], rheihht);
				$('.cover_addut_edit').attr('onClick', 'cover.startedit(\'/uploads/users/'+row[0]+'\', '+rheihht+')');
			}
		}
	});
	[/owner]
});
$(document).click(function(event){
	wall.event(event);
});
</script>

<input type="hidden" id="type_page" value="profile" />
<style>
.newcolor000{color:#000}
</style>
<div id="jquery_jplayer"></div>
<input type="hidden" id="teck_id" value="" />
<input type="hidden" id="teck_prefix" value="" />
<input type="hidden" id="typePlay" value="standart" />
<div class="profile_bg">
  <div class="profile_avatar_block" > [owner]
    <div class="profile_avatar_menu_owner">
      <div onClick="Profile.LoadPhoto(); return false;" id="ava_upl">{translate=lang_782}</div>
      <div onClick="Profile.miniature(); return false;" {display-ava} id="ava_mini">{translate=lang_783}</div>
      <div onClick="Profile.DelPhoto(); return false;" {display-ava} id="ava_del">{translate=lang_784}</div>
    </div>
    [/owner]
    [not-owner]
    <div class="profile_avatar_menu" onclick="Profile.show_ava('{ava}', '{user-id}')"></div>
    [/not-owner] <span id="ava"><img src="{ava}" class="avatar" id="ava_{user-id}" /></span>
  </div>
  [owner]
  <div class="cover_loading no_display"><img src="/templates/Default/images/progress_gray.gif" /></div>
  <div class="cover_profile_bg">
    <div class="cover_buts_pos">
      <div class="cover_newpos" {covses}>
        <div class="cover_addut cover_hidded_but" onClick="cover.cancel('{cover_pos}')">{translate=lang_785}</div>
        <div class="cover_addut cover_hidded_but" onClick="cover.del()">{translate=lang_786}</div>
        <div class="cover_addut {covs}" id="upload_cover">{translate=lang_787}</div>
        <div class="cover_addut cover_hidded_but" onClick="cover.save()">{translate=lang_788}</div>
        <div id="cover_addut_edit" class="no_display">
          <div class="cover_addut_edit {covss}" onClick="cover.startedit('{cover}', '{cover_pos}')">{translate=lang_789}</div>
        </div>
      </div>
      <div class="cover_loaddef_bg {covss}" {covss} style="cursor:default">
        <div class="cover_descring {covs}">{translate=lang_790}</div>
        <div id="les10_ex2" {cov}><img src="{cover}" width="970" id="cover_img" /></div>
        <div id="cover_restart"></div>
      </div>
    </div>
    <div class="name_last_block">
      <div class="name_last" >{name} {lastname}</div>
      <div class="infromation_min" >{age}[not-all-city], {city}[/not-all-city][not-all-country], {country}[/not-all-country]</div>
    </div>
  </div>
  [/owner]
  [not-owner]
  <div class="cover_profile_bg">
    <div class="cover_buts_pos">
      <div class="cover_loaddef_bg" style="cursor:default">
        <div id="les10_ex2" {cov}><img src="{cover}" width="970" id="cover_img" /></div>
      </div>
    </div>
    <div class="cover_gr">
      <div class="name_last_block">
        <div class="name_last" >{name} {lastname}</div>
        <div class="infromation_min" >{age}[not-all-city], {city}[/not-all-city][not-all-country], {country}[/not-all-country]</div>
      </div>
      [blacklist]
      <div class="prof_menu_block">
        <div onClick="messages.new_({user-id}); return false" class="button_div " style="width:180px;">
          <button style="-moz-box-shadow: 0 0 5px rgba(0,0,0,.6);-webkit-box-shadow: 0 0 5px rgba(0,0,0,.6);box-shadow: 0 0 5px rgba(0,0,0,.6);">{translate=lang_791}</button>
        </div>
        <img src="{theme}/images/prof_st_ico.png" class="prof_st" onclick="$('.prof_menu').fadeIn('fast');" />
        <div class="prof_menu" style="display:none; z-index:250;">
          <img src="{theme}/images/prof_st_ico.png" class="prof_st_2" onclick="$('.prof_menu').fadeOut('fast');" />
          <img src="{theme}/images/st_pf.png" class="prof_m_st" /> [no-friends]
          <a href="/" onClick="friends.add({user-id}); return false">
          <div>{translate=lang_180}</div>
          </a>
          [/no-friends]
          [yes-friends]
          <a href="/" onClick="friends.delet({user-id}, 1); return false">
          <div>{translate=lang_181}</div>
          </a>
          [/yes-friends]
          [no-subscription]
          <a href="/" onClick="subscriptions.add({user-id}); return false" id="lnk_unsubscription">
          <div><span id="text_add_subscription">{translate=lang_182}</span>
            <img src="/templates/Default/images/loading_mini.gif" alt="" id="addsubscription_load" class="no_display" style="margin-right:-13px" /></div>
          </a>
          [/no-subscription]
          [yes-subscription]
          <a href="/" onClick="subscriptions.del({user-id}); return false" id="lnk_unsubscription">
          <div><span id="text_add_subscription">{translate=lang_183}</span>
            <img src="/templates/Default/images/loading_mini.gif" alt="" id="addsubscription_load" class="no_display" style="margin-right:-13px" /></div>
          </a>
          [/yes-subscription]
          <a href="/" onClick="gifts.box('{user-id}'); return false">
          <div>{translate=lang_184}</div>
          </a>
          [no-blacklist]
          <a href="/" onClick="settings.addblacklist({user-id}); return false" id="addblacklist_but">
          <div><span id="text_add_blacklist">{translate=lang_187}</span>
            <img src="/templates/Default/images/loading_mini.gif" alt="" id="addblacklist_load" class="no_display" /></div>
          </a>
          [/no-blacklist]
          [yes-blacklist]
          <a href="/" onClick="settings.delblacklist({user-id}, 1); return false" id="addblacklist_but">
          <div><span id="text_add_blacklist">{translate=lang_188}</span>
            <img src="/templates/Default/images/loading_mini.gif" alt="" id="addblacklist_load" class="no_display" /></div>
          </a>
          [/yes-blacklist] </div>
      </div>
      [/blacklist] </div>
  </div>
  [/not-owner]
  <div class="clear" style="padding-top:3px;"></div>
  <!-- RIGHT BLOCKS -->
  <div style="width:220px; float:right; margin-right:-5px;"> [phet]
    <div class="friends_block">
      <div onClick="Page.Go('/albums/{user-id}'); return false" class="friends_block_top_header">{translate=lang_384} </div>
      <div class="clear"></div>
      <div style="padding-left:3px; padding-top:3px;"> {five-photo}</div>
      <div class="clear"></div>
    </div>
    [/phet]
    
    [videos]
    <div class="clear" style="padding-top:15px;"></div>
    <div class="friends_block">
      <div onClick="Page.Go('/videos/{user-id}'); return false" class="friends_block_top_header">{translate=lang_772} <span>{videos-num}</span>
      </div>
      <div class="clear"></div>
      <div style="padding-left:7px;"> {videos}</div>
      <div class="clear"></div>
    </div>
    [/videos]
    [audios]
    <div class="clear" style="padding-top:15px;"></div>
    <div class="friends_block">
      <div onClick="Page.Go('/audio{user-id}'); return false" class="friends_block_top_header">{translate=lang_773} <span>{audios-num}</span>
      </div>
      <div class="clear"></div>
      {audios}
      <div class="clear"></div>
    </div>
    [/audios] </div>
  <!-- END RIGHT BLOCKS -->
  <!-- LEFT BLOCKS -->
  <div style="width:222px; float:left; margin-left:-10px;"> [friends]
    <div class="friends_block">
      <div onClick="Page.Go('/friends/{user-id}'); return false" class="friends_block_top_header">{translate=lang_116} <span>{friends-num}</span>
      </div>
      <div class="clear"></div>
      <div style="padding-left:5px; padding-top:5px;">{friends}</div>
      <div class="clear"></div>
    </div>
    [/friends]
    [subscriptions]
    <div class="clear" style="padding-top:15px;"></div>
    <div class="friends_block">
      <div onClick="subscriptions.all({user-id}, '', {subscriptions-num}); return false" class="friends_block_top_header">{translate=lang_193} <span>{subscriptions-num}</span>
      </div>
      <div class="clear"></div>
      {subscriptions}
      <div class="clear"></div>
    </div>
    [/subscriptions]
    [groups]
    <div class="clear" style="padding-top:15px;"></div>
    <div class="friends_block">
      <div onClick="groups.all_groups_user('{user-id}')" class="friends_block_top_header">{translate=lang_194} <span>{groups-num}</span>
      </div>
      <div class="clear"></div>
      {groups}
      <div class="clear"></div>
    </div>
    [/groups] </div>
  <!-- END LEFT BLOCKS -->
  <div style="margin-left:230px; width:490px; margin-top:5px;"> [privacy-wall]
    <div class="newmes" id="wall_tab" style="border-bottom:0px; margin-top:-5px;">
      <div >
        <textarea id="wall_text" class="wall_inpst wall_fast_opened_texta" style="width:458px" onKeyUp="wall.CheckLinkText(this.value)" onBlur="wall.CheckLinkText(this.value, 1)" onclick="$('#wall_text').height('35px')" placeholder="[owner]{translate=lang_210}[/owner][not-owner]{translate=lang_211}[/not-owner]"></textarea>
        <div id="attach_files" class="margin_top_10 no_display"></div>
        <div id="attach_block_lnk" class="no_display clear">
          <div class="attach_link_bg">
            <div align="center" id="loading_att_lnk"><img src="{theme}/images/loading_mini.gif" style="margin-bottom:-2px" /></div>
            <img src="" align="left" id="attatch_link_img" class="no_display cursor_pointer" onClick="wall.UrlNextImg()" />
            <div id="attatch_link_title"></div>
            <div id="attatch_link_descr"></div>
            <div class="clear"></div>
          </div>
          <div class="attach_toolip_but"></div>
          <div class="attach_link_block_ic fl_l"></div>
          <div class="attach_link_block_te">
            <div class="fl_l">{translate=lang_212}:
              <a href="/" id="attatch_link_url" target="_blank"></a>
            </div>
            <img class="fl_l cursor_pointer" style="margin-top:2px;margin-left:5px" src="{theme}/images/close_a_wall.png" onMouseOver="myhtml.title('1', '{translate=lang_213}', 'attach_lnk_')" id="attach_lnk_1" onClick="wall.RemoveAttachLnk()" /></div>
          <input type="hidden" id="attach_lnk_stared" />
          <input type="hidden" id="teck_link_attach" />
          <span id="urlParseImgs" class="no_display"></span>
        </div>
        <div class="clear"></div>
        <div id="attach_block_vote" class="no_display">
          <div class="attach_link_bg">
            <input type="text" id="vote_title" class="inpst" maxlength="80" placeholder="{translate=lang_214}:" style="width:355px;margin-left:5px"  onKeyUp="$('#attatch_vote_title').text(this.value)" />
            <div class="mgclr"></div>
            <div class="texta">{translate=lang_215}:<br />
              <small><span id="addNewAnswer">
              <a class="cursor_pointer" onClick="Votes.AddInp()">{translate=lang_216}</a>
              </span> | <span id="addDelAnswer">{translate=lang_217}</span></small></div>
            <input type="text" id="vote_answer_1" class="inpst" maxlength="80" placeholder="№1" style="width:355px;margin-left:5px" />
            <div class="mgclr"></div>
            <input type="text" id="vote_answer_2" class="inpst" maxlength="80" placeholder="№2" style="width:355px;margin-left:5px" />
            <div class="mgclr"></div>
            <div id="addAnswerInp"></div>
            <div class="clear"></div>
          </div>
          <div class="attach_toolip_but"></div>
          <div class="attach_link_block_ic fl_l"></div>
          <div class="attach_link_block_te">
            <div class="fl_l">{translate=lang_218}:
              <a id="attatch_vote_title" style="text-decoration:none;cursor:default"></a>
            </div>
            <img class="fl_l cursor_pointer" style="margin-top:2px;margin-left:5px" src="{theme}/images/close_a_wall.png" onMouseOver="myhtml.title('1', '{translate=lang_213}', 'attach_vote_')" id="attach_vote_1" onClick="Votes.RemoveForAttach()" /></div>
          <input type="hidden" id="answerNum" value="2" />
        </div>
        <div class="clear"></div>
        <input id="vaLattach_files" type="hidden" />
        <div class="clear" style="margin-top:-5px;"></div>
        <div class="button_div fl_l margin_top_10" style=" margin-right:10px;">
          <button onClick="wall.send(); return false" id="wall_send">{translate=lang_32}</button>
        </div>
        <div style="margin-top:12px; margin-left:10px;">
          <div class="wall_attach_icon_smile fl_l" onClick="wall.attach_addsmile()" onMouseOver="myhtml.title('smile', '{translate=lang_219} {translate=lang_220}', 'attach_wall_')" id="attach_wall_smile">
            <div id="wall_attach_link"></div>
          </div>
          <div class="wall_attach_icon_photo fl_l" onClick="wall.attach_addphoto()" onMouseOver="myhtml.title('photo', '{translate=lang_219} {translate=lang_221}', 'attach_wall_')" id="attach_wall_photo">
            <div id="wall_attach_link"></div>
          </div>
          <div class="wall_attach_icon_video fl_l" onClick="wall.attach_addvideo()" onMouseOver="myhtml.title('video', '{translate=lang_219} {translate=lang_222}', 'attach_wall_')" id="attach_wall_video">
            <div id="wall_attach_link"></div>
          </div>
          <div class="wall_attach_icon_audio fl_l" onClick="wall.attach_addaudio()" onMouseOver="myhtml.title('audio', '{translate=lang_219} {translate=lang_223}', 'attach_wall_')" id="attach_wall_audio">
            <div id="wall_attach_link"></div>
          </div>
          <div class="wall_attach_icon_doc fl_l" onClick="wall.attach_addDoc()" onMouseOver="myhtml.title('doc', '{translate=lang_219} {translate=lang_224}', 'attach_wall_')" id="attach_wall_doc">
            <div id="wall_attach_link"></div>
          </div>
          <div class="wall_attach_icon_vote fl_l" onClick="$('#attach_block_vote').slideDown('fast');wall.attach_menu('close', 'wall_attach', 'wall_attach_menu');$('#vote_title').focus();$('#vaLattach_files').val($('#vaLattach_files').val()+'vote|start||')" onMouseOver="myhtml.title('vote', '{translate=lang_219} {translate=lang_218}', 'attach_wall_')" id="attach_wall_vote">
            <div id="wall_attach_link"></div>
          </div>
        </div>
      </div>
      <div class="clear"></div>
    </div>
    [/privacy-wall]
    <div id="wall_records" class="fl_l" >{records}[no-records]
      <div class="wall_none" [privacy-wall]style="border-top:0px"[/privacy-wall]>{translate=lang_225}</div>
      [/no-records]</div>
    [wall-link]<span id="wall_all_record"></span>
    <div onClick="wall.page('{user-id}'); return false" id="wall_l_href" class="cursor_pointer">
      <div class="photo_all_comm_bg wall_upgwi" id="wall_link">{translate=lang_226}</div>
    </div>
    [/wall-link] </div>
  <div class="clear"></div>
  [not-blacklist]
  <div style="margin-top:-60px;">
    <div align="center" style="width:500px; margin:auto">
      <img src="{theme}/images/black.png" />
      <div class="err_red" style="font-weight:normal;margin-top:-25px"><b>{name}</b> {translate=lang_227}</div>
    </div>
  </div>
  [/not-blacklist] </div>
