rem: if (param.show == "all") var collection = root.public; else var collection = root;  var size = collection.size(); if (!size) return;   var minDisplay = 10; var maxDisplay = 100;  var idx = parseInt (req.data.start,10); var max = Math.min((param.limit ? parseInt(param.limit,10) : minDisplay),maxDisplay);  var scroll = (!param.scroll || param.scroll == "no" ? false : true);  if (isNaN(idx) || idx > size-1 || idx < 0) idx = 0; if (scroll && idx > 0) { var sp = new Object(); sp.url = root.href("list") + "?start=" + Math.max(0, idx-max); sp.text = "previous weblogs"; renderSkinAsString("prevpagelink",sp); renderMarkupElement("br"); } var cnt = 0; while (cnt < max && idx < size) { var w = collection.get(idx++); if (!w.isBlocked() && !w.isNotPublic()) { w.renderSkin("preview"); cnt++; } } if (scroll && idx < size) { var sp = new Object(); sp.url = root.href("list") + "?start=" + idx; sp.text = "more weblogs"; renderMarkupElement("br"); renderSkin("nextpagelink",sp); } 
add: if (param.show == "all") var collection = root.public; else var collection = root;  var size = collection.size(); if (!size) return;   var minDisplay = 10; var maxDisplay = 100;  var idx = parseInt (req.data.start,10); var max = Math.min((param.limit ? parseInt(param.limit,10) : minDisplay),maxDisplay);  var scroll = (!param.scroll || param.scroll == "no" ? false : true);  if (isNaN(idx) || idx > size-1 || idx < 0) idx = 0; if (scroll && idx > 0) { var sp = new Object(); sp.url = root.href("list") + "?start=" + Math.max(0, idx-max); sp.text = "previous weblogs"; renderSkinAsString("prevpagelink",sp); renderMarkupElement("br"); } var cnt = 0; while (cnt < max && idx < size) { var w = collection.get(idx++); if (!w.isBlocked() && !w.isNotPublic()) { w.renderSkin("preview"); cnt++; } } if (scroll && idx < size) { var sp = new Object(); sp.url = root.href("list") + "?start=" + idx; sp.text = "more weblogs"; renderMarkupElement("br"); renderSkin("nextpagelink",sp); } 
context: function sitelist_macro(param) {  if (param.show == "all")    var collection = root.public;  else    var collection = root;  var size = collection.size();  if (!size)    return;  // setting some general limitations:  var minDisplay = 10;  var maxDisplay = 100;  var idx = parseInt (req.data.start,10);  var max = Math.min((param.limit ? parseInt(param.limit,10) : minDisplay),maxDisplay);  var scroll = (!param.scroll || param.scroll == "no" ? false : true);  if (isNaN(idx) || idx > size-1 || idx < 0)    idx = 0;  if (scroll && idx > 0) {    var sp = new Object();    sp.url = root.href("list") + "?start=" + Math.max(0, idx-max);    sp.text = "previous weblogs";    renderSkinAsString("prevpagelink",sp);    renderMarkupElement("br");  }  var cnt = 0;  while (cnt < max && idx < size) {    var w = collection.get(idx++);    if (!w.isBlocked() && !w.isNotPublic()) {      w.renderSkin("preview");      cnt++;    }  }  if (scroll && idx < size) {    var sp = new Object();    sp.url = root.href("list") + "?start=" + idx;    sp.text = "more weblogs";    renderMarkupElement("br");    renderSkin("nextpagelink",sp);  }}
meta: 993	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/993/59b9e4558a6020aea0be7158ca6d64256a1f0ed8/macros.js/buggy/code/Global/macros.js