var TITEMS = [ 
 ["About", "source/Copy of About.html", "11"],
 ["Pre-trial procedures", "source/About.html", "1",
  ["Research question", "source/A Pre-trial phase/A1 Research question/Research Q Opening Page.html", "1",
   ["Protocol development", "source/A Pre-trial phase/A1 Research question/Protocol development.html", "11"],
   ["Publishing the protocol", "source/A Pre-trial phase/A1 Research question/Publishing the protocol.html", "11"],
   ["Prepare trial schematic", "source/A Pre-trial phase/A1 Research question/Trial schematic.html", "11"]
  ],
  ["Sponsorship and governance arrangements", "source/A Pre-trial phase/A2 Sponsorship and governance arrangement/Sponsorship and Governance arrangements Opening Page.html", "1",
   ["Research governance and good clinical practice", "source/A Pre-trial phase/A2 Sponsorship and governance arrangement/Governance.html", "11"],
   ["Sponsorship", "source/A Pre-trial phase/A2 Sponsorship and governance arrangement/Sponsorship.html", "11"]
  ],
  ["Approve final trial documentation", "source/A Pre-trial phase/A3 Approve final trial documentation/Approval documentation.html", "11"],
  ["Trial registration", "source/A Pre-trial phase/A4 Trial registration/Registration.html", "11"]
 ],
 ["B Set-up phase", null, "1",
  ["Select the trial team", "source/B Set-up phase/B1 Selecting the trial team/Select the trial team Opening Page.html", "1",
   ["Selecting the trial team", "source/B Set-up phase/B1 Selecting the trial team/Selecting the trial team.html", "11"],
   ["Trial competancies", "source/B Set-up phase/B1 Selecting the trial team/Trial competencies.html", "11"]
  ],
  ["How to recruit staff", null, "1",
   ["Training issues", "source/About.html", "11"],
   ["Guidance on good clinical practice", "source/About.html", "11"],
   ["Problems with recruitment and retention of staff ", "source/About.html", "11"],
   ["How to deal with failures to recruit staff or a slow recruitment process", "source/About.html", "11"],
   ["How to deal with staff leaving and how to avoid problems when key staff leave", "source/About.html", "11"]
  ],
  ["Set-up the coordinating centre", "source/B Set-up phase/B2 Set up the coordinating centre/Set up coordination centre.html", "11"],
  ["Organise the trial structure", "source/B Set-up phase/B3 Organise the trial structure/Organise the trial structure.html", "11"],
  ["Risk assessment", "source/B Set-up phase/B4 Risk assessment/Risk Assessment.html", "11"],
  ["Setting up data management systems", "source/B Set-up phase/B5 Setting up data management systems/Setting up data systems Opening Page.html", "1",
   ["Data management systems", "source/B Set-up phase/B5 Setting up data management systems/Data management systems.html", "11"],
   ["Methods of data collection", "source/B Set-up phase/B5 Setting up data management systems/Data collection.html", "11"]
  ],
  ["Setting up recruitment procedures", "source/B Set-up phase/B6 Setting up recruitment procedures/Recruitment Opening Page.html", "1",
   ["How are the participants to be identified?", "source/B Set-up phase/B6 Setting up recruitment procedures/Recruitment identification.html", "11"],
   ["Recruitment - is the participant eligibility?", "source/B Set-up phase/B6 Setting up recruitment procedures/Recruitment eligibility.html", "11"],
   ["Recruitment logistics", "source/B Set-up phase/B6 Setting up recruitment procedures/Recruitment logistics.html", "11"]
  ],
  ["Setting up the randomisation procedures", "source/B Set-up phase/B7 Setting up the randomisation procedures/Setting up randomisation procedures.html", "11"],
  ["Setting up the intervention procedures", "source/B Set-up phase/B8 Setting up the intervention procedure/Intervention procedures.html", "11"],
  ["Documenting procedures", "source/B Set-up phase/B9 Documentation procedures/Documenting procedures.html", "11"],
  ["Collaborator trial recruitment", "source/B Set-up phase/B10 Collaborator trial recruitment/Collaborator trial recruitment Opening Page.html", "1",
   ["Collaborator recruitment", "source/B Set-up phase/B10 Collaborator trial recruitment/Collaborator trial recruitment.html", "11"],
   ["Standardisation across sites", "source/B Set-up phase/B10 Collaborator trial recruitment/Standardisation across sites.html", "11"]
  ],
  ["Planning for disaster recovery", "source/B Set-up phase/B11 Planning for disaster recovery/Planning for disaster recovery.html", "11"],
  ["Statistical analysis", "source/B Set-up phase/B12 Statistical analysis/Statistical analysis.html", "11"]
 ],
 ["C Active phase", null, "1",
  ["Safety monitoring and adverse event reporting", null, "1",
   ["Data and safety monitoring", "source/C Active phase/C1 Safety monitoring and adverse reporting/Data and safety  monitoring.html", "11"],
   ["Adverse event reporting requirements", "source/C Active phase/C1 Safety monitoring and adverse reporting/Adverse events.html", "11"]
  ],
  ["Management and monitoring", null, "1",
   ["Progress reporting", "source/C Active phase/C2 Management and monitoring/Progress reporting.html", "11"],
   ["Retention", null, "1",
    ["Participants", "source/C Active phase/C2 Management and monitoring/Participant retention.html", "11"],
    ["Collaborating centres", "source/C Active phase/C2 Management and monitoring/Collaborating centre retention.html", "11"]
   ],
   ["Participant and centre withdrawal", "source/C Active phase/C2 Management and monitoring/Participant and centre withdrawal.html", "11"],
   ["Ongoing recruitment", "source/C Active phase/C2 Management and monitoring/Ongoing recruitment and follow up.html", "11"],
   ["Protocol amendments", "source/C Active phase/C2 Management and monitoring/Protocol amendments.html", "11"],
   ["Budget management", "source/C Active phase/C2 Management and monitoring/Budget management.html", "11"]
  ],
  ["Data entry", "source/C Active phase/C3 Data entry/Data entry.html", "11"],
  ["Quality control", "source/C Active phase/C4 Quality control/Quality control.html", "11"],
  ["Statistics", null, "1",
   ["Compliance and missing data", "source/C Active phase/C5 Statistics/Compliance.html", "11"],
   ["Interim analysis", "source/C Active phase/C5 Statistics/Interim analyses.html", "11"],
   ["Statistical programming", "source/About.html", "11"]
  ],
  ["Scheduling and organising the DMC meetings", "source/C Active phase/C7 Scheduling and organising the DMC meetings/Scheduling and organising DMC meetings.html", "11"],
  ["Health economics", "source/About.html", "1",
   ["Costs", "source/C Active phase/C6 Health Economics/Costs.html", "11"],
   ["Economic evaluation", "source/C Active phase/C6 Health Economics/Economic evaluation.html", "11"],
   ["Measurement of benefits", "source/C Active phase/C6 Health Economics/Measurement of benefits.htm", "11"]
  ]
 ],
 ["D Close down", null, "1",
  ["Method of trial closure", "source/D Close down phase/Methods of trial closure.html", "11"],
  ["Reporting, dissemination and notification of results", null, "1",
   ["Publication policy", "source/D Close down phase/Publication policy.html", "11"],
   ["Notifying participants of study findings", "source/D Close down phase/Notifying participants and stakeholders of study findings.html", "11"],
   ["Final report", "source/D Close down phase/Final report.html", "11"],
   ["Data analysis", "source/About.html", "11"],
   ["Dissemination of results", null, "1",
    ["Stakeholders", "source/About.html", "11"]
   ]
  ],
  ["Archiving", "source/D Close down phase/Archiving.html", "11"],
  ["Completing HR requirements with staff employed for the trial", null, "11"],
  ["Closure on capital items such as buildings, equipment, vehicles", "source/About.html", "11"]
 ]
];


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) && (x[i+1] != null))
          y[y.length]=x[i+1];
      }
   }
   return y;
}

function arr_findNext (url, cnt)
{
   var y = arr_flatten(TITEMS);
   for (var i = 0; i<y.length; i++) {
     if (y[i] == url) {
       ni = i + cnt;
       if (ni < 0) ni = 0;
       if (ni > y.length-1) ni = y.length-1;

       return y[ni];
     }
   }
   return "";
}

