var xml = new ActiveXObject("msxml2.domdocument");
var ix = -1;
var six = -1;
function onOverRecomand(src)
{
	src.cells[0].className = 'recoBut_on';
	src.cells[1].firstChild.className = 'recoTitle_on';
	ix = src.cells[0].firstChild.innerText*1-1;
}
function onOutRecomand(src)
{
	var cix = src.cells[0].firstChild.innerText*1-1;
	if ( cix == six ) return;
	src.cells[0].className = 'recoBut_off';
	src.cells[1].firstChild.className = 'recoTitle_off';
	ix = -1
}
function onClickRecomand()
{
	
	if(!xml.documentElement)xml.load(RecomendData);
	var items = xml.selectNodes("//item");
	document.all.lblRecomentInfo.innerHTML = items.item(ix).selectSingleNode("info").text;
	if(items.item(ix).selectSingleNode("url").text!='')
	{
		var f = items.item(ix).selectSingleNode("url").text;
		var a = document.frames("frmMainBanner").document.all;
		window.clicked = true;
		a.VIDEO.controls.Stop()
		a.VIDEO.url = f; 
		window.intermid = false;
		
	}
	if ( six > -1 ) resetLstRow(six);
	six = ix;
}
function init()
{	
	intermid = false;
	window.setTimeout("startload()",300);
}
function startload()
{
	var tbl = document.getElementById("hotTvRecommandTbl");
	onOverRecomand(tbl.rows[0]);
	tbl.rows[0].click();
}
function resetLstRow(ix)
{
	var tbl = document.getElementById("hotTvRecommandTbl");
	var src = tbl.rows[ix];
	if ( src.cells[0].className == 'recoBut_on' )
	{
		src.cells[0].className = 'recoBut_off';
		src.cells[1].firstChild.className = 'recoTitle_off';
	}
}