All pastes #928164 Raw Edit

Anonymous

public text v1 · immutable
·published 2008-03-04 21:06 UTC
rendered paste body
     function menuprop(){
          loopndx = 0;
     while(cats > catndx){        //while there are still categories
             menuhtml += '<div id="category' + catndx + '" class="categories" name="category" onclick="expandit(' + catndx + ')" style="position: relative">' + catarray[catndx] + '</div>';
             menuhtml += '<span style="overflow: auto; position: relative">';
             menuhtml += '<div id="loclist' + catndx + '" name="locdiv" style="display:none"><ul style="position: relative">';

                   //document.getElementById("dummy").innerHTML = "*********" + loopndx + "*********";
                   while(locations[loopndx][0] == catarray[catndx]) {
                   menuhtml += '<li><a href="#" onclick="viewlocation(' + loopndx + '); return(false);\">' + locations[loopndx][1] + '</a></li>';
                   loopndx++;
                   }

                                //menuhtml += '---------- locations[loopndx] = ' + loopndx + ' and catndx = ' + catndx + ' ------------';
                   menuhtml += locations[loopndx][0] + ' ' + catarray[catndx];
             menuhtml += '</ul></div>';
             menuhtml += '</span></div>';
             catndx++;
             }

          //outside loops
          document.getElementById("sidemenu").innerHTML = menuhtml;
          //document