menu = treeNodes[0]; 
menu = treeNodes[0]; 
function buildTree(){ // Determine which nodes have children and assign the correct propertyfor (var i = 0; i < navigationTree.length-1; i++){  // see if the current node has chilren  var thisLevel = navigationTree[i]["level"];  var nextLevel = navigationTree[i+1]["level"];    if (nextLevel > thisLevel)  {  	navigationTree[i]["hasChild"] = true;  }  else  {  	navigationTree[i]["hasChild"] = false;  }} 	                                 // create tree object nodes.for( var j = 0; j < navigationTree.length; j++){   treeNodes[j] = null;   treeNodes[j] = new MTMenu();}// add all items to nodes - // NOTE, index to add to is the parent index + 1 for node tree offset of root=0for( var j3 = 0; j3 < navigationTree.length; j3++){   if (navigationTree[j3]["parentIndex"] == null)   {     var nsearchID = navigationTree[j3]["author"];      treeNodes[0].MTMAddItem(new MTMenuItem(navigationTree[j3]["title"], navigationTree[j3]["URL"].replace(/http...developer.novell.com.ndk/gi,"/ndk") , "content_frame", nsearchID));    }   else   {      var nsearchID = navigationTree[j3]["author"];     treeNodes[navigationTree[j3]["parentIndex"] + 1 ].MTMAddItem(new MTMenuItem(navigationTree[j3]["title"], navigationTree[j3]["URL"].replace(/http...developer.novell.com.ndk/gi,"/ndk"), "content_frame",nsearchID));    }}// create submenu structure// NOTE: add 1 to parent nodes for root = 0 offset.for( var j4 = 0; j4 < navigationTree.length; j4++){      if (navigationTree[j4]["hasChild"])   {      var pindex = null;	  if (navigationTree[j4]["parentIndex"] == null)	  {	            pindex = 0;	  }	  else	  {	      pindex = navigationTree[j4]["parentIndex"]+1;      }	  	  var lindex = navigationTree[j4]["levelIndex"];	//  document.write('treeNodes[' + pindex +'].items['+ lindex +'].MTMakeSubmenu(treeNodes['+(j4+1)+']);<br>');	  	  treeNodes[pindex].items[lindex].MTMakeSubmenu(treeNodes[j4+1]);   }} menu = treeNodes[0];//expand the second item to display the sub contents on first displayif (menu.items[0] != null ){   menu.items[0].expanded = true;     }             }
5459	/local1/tlutelli/issta_data/temp/all_js/javascript/2007_temp/2007/5459/3703c3c05f398a63e55992f7687ef65273b26d6a/regress-111557.js/clean/js/tests/js1_5/Regress/regress-111557.js