rendered paste body function menuprop(){
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\">";
var loopndx = 0;
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.getElementById("dummy").innerHTML = menuhtml;
}