// Menu.js for Knowledge Base (/kb)

function writeMenu(currentPage){

	var html = '';
	var i;

	html += '<h2><a href="default.php">Knowledge Base</a></h2>';

	// Define menu contents here

	menus[0] = new menuSection('DISC Theory','theory');
	menus[0].addItem('kb/udisc.php','Understanding DISC');

	menus[1] = new menuSection('Concepts','concepts');
	menus[1].addItem('kb/shift_pattern.php','Reading the Shift Pattern');
	menus[1].addItem('kb/salesperson.php','The Salesperson Job Profiles');
	menus[1].addItem('kb/traitgrid.php','Understanding the Trait Grid');

	menus[2] = new menuSection('Discus','discus');
	menus[2].addItem('kb/discdots.php','DISCdots: DISC Results at a Glance');
	menus[2].addItem('kb/matchmode.php','Two Match Modes: Recruitment and Assessment');
	menus[2].addItem('kb/introduction.php','Using Text Replacers in a Report Introduction');

	menus[3] = new menuSection('Discus Factfiles','factfiles');
	menus[3].addItem('kb/factfile_relationships.php','Analysing Relationships');
	menus[3].addItem('kb/factfile_disc.php','DISC Profiling');
	menus[3].addItem('kb/factfile_contact.php','Making Contact');
	menus[3].addItem('kb/factfile_jobs.php','Matching People to Jobs');
	menus[3].addItem('kb/factfile_ppf.php','Team Attitudes');
	menus[3].addItem('kb/factfile_teams.php','Team Building with DISC');

	menus[4] = new menuSection('JobQ','jobq');
	menus[4].addItem('kb/classifications.php','Automated Rating Classifications');

	for (i = 0; i < menus.length; i++) {
		html += menus[i].render(currentPage);
	}
	
	document.getElementById('menu').innerHTML = html;
	
}