function menuprop(){
while(cats > catndx){ //while there are still categories
menuhtml += "
" + catarray[catndx] + "
";
menuhtml += "";
menuhtml += "";
var loopndx = 0;
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.getElementById("dummy").innerHTML = menuhtml;
}