function menuprop(){
loopndx = 0;
while(cats > catndx){ //while there are still categories
menuhtml += '
' + catarray[catndx] + '
';
menuhtml += '';
menuhtml += '';
//document.getElementById("dummy").innerHTML = "*********" + loopndx + "*********";
while(locations[loopndx][0] == catarray[catndx]) {
menuhtml += '- ' + locations[loopndx][1] + '
';
loopndx++;
}
//menuhtml += '---------- locations[loopndx] = ' + loopndx + ' and catndx = ' + catndx + ' ------------';
menuhtml += locations[loopndx][0] + ' ' + catarray[catndx];
menuhtml += '
';
menuhtml += '';
catndx++;
}
//outside loops
document.getElementById("sidemenu").innerHTML = menuhtml;
//document