{if $langcount >= 2}
	{*{#SelLang#}&nbsp;*}
	{strip}
	{foreach from=$languages item=lang name=ls}
	{if $lang}
		{if $smarty.session.lang==$lang}
        {assign var=lac value="Lang_$lang"}
        <span class="flag_active">{$config_vars.$lac}&nbsp;<img class="absmiddle" src="{$imgpath}/flags/{$lang}.png" border="0" alt="{#LangImgAlt#}" />&nbsp;</span>
		{else}
        {assign var=laci value="Lang_$lang"}
        <a style="font-weight:normal" title="{#LangImgAlt#}" href="index.php?lang={$lang}&amp;lredirect={redir|regex_replace:"/lang=([a-zA-Z0-9]*)/":"lang=$lang"|base64encode}">{*{$config_vars.$laci}*}&nbsp;<img class="absmiddle" src="{$imgpath}/flags/{$lang}.png" border="0" alt="{#LangImgAlt#}" /></a>
		{if !$smarty.foreach.ls.last}&nbsp;{/if}
        {/if}
	{/if}
	{/foreach}
	{/strip}
{/if}