function populateMain(mainSel, subSel){
 var mainMenu = mainSel;
 var subMenu = subSel;
 mainMenu.options.length = 0;
 for (var i = 0; i < MENU.length; i++) {
  mainMenu.options[i] = MENU[i][0];
 }
 populateSub(mainMenu, subMenu);
}

function populateSub(mainSel, subSel){
 var mainMenu = mainSel;
 var subMenu = subSel;
 var optMainMenu;
 subMenu.options.length = 1;
 optMainMenu = mainMenu.selectedIndex;
 for (var i = 1; i < MENU[optMainMenu].length; i++) {
  subMenu.options[i] = MENU[optMainMenu][i];
 }
}

function jumpMenu(select){
 var i = select.selectedIndex;
 var url = select.options[i].value;
 if (i > 0) {
  location.href = url;
 }
}

var MENU = [];
MENU[0] = [];
MENU[1] = [];
MENU[2] = [];
MENU[3] = [];
MENU[4] = [];
MENU[5] = [];
MENU[6] = [];

MENU[0][0] = new Option("Intervention Policy and Strategies", "");
MENU[0][1] = new Option("Policies", "toolboxsearch.html?keyarea=Policies");
MENU[0][2] = new Option("Strategies", "toolboxsearch.html?keyarea=Strategies");

MENU[1][0] = new Option("Assessing and Planning", "");
MENU[1][1] = new Option("Program Assessments", "toolboxsearch.html?keyarea=Program Assessments");
MENU[1][2] = new Option("Country Planning", "http://www.keithrichards.com");

MENU[2][0] = new Option("Resourcing and Mobilization ", "");
MENU[2][1] = new Option("Costing and Budgeting", "toolboxsearch.html?keyarea=Costing and Budgeting");
MENU[2][2] = new Option("Grant Submission and Tracking", "toolboxsearch.html?keyarea=Grant Submission and Tracking");
MENU[2][3] = new Option("Human Resources", "toolboxsearch.html?keyarea=Human Resources");

MENU[3][0] = new Option("Implementation of Interventions", "");
MENU[3][1] = new Option("Long-Lasting Insecticide Treated Nets (LLIN)", "toolboxsearch.html?keyarea=LLIN");
MENU[3][2] = new Option("Indoor Residual Spraying (IRS)", "toolboxsearch.html?keyarea=IRS");
MENU[3][3] = new Option("Other Vectors Control", "toolboxsearch.html?keyarea=Other Vectors Control");
MENU[3][4] = new Option("Prevention in Pregnant Women and Infants", "toolboxsearch.html?keyarea=Prevention in Pregnant Women and Infants");
MENU[3][5] = new Option("Diagnosis", "toolboxsearch.html?keyarea=Diagnosis");
MENU[3][6] = new Option("OTreatment", "toolboxsearch.html?keyarea=Treatment");

MENU[4][0] = new Option("Implementation Systems", "");
MENU[4][1] = new Option("PSM, Commodities Selection and Regulatory", "toolboxsearch.html?keyarea=PSM, Commodities Selection and Regulatory");
MENU[4][2] = new Option("Communication, IEC&amp;BCC", "toolboxsearch.html?Communication, IECandBCC");
MENU[4][3] = new Option("Program Management", "toolboxsearch.html?keyarea=Program Management");
MENU[4][4] = new Option("Financial Management", "toolboxsearch.html?keyarea=Financial Management");
MENU[4][5] = new Option("Infrastructure", "toolboxsearch.html?keyarea=Infrastructure");

MENU[5][0] = new Option("Monitoring and Evaluation", "");
MENU[5][1] = new Option("M&amp;E Plan and Budget", "toolboxsearch.html?keyarea=ME Plan and Budget");
MENU[5][2] = new Option("Survey Tools", "toolboxsearch.html?Survey Tools");
MENU[5][3] = new Option("Routine Health Information Systems (HMIS)", "toolboxsearch.html?keyarea=HMIS");
MENU[5][4] = new Option("Disease Surveillance", "toolboxsearch.html?keyarea=Disease Surveillance");
MENU[5][5] = new Option("Reporting &amp; Quality Assurance", "toolboxsearch.html?keyarea=Reporting and Quality Assurance");

MENU[6][0] = new Option("Advocacy and Communication", "");
MENU[6][1] = new Option("Advocacy Strategy, Plan, and Budget", "toolboxsearch.html?keyarea=Advocacy Strategy, Plan, and Budget");
MENU[6][2] = new Option("Keymessages", "toolboxsearch.html?Keymessages");
MENU[6][3] = new Option("Getting Your Message Across", "toolboxsearch.html?keyarea=Getting Your Message Across");
