// Scripted refresh, excludes article page due to reading duration

var timerId;

setRefresh(true);

function setRefresh(bVidFlag) {
    if(bVidFlag) {
        if (window.location.href.indexOf("rf=true") > 0){
            timerId = window.setTimeout("window.location.href=window.location.href", 300000);
        }
        else{
            if (window.location.href.indexOf("?") > 0){
                timerId = window.setTimeout("window.location.href=window.location.href + '&rf=true';", 300000);
            }
            else{
                timerId = window.setTimeout("window.location.href=window.location.href + '?rf=true';", 300000);
            }
        }
    }
    else{
        if(!isNaN(parseInt(timerId))) {window.clearTimeout(timerId);}
    }
}


