unpackVisibleHeadlines();
+ var active_found = false;
+
+ // set topmost child in the buffer as active
+ if (getInitParam("cdm_auto_catchup") == 1) {
+ var rows = $$("#headlines-frame > div[id*=RROW]");
+
+ for (var i = 0; i < rows.length; i++) {
+ var child = rows[i];
+
+ if (!active_found && $("headlines-frame").scrollTop < child.offsetTop) {
+ active_found = true;
+
+ if (_active_article_id) {
+ var row = $("RROW-" + _active_article_id);
+ if (row) row.removeClassName("active");
+ }
+
+ _active_article_id = child.id.replace("RROW-", "");
+ showArticleInHeadlines(_active_article_id, true);
+ break;
+ }
+ }
+ }
+
if (!_infscroll_disable) {
if ((hsp && e.scrollTop + e.offsetHeight >= hsp.offsetTop - hsp.offsetHeight) ||
(e.scrollHeight != 0 &&
//console.log("auto_catchup_batch: " + catchup_id_batch.toString());
}
+
});
if (catchup_id_batch.length > 0) {