<p>
	{if $path}
		{$lang.answers.questions_for}:
		{foreach name=path from=$path item=item}
			{if $smarty.foreach.path.iteration > 1}
				{$item.name}
				{if !$smarty.foreach.path.last}->{/if}
			{/if}
		{/foreach}
	{else}
		{$filter_type}
	{/if}
</p>
<p>{$lang.answers.total_count}: {$count_records}</p>
{if $questions}
	{foreach name=q from=$questions item=item}
	<div class="qa_main overflowhidden" id="tr_q{$item.id}" style="margin-bottom: 10px;">
		<div class="float_left" style="margin-{$default_right}: 10px;">
			{if !$item.root_user}
				<a class="imgcanvas_container" href="{$item.profile_link}"><img alt="" class="imgcanvas" src="{$item.icon_url}" border="0"/></a>
			{else}
				<img alt="" class="imgcanvas" src="{$item.icon_url}" border="0"/>
			{/if}
			<br />
			{if !$item.root_user}
				<a href="{$item.profile_link}">{$item.name}</a>
			{else}
				{$item.name}
			{/if}
			<br />
			{$item.age} {$lang.answers.ans}
		</div>
		<div>
			<span class="text_head">{$lang.answers.asked}:</span> {if !$item.life_time}{$lang.answers.asked_now}{else}{$item.life_time} {$lang.answers.ago}{/if}&nbsp;|&nbsp;
			<span class="text_head">{$lang.answers.count_answers}:</span> {$item.answers_count}
			{if $item.is_open == '0'}
				&nbsp;|&nbsp;<span class="text_head">{$lang.answers.closed}:</span> {if !$item.closed_time}{$lang.answers.asked_now}{else}{$item.closed_time} {$lang.answers.ago}{/if}
			{/if}
			<p>
				<span class="text_head">{$lang.answers.question}:</span> {$item.text}
			</p><br />
			{if $item.details}<span class="text_head">{$lang.answers.details}:</span> <div class="wysiwyg_content">{$item.details}</div><br />{/if}
			<p>
				{if !$path}<span class="text_head">{$lang.answers.in}:</span> {$item.path}<br />{/if}
				{if $item.is_open == '0'}
					<br />{$lang.answers.best_answer}:</span> {$item.best_answer_text}
				{/if}
			</p>
			{if $user.0 != $item.id_owner && $item.is_open == 1}
			<a href="#" onclick=" showAnswerField('{$item.id}'); return false;" >{$lang.answers.answer_question}</a><br />
			{/if}
			<div id="add_answer_area{$item.id}" style="display:none;padding-{$default_left}: 120px;">
				<p>
                    <textarea class="redactor_normal" id="text_answer{$item.id}"></textarea>
                    <div id="bad_div_text_answer{$item.id}" class="bad_div_left"></div>    
                </p>
				<p><input type="button" value="{$lang.answers.button_answer}" onclick="answer('{$item.id}'); return false;" style="margin-top: 5px;"/></p>
			</div>
			{if $item.answers_count > '0'}
				<div class="search_form_hide_show" id="show_answers_{$item.id}">
					<div class="hide_line_text" id="show_link_{$item.id}" onclick="viewAnswers('{$item.id}'); return false;" style="cursor: pointer;" >
						{$lang.answers.show_answers}
						<ins id="show_image_{$item.id}" class="show_search_form sub_icon" title="{$lang.button.show_search_form}">&nbsp;</ins>
					</div>
				</div>                    
				<div id="hide_answers_{$item.id}" class="search_form_hide_show" style="display: none;">
					<div class="hide_line_text" id="hide_link_{$item.id}" onclick="cropAnswers('{$item.id}'); return false;" style="cursor: pointer;">
						{$lang.answers.hide_answers}
						<ins id="hide_image_{$item.id}" class="hide_search_form sub_icon" title="{$lang.button.hide_search_form}">&nbsp;</ins>
					</div>			
					<div id="tr_answer{$item.id}">
						<div id="answers_area{$item.id}"></div>
					</div>
				</div>
			{/if}
		</div>		
	</div>
	{/foreach}
{else}
<div>{$lang.answers.no_questions}</div>
{/if}
<div>
	<input type="hidden" id="q_page_num" value="{$form.page}" />
	<div class="search_link">
		<div class="sorting-long">
			<div class="b-page-n">	
				{foreach item=item from=$link_arr}
					{if $item.first_page eq 1}
						<a href="#" onclick="goToPage('{$item.page}'); return false;" class="first-page-act">&nbsp;</a>
					{elseif $item.first_page eq 2}
						<a href="javascript: void(0);" class="first-page">&nbsp;</a>
					{/if}
					
					{if $item.previous_page eq 1}
						<a href="#" onclick="goToPage('{$item.page}'); return false;" class="back-page-act" id="back-page-act_bottom" alt="{$lang.default_select.back}" title="{$lang.default_select.back}">&nbsp;</a>
					{elseif $item.previous_page eq 2}
						<a href="javascript: void(0);" class="back">&nbsp;</a>
					{/if}
					
					{if $item.selected}
						<a href="javascript: void(0);" onclick="goToPage('{$item.page}'); return false;" class="act-page">{$item.name}</a>
					{else}
						<a href="#" onclick="goToPage('{$item.page}'); return false;">{$item.name}</a>
					{/if}
					
					{if $item.delimiter}
						{$item.delimiter}
					{/if}
					
					{if $item.next_page eq 1}
						<a href="#" onclick="goToPage('{$item.page}'); return false;" class="next-page-act" id="next-page-act_bottom" alt="{$lang.default_select.next}" title="{$lang.default_select.next}">&nbsp;</a>
					{elseif $item.next_page eq 2}
						<a href="javascript: void(0);" class="next">&nbsp;</a>
					{/if}
						
					{if $item.last_page eq 1}
						<a href="#" onclick="goToPage('{$item.page}'); return false;" class="last-page-act">&nbsp;</a>
					{elseif $item.last_page eq 2}
						<a href="javascript: void(0);" class="last-page">&nbsp;</a>
					{/if}	
	{/foreach}
			</div>
		</div>
	</div>
	
	
</div>