﻿function ShowGoldPrice()
{
	var strHtml = "";
//	var obj = document.getElementById("gold");
	function AddGoldPrice(Currency, Rate)
	{
			strHtml += "<tr><td align='left'>&nbsp;"+Currency+"</td><td align='right'>&nbsp;"+Rate+"</td></tr>";
			strHtml += "<tr><td colspan='2' ><hr color='#f3e63e' size='0.2'></td></tr>";
	}
	function AddHeader()
	{
		strHtml += '<table bordercolor="#C0C0C0" class="Normal" width="100%" border="0" cellSpacing="0" cellPadding="0">';
		strHtml += '<tr><td width="100%" class="NormalBold" style="font-weight:bold;" align="left" colspan=2>&nbsp;GIÁ VÀNG</td>';
		strHtml += "<tr><td colspan='2' ><hr color='#f3e63e' size='0.2'></td></tr>";
	}
	function AddFooter()
	{
		strHtml += '</table>';
		document.writeln(strHtml);
		//obj.value = strHtml;
	}

	AddHeader();
	//if (typeof(vGoldSbjBuy) !='undefined') AddGoldPrice('Mua (Sbj)', vGoldSbjBuy);
	//if (typeof(vGoldSbjSell)!='undefined') AddGoldPrice('B&#225;n (Sbj)',vGoldSbjSell);
	if (typeof(vGoldSjcBuy) !='undefined') AddGoldPrice('Mua', vGoldSjcBuy);
	if (typeof(vGoldSjcSell)!='undefined') AddGoldPrice('B&#225;n', vGoldSjcSell);
	AddFooter();
}
ShowGoldPrice();