<script type="text/javascript" src="{$this->ipsclass->vars['board_url']}/jscripts/ipb_profile.js"></script>
<script type='text/javascript' src="{$this->ipsclass->vars['board_url']}/jscripts/ips_profile_portal.js"></script>
<script type="text/javascript" src="{$this->ipsclass->vars['board_url']}/jscripts/ipb_topic.js"></script>
<!--We (?:c|sh)ould use CSS for this.-->
<table cellspacing='4' cellpadding='0' width='100%'  border='0'>
<tr>
	<td style='width:210px' valign='top'>
	<!-- LEFT TABLE -->
		<div class="borderwrap" style='padding:1px'>
			<div class="pp-title">{$this->ipsclass->lang['m_profile_title']}</div>
			<div class='pp-header'>{$this->ipsclass->lang['get_photo']}</div>
			<table cellpadding='1' cellspacing='0' width='100%'>
			<tr>
				<td width='60%' class='row1' style='padding:3px;margin-bottom:0px' valign='middle' align='center'>
				<!-- Personal Photo -->
					<img id='pp-main-photo' src='{$member['pp_main_photo']}' width='{$member['pp_main_width']}' height='{$member['pp_main_height']}' alt='' />
				<!-- / Personal Photo -->
				<!-- Quick contact -->
				<if="$this->ipsclass->member['id'] AND ( $member['id'] != $this->ipsclass->member['id'])">
					<div style='margin-top:10px;margin-bottom:6px'>
						<div id='pp-friend-wrap'>
							<!-- Add / remove friend added via JS -->
						</div>
						<img src='{$this->ipsclass->vars['img_url']}/folder_profile_portal/send_pm_small.png' alt='' border='0' /> <a href="{$this->ipsclass->base_url}act=Msg&amp;CODE=4&amp;MID={$member['id']}">{$this->ipsclass->lang['pm']}</a>
					</div>
				</if>
				<!-- / Quick contact -->
				</td>
			</tr>
			</table>
			
			<if="$this->ipsclass->vars['pp_allow_member_rate']">
				<!-- Rating -->
				<div class='pp-header'>{$this->ipsclass->lang['rating']}</div>
				<div class='row1' style='padding:6px; margin-bottom:1px; padding-left:10px; text-align: center' id='pp-rating-wrapper'>
					&nbsp;
				</div>
				<!-- / Rating -->
			</if>
			
			<!-- Options -->
			<div class='pp-header'>{$this->ipsclass->lang['options']}</div>
			<div class='row1' style='padding:6px; margin-bottom:1px; padding-left:10px; text-align: center'>
				<div class='popmenubutton-new' id='profile-options'>{$this->ipsclass->lang['options']}</div>
			</div>
			<!-- / Options -->
			
			<!-- Personal Statement -->
			<div class='pp-header'>{$this->ipsclass->lang['m_personal_statement']}</div>
			<div class='row1' style='padding:6px; margin-bottom:1px; padding-left:10px' id='pp-personal_statement'>
				<if="$member['pp_bio_content']">
					{$member['pp_bio_content']}
					<else />
					<em>{$member['members_display_name']} {$this->ipsclass->lang['m_no_statement']}.</em>
				</if>
				<if="$member['_website']">
					<div style='padding-top:5px'>
						<if="strlen($member['_website']) > 30">
							<a href='{$member['_website']}' target='_blank'>{$this->ipsclass->lang['m_visit_website']}</a>
						<else />
							<a href='{$member['_website']}' target='_blank'>{$member['_website']}</a>
						</if>
					</div>
				</if>
			</div>
			<!-- / Personal Statement -->
			
			<!-- Personal Info -->
			<div class='pp-header'>{$this->ipsclass->lang['m_personal_info']}</div>
			<div class='row1' style='padding:6px; margin-bottom:1px; padding-left:10px'>{$member['members_display_name']}</div>
			<if="$member['_title']!=''">
				<div class='row1' style='padding:6px; margin-bottom:1px; padding-left:10px'>{$member['_title']}</div>
			</if>
			<div class='row1' style='padding:6px; margin-bottom:1px; padding-left:10px' id='pp-entry-age-wrap'>
				<if="$member['_age'] > 0">
					 <span id='pp-entry-age-text'>{$member['_age']}</span> <span id='pp-entry-age-yearsold'>{$this->ipsclass->lang['m_years_old']}</span>
				<else />
					<span id='pp-entry-age-text'>{$this->ipsclass->lang['m_age_unknown']}</span> <span id='pp-entry-age-yearsold' style='display:none'>{$this->ipsclass->lang['m_years_old']}</span>
				</if>
			</div>
			<div class='row2' style='padding:6px; margin-bottom:1px; padding-left:10px'>
				<div id='pp-entry-gender-wrap'>
					<if="$member['pp_gender']">
						<span id='pp-entry-gender-imgwrap'>{$member['_pp_gender_image']}</span> <span id='pp-entry-gender-text'>{$member['_pp_gender_text']}</span>
					<else />
						<span id='pp-entry-gender-imgwrap'>{$member['_pp_gender_image']}</span> <span id='pp-entry-gender-text'>{$this->ipsclass->lang['m_no_gender']}</span>
					</if>
				</div>
				<if="$member['id'] == $this->ipsclass->member['id'] AND $this->ipsclass->member['g_edit_profile']==1">
					<div class='popupmenu-new' id='pp-entry-gender-wrap_menu' style='display:none;width:162px'>
						<div class='popupmenu-item'><img src='{$this->ipsclass->vars['img_url']}/folder_profile_portal/gender_male.png' alt='' border='0' /> <a href='#' onclick="ips_personal_portal.save_settings( 'gender', { 'pp_gender' : 'male' }, ''); return false;">{$this->ipsclass->lang['m_gender_as_male']}</a></div>
						<div class='popupmenu-item'><img src='{$this->ipsclass->vars['img_url']}/folder_profile_portal/gender_female.png' alt='' border='0' /> <a href='#' onclick="ips_personal_portal.save_settings( 'gender', { 'pp_gender' : 'female' }, ''); return false;">{$this->ipsclass->lang['m_gender_as_female']}</a></div>
						<div class='popupmenu-item-last'><img src='{$this->ipsclass->vars['img_url']}/folder_profile_portal/gender_mystery.png' alt='' border='0' /> <a href='#' onclick="ips_personal_portal.save_settings( 'gender', { 'pp_gender' : 'mystery' }, ''); return false;">{$this->ipsclass->lang['m_gender_as_none']}</a></div>
					</div>
				</if>
			</div>
			<div class='row2' style='padding:6px; margin-bottom:1px; padding-left:10px'>
				<div id='pp-entry-location-wrap'>
					<if="$member['location']">
						<span id='pp-entry-location-text'>{$member['location']}</span>
					<else />
						<span id='pp-entry-location-text'>{$this->ipsclass->lang['m_location_unknown']}</span>
					</if>
				</div>
				<if="$member['id'] == $this->ipsclass->member['id'] AND $this->ipsclass->member['g_edit_profile']==1">
					<div class='popupmenu-new' id='pp-entry-location-wrap_menu' style='display:none;width:auto'>
						<div class='popupmenu-item-last'>
							<fieldset>
								<legend>{$this->ipsclass->lang['m_enter_location']}</legend>
								<input type='text' size='20' maxlength='200' name='location' id='pp-location' value='{$member['location']}' /> <input class='button' type='button' value='{$this->ipsclass->lang['m_save_button']}' onclick="ips_personal_portal.save_settings( 'location', {}, 'pp-location'); return false;" />
							</fieldset>
						</div>
					</div>
				</if>
			</div>
			<div class='row1' style='padding:6px; margin-bottom:0px; padding-left:10px'>
				<div id='pp-entry-born-wrap'>
					<if="$member['bday_day'] AND $member['bday_year'] AND $member['_bday_month']">
						<span id='pp-entry-born-pretext'>{$this->ipsclass->lang['born_key']}</span> <span id='pp-entry-born-text'>{$member['_bday_month']}-{$member['bday_day']}-{$member['bday_year']}</span>
					<else />
						<span id='pp-entry-born-text'>{$this->ipsclass->lang['m_bday_unknown']}</span>
					</if>
				</div>
				<if="$member['id'] == $this->ipsclass->member['id'] AND $this->ipsclass->member['g_edit_profile']==1">
					<div class='popupmenu-new' id='pp-entry-born-wrap_menu' style='display:none;width:auto'>
						<div class='popupmenu-item-last'>
							<fieldset>
								<legend>{$this->ipsclass->lang['m_enter_bdate']}</legend>
								<select name='_b_month' id='pp_b_month'>{$member['_birthday_month']}</select>								
								<select name='_b_day' id='pp_b_day'>{$member['_birthday_day']}</select>
								<select name='_b_year' id='pp_b_year'>{$member['_birthday_year']}</select>
								<input class='button' type='button' value='{$this->ipsclass->lang['m_save_button']}' onclick="ips_personal_portal.save_settings( 'birthdate', {}, ''); return false;" />
							</fieldset>
						</div>
					</div>
				</if>
			</div>
			<!-- WARN -->
			<if="$member['_warn_data']">
				<div class='row1' style='padding:6px; margin-bottom:0px; padding-left:10px'>
					{$member['_warn_data']}
				</div>
			</if>
			<!-- / WARN -->
			<!-- / Personal Info -->
			
			<!-- Interests -->
			<if="$member['_interests']">
				<div class='pp-header'>{$this->ipsclass->lang['interests']}</div>
				<div class='row1' style='padding:6px; margin-bottom:1px; padding-left:10px' id='pp-personal_statement'>
					{$member['_interests']}
				</div>
			</if>
			<!-- / Interests -->
				
			<!-- Custom Fields -->
			<if="is_array( $member['custom_fields'] ) AND count( $member['custom_fields'] )">
				<div class='pp-header'>{$this->ipsclass->lang['m_other_info']}</div>
				<foreach="$member['custom_fields'] as $data">
					<div class='row1' style='padding:6px; margin-bottom:1px; padding-left:10px'>{$data['name']}: {$data['data']}</div>
				</foreach>
			</if>
			<!-- / Custom Fields -->
			
			<!-- Statistics --> 
			<div class='pp-header'>{$this->ipsclass->lang['m_stats_title']}</div>
			<div class='row1' style='padding:6px; margin-bottom:1px; padding-left:10px'>{$this->ipsclass->lang['m_member_since']} {$member['_joined']}</div>
			<div class='row1' style='padding:6px; margin-bottom:1px; padding-left:10px'>{$this->ipsclass->lang['m_profile_views']} {$member['_pp_profile_views']}<span class='pp-tiny-text'>*</span></div>
			<div class='row1' style='padding:6px; margin-bottom:1px; padding-left:10px'>
				{$this->ipsclass->lang['m_last_seen']} {$member['_last_active']}
				<if="$member['_online_location']">
					<br />{$member['_online_location']}
				</if>
			</div>
			
			<if="$member['_local_time']">
				<div class='row2' style='padding:6px; margin-bottom:1px; padding-left:10px'>{$this->ipsclass->lang['m_local_time_is']} {$member['_local_time']}</div>
			</if>
			<div class='row1' style='padding:6px; margin-bottom:1px; padding-left:10px'>{$member['_posts']} {$this->ipsclass->lang['m_bit_posts']} ({$member['_posts_day']} {$this->ipsclass->lang['posts_per_day']})</div>
			<!-- / Statistics -->
			
			<!-- Contact Information -->
			<div class='pp-header'>{$this->ipsclass->lang['m_contact_info']}</div>
			<div class='row1' style='padding:6px; margin-bottom:1px; padding-left:10px'>
				<div id='pp-entry-contact-wrap-aim'>
					<{PRO_AIM}> <span id='pp-entry-contact-entry-aim'>{$member['_aim_name']}</span>
				</div>
			</div>
			<if="$member['id'] == $this->ipsclass->member['id'] AND $this->ipsclass->member['g_edit_profile']==1">
				<div class='popupmenu-new' id='pp-entry-contact-wrap-aim_menu' style='display:none;width:auto'>
					<div class='popupmenu-item-last'>
						<fieldset>
							<legend>{$this->ipsclass->lang['m_enter_aim']}</legend>
							<input type='text' size='20' maxlength='200' name='value' id='pp-contact-value-aim' value='{$member['aim_name']}' /> <input class='button' type='button' value='{$this->ipsclass->lang['m_save_button']}' onclick="ips_personal_portal.save_settings( 'contact', { 'contacttype' : 'aim' }, 'pp-contact-value-aim'); return false;" />
						</fieldset>
					</div>
				</div>
			</if>
			
			<div class='row1' style='padding:6px; margin-bottom:1px; padding-left:10px'>
				<div id='pp-entry-contact-wrap-yahoo'>
					<{PRO_YIM}> <span id='pp-entry-contact-entry-yahoo'>{$member['_yahoo']}</span>
				</div>
			</div>
			<if="$member['id'] == $this->ipsclass->member['id'] AND $this->ipsclass->member['g_edit_profile']==1">
				<div class='popupmenu-new' id='pp-entry-contact-wrap-yahoo_menu' style='display:none;width:auto'>
					<div class='popupmenu-item-last'>
						<fieldset>
							<legend>{$this->ipsclass->lang['m_enter_yahoo']}</legend>
							<input type='text' size='20' maxlength='200' name='value' id='pp-contact-value-yahoo' value='{$member['yahoo']}' /> <input type='button' class='button' value='{$this->ipsclass->lang['m_save_button']}' onclick="ips_personal_portal.save_settings( 'contact', { 'contacttype' : 'yahoo' }, 'pp-contact-value-yahoo'); return false;" />
						</fieldset>
					</div>
				</div>
			</if>
			
			<div class='row1' style='padding:6px; margin-bottom:1px; padding-left:10px'>
				<div id='pp-entry-contact-wrap-icq'>
					<{PRO_ICQ}> <span id='pp-entry-contact-entry-icq'>{$member['_icq_number']}</span>
				</div>
			</div>
			<if="$member['id'] == $this->ipsclass->member['id'] AND $this->ipsclass->member['g_edit_profile']==1">
				<div class='popupmenu-new' id='pp-entry-contact-wrap-icq_menu' style='display:none;width:auto'>
					<div class='popupmenu-item-last'>
						<fieldset>
							<legend>{$this->ipsclass->lang['m_enter_icq']}</legend>
							<input type='text' size='20' maxlength='200' name='value' id='pp-contact-value-icq' value='{$member['icq_number']}' /> <input type='button' class='button' value='{$this->ipsclass->lang['m_save_button']}' onclick="ips_personal_portal.save_settings( 'contact', { 'contacttype' : 'icq' }, 'pp-contact-value-icq'); return false;" />
						</fieldset>
					</div>
				</div>
			</if>
			
			<div class='row1' style='padding:6px; margin-bottom:1px; padding-left:10px'>
				<div id='pp-entry-contact-wrap-msn'>
					<{PRO_MSN}> <span id='pp-entry-contact-entry-msn'>{$member['_msn_name']}</span>
				</div>
			</div>
			<if="$member['id'] == $this->ipsclass->member['id'] AND $this->ipsclass->member['g_edit_profile']==1">
				<div class='popupmenu-new' id='pp-entry-contact-wrap-msn_menu' style='display:none;width:auto'>
					<div class='popupmenu-item-last'>
						<fieldset>
							<legend>{$this->ipsclass->lang['m_enter_msn']}</legend>
							<input type='text' size='20' maxlength='200' name='value' id='pp-contact-value-msn' value='{$member['msnname']}' /> <input type='button' class='button' value='{$this->ipsclass->lang['m_save_button']}' onclick="ips_personal_portal.save_settings( 'contact', { 'contacttype' : 'msn' }, 'pp-contact-value-msn'); return false;" />
						</fieldset>
					</div>
				</div>
			</if>
			
			<div class='row1' style='padding:6px; margin-bottom:1px; padding-left:10px'>
				<{PRO_CONTACT}> <a href="{$this->ipsclass->base_url}act=Msg&amp;CODE=4&amp;MID={$member['id']}">{$this->ipsclass->lang['pm']}</a>
			</div>
			<div class='row1' style='padding:6px; padding-left:10px'>
				<{PRO_CONTACT}> {$member['_email']}
			</div>
			<!-- / Contact Information -->
		</div>
		<div class='pp-tiny-text'>{$this->ipsclass->lang['m_profile_views_desc']}</div>
		
		<!-- sssh.. ugly hack to stop IE collapsing this column under short widths -->
		<img src='{$this->ipsclass->vars['img_url']}/blank.gif' width='210' height='1' alt='' />
		
	<!-- / LEFT TABLE -->
	</td>
	<td valign='top'>
	<!-- MAIN TABLE -->
		<div class='pp-name'>
			<table cellpadding='0' cellspacing='0' width='100%'>
			<tr>
				<td width='1%'>{$member['_avatar']}</td>
				<td width='98%' style='padding-left:10px'>
					<h3 style='font-size:20px'>{$member['members_display_name']}</h3>
					<strong>{$member['g_title']}</strong>
					<p>{$member['_member_rank_img']}</p>
				</td>
			</tr>
			</table>
		</div>
		
		<br />
		
		<!-- My Stuff -->
		<div class='pp-tabwrap'>
			<foreach="$tabs as $tab">
				<div class='pp-taboff' id='pp-content-tab-{$tab['plugin_key']}'>{$tab['_lang']}</div>
			</foreach>
				<div class='pp-taboff' id='pp-content-tab-comments'>{$this->ipsclass->lang['m_tab_comments']}</div>
				<div class='pp-taboff' id='pp-content-tab-friends'>{$this->ipsclass->lang['m_tab_friends']}</div>
				<if="$member['id'] == $this->ipsclass->member['id'] OR ( $this->ipsclass->member['g_is_supmod']==1 AND $member['mgroup'] != $this->ipsclass->vars['admin_group'] )">
					<div class='pp-taboff' id='pp-content-tab-settings'>{$this->ipsclass->lang['m_tab_settings']}</div>
				</if>
		</div>
		<div class="pp-tabclear">{$this->ipsclass->lang['m_title_content']}</div>
		<div class="borderwrap">	
			<div id='pp-main-tab-content' class='pp-contentbox-back'>
				{$default_tab_content}
			</div>
			
		</div>
		<!-- / My Stuff -->
		
	<!-- / MAIN TABLE -->
	</td>
	<if="$member['pp_setting_count_visitors'] > 0 OR $member['pp_setting_count_comments'] > 0 OR $member['pp_setting_count_friends'] > 0">
		<td style='width:210px;' valign='top'>
		<!-- RIGHT TABLE -->
		<!-- Recent Visitors -->
		<if="$member['pp_setting_count_visitors'] > 0">
			<div class="borderwrap" style='padding:1px'>
				<div class="pp-title">{$this->ipsclass->lang['m_title_visitors']}</div>
				<if="is_array($visitors) and count($visitors)">
					<foreach="$visitors as $visitor">
						<div class='pp-mini-content-entry'>
							<div class='pp-image-thumb-wrap-floatright'><img src='{$visitor['pp_thumb_photo']}' width='{$visitor['pp_thumb_width']}' height='{$visitor['pp_thumb_height']}' alt='' /></div>
							<div style='position:absolute;z-index:2;'>
								{$visitor['_pp_gender_image']} <strong><if="$visitor['id']"><a href='{$this->ipsclass->base_url}showuser={$visitor['id']}'></if>{$visitor['members_display_name_short']}<if="$visitor['id']"></a></if></strong>
							</div>
							<br />
							<br />
							<div class='pp-tiny-text'>{$visitor['_pp_online_image']} {$visitor['_visited_date']}</div>
						</div>
					</foreach>
				<else />
					<div class='post1' style='padding:6px'>
						<em>{$member['members_display_name']} {$this->ipsclass->lang['m_visitors_none']}.</em>
					</div>
				</if>
			</div>
		</if>
		<!-- / Recent Visitors -->
	
		<br />
	
		<!-- Comments -->
		<if="$member['pp_setting_count_comments'] > 0">
			<div class="borderwrap" style='padding:1px'>
				<div class="pp-title">{$this->ipsclass->lang['m_title_comments']}</div>
					<div id='pp-comments-wrap'>
						$comments
					</div>
				<if="$this->ipsclass->member['id']">
					<div class='popmenubutton-new' id='pp-comment-wrap' style='margin:2px'>
						<img src='{$this->ipsclass->vars['img_url']}/folder_profile_portal/comment_add.png' alt='' border='0' /> {$this->ipsclass->lang['m_add_comment']}
					</div>
					<div class='popupmenu-new' id='pp-comment-wrap_menu' style='display:none;width:auto;'>
						<div class='popupmenu-item-last'>
							<fieldset>
								<legend>{$this->ipsclass->lang['m_enter_comment']}</legend>
								<textarea rows='8' cols='17' name='comment' id='pp-comment-textarea'></textarea>
								<div class='pp-tiny-text' style='text-align:right'>
									{$this->ipsclass->lang['m_max_chars']}
									<input type='button' class='button' value='{$this->ipsclass->lang['m_save_button']}' onclick="ips_personal_portal.save_comment(); return false;" />
								</div>
							</fieldset>
						</div>
					</div>
					<script type='text/javascript'>
					//<![CDATA[
						ipsmenu.register( "pp-comment-wrap" );
					//]]>
					</script>
				</if>
			</div>
		</if>
		<!-- / Comments -->
	
		<br />
	
		<!-- Friends -->
		<if="$member['pp_setting_count_friends'] > 0">
			<div class="borderwrap" style='padding:1px'>
				<div class="pp-title">{$this->ipsclass->lang['m_title_friends']}</div>
				<if="is_array($friends) and count($friends)">
					<foreach="$friends as $friend">
						<div class='pp-mini-content-entry'>
							<div class='pp-image-thumb-wrap-floatright'><img src='{$friend['pp_thumb_photo']}' width='{$friend['pp_thumb_width']}' height='{$friend['pp_thumb_height']}' alt='' /></div>
							<div style='position:absolute;z-index:2;'>
								{$friend['_pp_gender_image']} <strong><a href='{$this->ipsclass->base_url}showuser={$friend['id']}'>{$friend['members_display_name_short']}</a></strong>
							</div>
							<br />
							<div class='pp-tiny-text'>
								{$friend['posts']} {$this->ipsclass->lang['m_bit_posts']}
								<br />{$friend['_pp_online_image']} {$friend['_last_active']}
							</div>
						</div>
					</foreach>
					<div class='pp-mini-content-entry-noheight' style='text-align:right'>
						<a href='#' onclick="ips_personal_portal.tab_load( 'friends' )">{$this->ipsclass->lang['m_view_friends']}</a>
					</div>
				<else />
					<div class='post1' style='padding:6px'>
						<em>{$this->ipsclass->lang['m_no_friends']}.</em>
					</div>
				</if>
			</div>
		</if>
		<!-- / Friends -->
		<!-- sssh.. ugly hack to stop IE collapsing this column under short widths -->
		<img src='{$this->ipsclass->vars['img_url']}/blank.gif' width='210' height='1' alt='' />
		<!-- / RIGHT TABLE -->
		</td>
	</if>
