function ShowForexRate()
{
	function AddCurrencyRate(Currency, Rate)
	{
		document.writeln('<tr bgcolor="#ffffff"><td class=BoxItem>&nbsp;', Currency, '</td><td class=BoxItem align=right>', Rate, '&nbsp;</td></tr>');
	}
	if (!AddForexHeader('Forex', '', 3, PageHost.concat('')))
		return;

	if (typeof(vForexs) !='undefined' && typeof(vCosts) !='undefined') 
	{
		for(var i=0;i<vForexs.length;i++)
			AddCurrencyRate(vForexs[i], vCosts[i]);
	}
	AddForexFooter();
}
ShowForexRate();

function AddForexHeader(Name, Header, Buttons, Symbol, AddChildTable)
{
	//document.writeln('<table width="124px" border=0 cellspacing=0 cellpadding=1 bgcolor="#1E5C99"><tr><td>');

	if (Header!='')
	{
		document.writeln('<table width="124px" border=0 cellspacing=0 cellpadding=0>');
		document.writeln('<tr>');

		if (typeof(Symbol)!='undefined')
		{
			document.writeln('<td height=16 class=BoxHeader><img src="', Symbol, '" border=0></td>');
		}

		document.writeln('<td height=16 width="124px" align=left class=BoxHeader>&nbsp;', Header, '</td>');

		if ((Buttons & 1) && fDSp)
		{
			document.write('<td width=15 align=right>');
			document.write('<a href="JavaScript:ItemMinimize(\x27', Name, '\x27)">');
			document.write('<img src="/Images/Service/min.gif" name="IDI_', Name, '" border=0 alt="Minimize | Maximize">');
			document.write('</a></td>');
		}

		document.writeln('</tr></table>');
	}

	//document.writeln('<table width="100%" border=0 cellspacing=0 cellpadding=0 id="tIDM_', Name, '"><tr><td><div class=BreakLine id="IDM_', Name, '">');
	document.writeln('<table width="124px" border=0 cellspacing=0 cellpadding=0><tr><td id="IDM_', Name, '">');
	document.writeln('<table width="124px" border=0 cellspacing=0 cellpadding=0><tr><td>');
	if (typeof(AddChildTable)=='undefined')
	{
		document.writeln('<div style="position:related;height:82;width:100%;">');
		document.writeln('<table align=center width="100%" cellspacing=0 cellpadding=0 border=1>');
		LastChild = 1;
	}
	else
	{
		LastChild = 0;
	}
	return true;
}

function AddForexFooter()
{
	document.writeln('</table>');
	document.writeln('</div>');
	document.writeln('</td></tr>');
	//document.writeln('<tr bgcolor="#ffffff"><td colspan=1 class=BoxItem align=center><i>(Ngu&#7891;n: Ng&#226;n h&#224;ng<br> Ngo&#7841;i th&#432;&#417;ng VN)</td></tr>');
	document.writeln('</table>');
	document.writeln('</td></tr></table>');
	//document.writeln('</td></tr></table>');
}

