function ShowGoldPrice()
{
	function AddGoldPrice(Currency, Rate)
	{
		document.writeln('<tr bgcolor="#ECF9DD"><td class=BoxItem><font color="#3A4D26">&nbsp;', Currency, '</font></td><td class=BoxItem align=right><font color="#3A4D26">', Rate, '&nbsp;</font></td></tr>');
	}
	if (!AddHeader('Gold', 'Gi&#225; v&#224;ng 9999', 3, PageHost.concat('/Service/i_Stock.gif')))
		return;
	if (typeof(vGoldBuy) !='undefined') AddGoldPrice('Mua', vGoldBuy);
	if (typeof(vGoldSell)!='undefined') AddGoldPrice('B&#225;n', vGoldSell);
	document.writeln('<tr bgcolor="#ECF9DD"><td colspan=2 class=BoxItem align=center><i>(Ngu&#7891;n: Cty SJC H&#224; N&#7897;i)</td></tr>');
	AddFooter();
}
ShowGoldPrice();

function AddHeader(Name, Header, Buttons, Symbol, AddChildTable)
{
	document.writeln('<table width="86%" border=0 cellspacing=0 cellpadding=1 bgcolor="#DEEBCE"><tr><td>');

	if (Header!='')
	{
		document.writeln('<table width="100%" 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="100%" align=left class=BoxHeader><font color="#603412">&nbsp;', Header, '</font></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/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="100%" border=0 cellspacing=0 cellpadding=0><tr><td id="IDM_', Name, '">');
	if (typeof(AddChildTable)=='undefined')
	{
		document.writeln('<table align=center width="100%" cellspacing=1 cellpadding=0 border=0>');
		LastChild = 1;
	}
	else
	{
		LastChild = 0;
	}
	return true;
}

function AddFooter()
{
	if (LastChild)
	{
		document.writeln('</table></td></tr></table></td></tr></table>');
	}
	else
	{
		document.writeln('</td></tr></table></td></tr></table>');
	}
}
