rem:  card = card ? card.nextSibling : stack.firstChild 
context:   fixStack: function(stack) {    var card; // for loops    if(stack.className!="card-fan-down") return;    if(!stack.hasChildNodes()) {      stack.offset = 0;      return;    }    var numFaceUp = 0;    for(card = stack.lastChild; card && card.faceUp(); card = card.previousSibling) numFaceUp++;    if(numFaceUp <= 1) {      stack.offset = 0;      return;    }    var space = window.innerHeight - getBottom(stack.firstChild) - stack.childNodes.length * this.faceDownOffset;    var offset = this.faceDownOffset + parseInt(space / numFaceUp);    if(offset > this.faceUpOffset) offset = this.faceUpOffset;    var old = stack.offset || this.faceUpOffset;    stack.offset = offset;    if(offset == old) return;    var top = (stack.childNodes.length - numFaceUp) * this.faceDownOffset;    // card will still hold a pointer to th last face down card, or null    card = card ? card.nextSibling : stack.firstChild    while(card) {      if(card.top != top) card.top = top;      top += offset;      card = card.nextSibling    }  }
meta: 3385	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/3385/8dedb321ec87f26923a87fcaf617bd91785f2c68/cardslib.js/buggy/cardslib.js