// refresh main sport pages, excludes article page due to reading duration & video page

var timerId,bVidFlag;

if(JS_SUB_SECTION == 'livescores_scorecard' || JS_SUB_SECTION == 'livescores_commentary' || JS_SUB_SECTION == 'livescores_seriesstats')
{
	setRefresh(true);
}

function setRefresh(bVidFlag)
{
    //1 minute
    var timeoutValue = 60 * 1000; 

    if(bVidFlag)
    {		
               if (window.location.href.indexOf("rf=true") > 0) 
		{
			timerId = window.setTimeout("window.location.href=window.location.href", timeoutValue);
		}
		else 
		{
			if (window.location.href.indexOf("?") > 0) 
			{
				timerId = window.setTimeout("window.location.href=window.location.href + '&rf=true';", timeoutValue);
			}
			else 
			{
				timerId = window.setTimeout("window.location.href=window.location.href + '?rf=true';", timeoutValue);
			}
		}		
    }
    else
    {
		if(!isNaN(parseInt(timerId))) {window.clearTimeout(timerId);}
    }
}
















