<tr bgcolor="#ffffff">
    <td colspan="3" class="main_header_text" align="left" nowrap width="1%" style="padding-left:0px;">
        <input type=checkbox name=use value=1 {if $used}checked{/if}>&nbsp;{$header.use}
    </td>
</tr>
<tr bgcolor="#ffffff">
	<td align="left" nowrap width="1%" class="main_header_text">{$header.webmoney_currency}:&nbsp;</td>
    <td class="main_content_text" align="left" colspan="2">
        <select name="currency" onchange="ShowContent(this);">
            {foreach item=item from=$currency name=currency}
                <option value="{$item.id}" {if $item.id eq $current}selected{/if}>{$item.value}</option>
            {/foreach}
        </select>
    </td>
</tr>
{foreach item=item from=$currency name=currency}
    {assign var=tmp value=0}
    {foreach item=dat from=$data name=data}
        {if $dat.currency_id == $item.id}
        {assign var=tmp value=1}
        <tr currency="{$item.id}" class="currency" bgcolor="#ffffff" style="{if $dat.currency_id eq $item.id}display:table-row;{else}display:none;{/if}">
            <td align="left" nowrap width="1%" class="main_header_text">{$header.webmoney_seller_id} ({$item.value}):&nbsp;</td>
            <td class="main_content_text" align="left" nowrap width="1%">
                <input type="text" size="30" name="value[{$item.id}]" value="{$dat.value}">
            </td>
            <td class="main_header_text" align="left" width="70%">&nbsp;</td>
        </tr>
        {/if}
    {/foreach}
    {if $tmp==0}
        <tr currency="{$item.id}" class="currency" bgcolor="#ffffff" style="{if $dat.currency_id eq $item.id}display:table-row;{else}display:none;{/if}">
            <td align="left" nowrap width="1%" class="main_header_text">{$header.webmoney_seller_id} ({$item.value}):&nbsp;</td>
            <td class="main_content_text" align="left" nowrap width="1%">
                <input type="text" size="30" name="value[{$item.id}]" value="">
            </td>
            <td class="main_header_text" align="left" width="70%">&nbsp;</td>
        </tr>
    {/if}
{/foreach}

<tr bgcolor="#ffffff">
	<td align="left" nowrap width="1%" class="main_header_text">{$header.webmoney_secret_key}:&nbsp;</td>
	<td class="main_content_text" align="left" nowrap width="1%"><input type="text" size="30" name="secret_key" value="{$secret_key}"></td>
	<td class="main_header_text" align="left" width="70%">&nbsp;</td>
</tr>

{literal}
<script type="text/javascript">
    function ShowContent(obj){
        var id = $(obj).find('option:selected').val();
        if(id != 0 && id != undefined){
            $('tr .currency').hide();
            $('tr[currency='+id+']').show();
        }
    }
	$('select[name="currency"]').each(function() { 
		var value= $(this).attr('value');
			$('tr .currency').hide();
            $('tr[currency='+value+']').show();
	});
</script>
{/literal}