Allow any number of TOC levels.

Table of content accessed from Main Menu -> Tools -> Table of Content displays two levels of chapters only (i.e. chapters and subchapters). With this fix all TOC elements will be displayed.

Code change is simple, recursive subroutine call is used instead of an arbitrary two levels of 'for' clause.