var TITEMS = [ 
 ["Introduction", null, "1",
  ["About QuotePad", "srcq/intro.htm", "11"],
  ["Key features", "srcq/features.htm", "11"]
 ],
 ["Using QuotePad", null, "1",
  ["Main menu", "srcq/menu.htm", "11"],
  ["Main window", null, "1",
   ["Overview", "srcq/noteswindow.htm", "11"],
   ["List of notes", "srcq/notelist.htm", "11"]
  ],
  ["Find a note", "srcq/find.htm", "11"],
  ["Reminders", "srcq/reminder.htm", "11"],
  ["Settings", "srcq/settings.htm", "12"],
  ["Export notes", "srcq/export.htm", "11"],
  ["Database Restore", "srcq/restore.htm", "12"],
  ["Hot keys", "srcq/hotkeys.htm", "11"]
 ],
 ["How to...", null, "1",
  ["How to install or upgrade", "srcq/howto/upgrade.htm", "12"],
  ["How to add a new note", "srcq/howto/newnote.htm", "11"],
  ["How to delete a note", "srcq/howto/deletenote.htm", "11"],
  ["How to dock the main window", "srcq/howto/dockwind.htm", "11"],
  ["How to print a note", "srcq/howto/printnote.htm", "11"],
  ["How to backup the note database", "srcq/howto/backup.htm", "11"],
  ["How to restore a database file", "srcq/restore.htm", "11"]
 ],
 ["About", null, "1",
  ["Product License", "srcq/register/license-l.htm", "11"],
  ["Copyright", "srcq/about/copyright.htm", "11"]
 ]
];


var FITEMS = arr_flatten(TITEMS);

function arr_flatten (x) {
   var y = []; if (x == null) return y;
   for (var i=0; i<x.length; i++) {
      if (typeof(x[i]) == "object") {
         var flat = arr_flatten(x[i]);
         for (var j=0; j<flat.length; j++)
             y[y.length]=flat[j];
      } else {
         if ((i%3==0))
          y[y.length]=x[i+1];
      }
   }
   return y;
}

