dojo.dom.insertAtIndex = function(/* Node */node, /* Element */containingNode, /* number */insertionIndex){   var siblingNodes = containingNode.childNodes;    if (!siblingNodes.length){ containingNode.appendChild(node); return true; }     var after = null;  for(var i=0; i<siblingNodes.length; i++){  var sibling_index = siblingNodes.item(i)["getAttribute"] ? parseInt(siblingNodes.item(i).getAttribute("dojoinsertionindex")) : -1;  if (sibling_index < insertionIndex){ after = siblingNodes.item(i); } }  if (after){   return dojo.dom.insertAfter(node, after); }else{   return dojo.dom.insertBefore(node, siblingNodes.item(0)); } 
dojo.dom.insertAtIndex=function(node,_156,_157){ var _158=_156.childNodes; if(!_158.length){ _156.appendChild(node); return true; 
dojo.dom.insertAtIndex = function(/* Node */node, /* Element */containingNode, /* number */insertionIndex){  //  summary  //  insert node into child nodes nodelist of containingNode at insertionIndex.  var siblingNodes = containingNode.childNodes;  // if there aren't any kids yet, just add it to the beginning  if (!siblingNodes.length){    containingNode.appendChild(node);    return true;  //  boolean  }  // otherwise we need to walk the childNodes  // and find our spot  var after = null;  for(var i=0; i<siblingNodes.length; i++){    var sibling_index = siblingNodes.item(i)["getAttribute"] ? parseInt(siblingNodes.item(i).getAttribute("dojoinsertionindex")) : -1;    if (sibling_index < insertionIndex){      after = siblingNodes.item(i);    }  }  if (after){    // add it after the node in {after}    return dojo.dom.insertAfter(node, after); //  boolean  }else{    // add it to the start    return dojo.dom.insertBefore(node, siblingNodes.item(0)); //  boolean  }}
6315	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/6315/90939f35f46f873d9b1f5c5f818ecf012711dc71/dojo.js/buggy/src/main/resources/org/apache/struts2/static/dojo/dojo.js