rem: for (var i = 2; i < tabs.length; i += 2) 
add: for (i = 2; i < tabs.length; i += 2) 
context: function SidebarNavigate(aDirection){  debug("SidebarNavigate " + aDirection);  var tabs = sidebarObj.panels.node.childNodes;  // move forward a tab (down in the template)  if (aDirection > 0)  {    // ensure we have a tab below the last one    var foundLast = false;     var oldFirst = null;    for (var i = 2; i < tabs.length; i += 2)     {      var currHeader = tabs[i];      var currTab = new sbPanel(currHeader.getAttribute("id"), currHeader, i);        if (!currTab.is_excluded())      {             if (foundLast)        {          debug("toggling old first and new last");          debug("new last:  " + currHeader.getAttribute("id"));          debug("old first: " + oldFirst.getAttribute("id"));          currHeader.setAttribute("in-view", true);          oldFirst.setAttribute("in-view", false);                    // if old first was selected select new first instead          if (oldFirst.getAttribute("id") ==               sidebarObj.panels.node.getAttribute("last-selected-panel"))          {            sidebarObj.panels.node.setAttribute('last-selected-panel',               currTab.id);          }                    break;        }        if (!foundLast && currHeader.hasAttribute("last-panel"))        {          debug("found last");          foundLast = true;        }        // set the old first in case we find a new last below        // the old last and need to toggle the new first's ``in-view''        if (!oldFirst && currTab.is_in_view())          oldFirst = currHeader;      }    }  }    // move back a tab (up in the template)  else if (aDirection < 0)  {    var newFirst = null, newLast = null;    var foundFirst = false;    for (var i = 2; i < tabs.length; i += 2)    {      var currHeader = tabs[i];      var currTab = new sbPanel(currHeader.getAttribute("id"), currHeader, i);      if (!currTab.is_excluded())      {        if (!foundFirst && currHeader.hasAttribute("top-panel"))        {          debug("found first");          foundFirst = true;        }        if (!foundFirst)        {          debug("setting newFirst");          newFirst = currHeader;        }        if (currHeader.hasAttribute("last-panel"))        {          debug("found last");          // ensure we have a tab above the first one          if (newFirst)          {            debug("toggling new first and old last");            debug("new first: " + newFirst.getAttribute("id"));            debug("old last:  " + currHeader.getAttribute("id"));            newFirst.setAttribute("in-view", true);            currHeader.setAttribute("in-view", false); // hide old last                      // if old last was selected, now select one above it            if (sidebarObj.panels.node.getAttribute("last-selected-panel") ==                currTab.id)            {              sidebarObj.panels.node.setAttribute("last-selected-panel",                 newLast.getAttribute("id"));            }            break;          }        }        if (currTab.is_in_view())          newLast = currHeader;      }    }  }  if (aDirection)    sidebarObj.panels.update(false);}
meta: 9421	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9421/1a92e3d2d067a915f1c40cbabd49d92ff3341a2a/sidebarOverlay.js/clean/suite/common/sidebar/sidebarOverlay.js