</tr>
</table>
<script type='text/javascript'>
//<![CDATA[
// Settings
ips_personal_portal.settings['allow_rating']      = parseInt("{$this->ipsclass->vars['pp_allow_member_rate']}");
ips_personal_portal.settings['default_rating']    = parseInt("{$member['_pp_rating_real']}");
ips_personal_portal.settings['member_id']         = parseInt("{$member['id']}");
ips_personal_portal.settings['is_super_mod']      = parseInt("{$member['g_is_supmod']}");
ips_personal_portal.settings['viewer_id']         = parseInt("{$this->ipsclass->member['id']}");
ips_personal_portal.settings['edit_allowed']	  = parseInt("{$this->ipsclass->member['g_edit_profile']}");
ips_personal_portal.settings['img_base_url']      = ipb_var_image_url + '/folder_profile_portal';
ips_personal_portal.settings['img_menu_icon']     = "{$this->ipsclass->vars['img_url']}/menu_action_down.gif";
ips_personal_portal.settings['img_friend_remove'] = "{$this->ipsclass->vars['img_url']}/folder_profile_portal/friend_remove_small.png";
ips_personal_portal.settings['img_friend_add']    = "{$this->ipsclass->vars['img_url']}/folder_profile_portal/friend_add_small.png";
ips_personal_portal.settings['default_tab']       = '{$default_tab}';
// Languages
ips_personal_portal.languages['rate_me']          = '<span class="desc">{$this->ipsclass->lang['m_rate_me']}</span>';
ips_personal_portal.languages['friend_add']       = '{$this->ipsclass->lang['m_friend_add']}';
ips_personal_portal.languages['friend_remove']    = '{$this->ipsclass->lang['m_friend_remove']}';
ips_personal_portal.languages['img_alt_rate']     = '{$this->ipsclass->lang['js_img_alt_rate_p']}';
ips_personal_portal.languages['gender_male']      = '{$this->ipsclass->lang['js_gender_male']}';
ips_personal_portal.languages['gender_female']    = '{$this->ipsclass->lang['js_gender_female']}';
ips_personal_portal.languages['gender_mystery']   = '{$this->ipsclass->lang['js_gender_mystery']}';
ips_personal_portal.languages['loading_tab']      = '{$this->ipsclass->lang['js_loading_tab']}';
ips_personal_portal.languages['deleting_comment'] = '{$this->ipsclass->lang['js_deleting_comment']}';
ips_personal_portal.languages['saving_comment']   = '{$this->ipsclass->lang['js_saving_comment']}';
ips_personal_portal.languages['age_unknown']   	  = '{$this->ipsclass->lang['m_age_unknown']}';
// INIT
ips_personal_portal.init();
<if="$default_tab_content == ''">
// Load tab
ips_personal_portal.load_content_tab( '{$default_tab}' );
</if>
menu_build_menu(
"profile-options", new Array(
							<if="$this->ipsclass->member['id'] != 0 AND $this->ipsclass->member['id'] != $member['id']">
							'<img src="style_images/<#IMG_DIR#>/profile_item.gif" border="0" />' + " <a href='{$this->ipsclass->base_url}act=usercp&amp;CODE=ignore&amp;uid={$member['id']}'>{$this->ipsclass->lang['ignore_user']}</a>",
							</if>
							<if="$this->ipsclass->member['g_is_supmod'] == 1">
							'<img src="style_images/<#IMG_DIR#>/profile_item.gif" border="0" />' + " <a href='{$this->ipsclass->base_url}act=mod&amp;CODE=editmember&amp;auth_key={$this->ipsclass->md5_check}&amp;member={$member['id']}'>{$this->ipsclass->lang['supmod_edit_member']}</a>",
							</if>
							<if="$this->ipsclass->vars['auth_allow_dnames'] == 1">
							'<img src="style_images/<#IMG_DIR#>/profile_item.gif" border="0" />' + " <a href='#' onclick='return profile_dname_history({$member['id']})'>{$this->ipsclass->lang['dname_title']}</a>",
							</if>
							<if="$this->ipsclass->member['id'] != 0 AND $this->ipsclass->member['id'] != $member['id']">
							'<img src="style_images/<#IMG_DIR#>/profile_item.gif" border="0" />' + " <a href='{$this->ipsclass->base_url}act=Msg&amp;CODE=02&amp;MID={$member['id']}'>{$this->ipsclass->lang['op_add_pm_to_block']}</a>",
							</if>
 							'<img src="style_images/<#IMG_DIR#>/profile_item.gif" border="0" />' + " <a href='{$this->ipsclass->base_url}act=Search&amp;CODE=getalluser&amp;mid={$member['id']}'>{$this->ipsclass->lang['find_posts']}</a>",
				 			'<img src="style_images/<#IMG_DIR#>/profile_item.gif" border="0" />' + " <a href='{$this->ipsclass->base_url}act=Search&amp;CODE=gettopicsuser&amp;mid={$member['id']}'>{$this->ipsclass->lang['find_member_topics']}</a>"
) );

//]]>
</script>
<if="is_array( $this->ipsclass->member['_cache']['friends'] ) AND in_array( $member['id'], array_keys( $this->ipsclass->member['_cache']['friends'] ) )">
	<script type='text/javascript'>
	//<![CDATA[
		ips_personal_portal.show_friend_add_or_remove( 0 );
	//]]>
	</script>
<else />
	<script type='text/javascript'>
	//<![CDATA[
		ips_personal_portal.show_friend_add_or_remove( 1 );
	//]]>
	</script></if>