function populate_toc () { var children = document.getElementsByTagName("h1").item(0).parentNode.childNodes var toc = "" var counters = new Array() counters[1] = 0 counters[2] = 0 counters[3] = 0 counters[4] = 0 /* Generate the table of contents */ for(var ii=0; ii0 ){ var anchor = "tocentry_" + ii for(var jj=iHeader+1; jj<=4; jj++){ counters[jj] = 0 } counters[iHeader]++ var number = "" for(var jj=1; jj<=iHeader; jj++){ number += counters[jj] + "." } toc += '
' toc += '' + number + " " + node.innerHTML toc += "
" var a = '' + number + '' node.innerHTML = a + " " + node.innerHTML } } document.getElementById("toc").innerHTML = toc } function number_figs () { /* Number the figures in this document */ var figcounter = 1 var spans = document.getElementsByTagName("span") for(var ii=0; ii references */ var cites = document.getElementsByTagName("cite") for(var ii=0; ii' + label + '' } } function decorate_tables () { /* Decorate tables */ var tables = document.getElementsByTagName("table") for(var ii=0; ii