var fBrw=(navigator.userAgent.indexOf('MSIE')!= -1 && navigator.userAgent.indexOf('Windows')!= -1);
var fDSp=(typeof(document.getElementById)!='undefined');
var RefBanner = new Array();
var RefAdLogo = new Array();
var RefAdLBox = new Array();
var RefAdLBar = new Array();
var RefColumn = new Array();
var RefAdLeft = new Array();
var RefAdStay = 0;
var SkpFolder = true;
var CurBanner = 0;
var LastChild = 0;
var BannerLnk = 0;
var LComplete = 0;
var PageHost = '';

function AddHeader(Name, Header, Buttons, Symbol, AddChildTable)
{
	document.writeln('<table width="100%" border=0 cellspacing=0 cellpadding=1 bgcolor="73ADBD"><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>&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/min.gif" name="IDI_', Name, '" border=0 alt="Minimize | Maximize">');
			document.write('</a></td>');
		}*/

		document.writeln('</tr></table>');
	}

	document.writeln('<div class=BreakLine id="IDM_', Name, '">');
	if (typeof(AddChildTable)=='undefined')
	{
		document.writeln('<table align=center width="100%" cellspacing=0 cellpadding=0 border=0>');
		LastChild = 1;
	}
	else
	{
		LastChild = 0;
	}
	return true;
}

function AddFooter()
{
	if (LastChild)
	{
		document.writeln('</table></div></td></tr></table>');
	}else{
		document.writeln('</div></td></tr></table>');
	}
}


function headerweather()
{
	if (!AddHeader('Weather', '<font class=titletime>Weather</font>', 3, PageHost.concat('images/i_Weather.gif')))
		return;
}

function headercurrency()
{
	if (!AddHeader('Currency', '<font class=titletime>Currency</font>', 3, PageHost.concat('images/i_Stock.gif')))
		return;
}

function ShowWeather(City, Degree)
{
	function AddCityWeather(City, Degree)
	{
		document.writeln('<tr bgcolor="#FFFFFF"><td class=BoxItem height="18">&nbsp;', City, ':</font></td><td class=BoxItem align=right>', Degree, '&#176;&nbsp;</td></tr>');
	}
	AddCityWeather(City, Degree);
	//AddCityWeather('Hu&#7871;', '20-26');
	//AddCityWeather('&#272;&#224; N&#7861;ng', '22-28');
	//AddCityWeather('H&#7891; Ch&#237; Minh', '23-33');
	//AddFooter();
}
//ShowWeather();

function ShowCurrency(Currency, Rate, Comparecur)
{
	function AddCityCurrency(Currency, Rate, Comparecur)
	{
		document.writeln('<tr bgcolor="#FFFFFF"><td class=BoxItem height="18">&nbsp;', Currency, ':</font></td><td class=BoxItem align=right>', Rate, '</td><td align=left>&nbsp;', Comparecur ,'</td></tr>');
	}
	AddCityCurrency(Currency, Rate, Comparecur);
}