// aNav array: html name, btn name, link
var NAVHTMLNAME = 0;
var NAVIMGNAME = 1;
var NAVLINK = 2;
var aNav = new Array(
	new Array('become', 	'button_1', 	'become_an_fcsi/become_an_fcsi.html'),
	new Array('directory', 	'button_2', 	'fcsi_directory_m/fcsi_directory_m.html'),
	new Array('news', 		'news', 		'news/news_and_updates.html'),
	new Array('council', 	'council', 		'national_council/national_council.html'),
	new Array('maintain', 	'button_3', 	'maintain_fcsi_status/maintain_status.html'),
	new Array('continuing', 'button_4', 	'continuing_education/continuing_education.html'),
	new Array('ethics', 	'button_5', 	'code_of_ethics/code_of_ethics.html'),
	new Array('resources', 	'resources', 	'resources/resources.html'),
	new Array('forum', 		'forum', 		'forum/forum.html'),
	new Array('honorary', 	'honorary', 	'honorary/honorary_program.html'),
  new Array('contribute', 'contribute', 	'contribute/contribute.html'),
	new Array('faqs', 		'faqs', 		'faqs/faqs.html')
);
var sectionLevel;
var dirLevel;

//alert((typeof(window['sectionLevel']) == "undefined") || (sectionName == 'home'));
//alert((typeof(window['sectionLevel']) == "undefined") && (sectionName != 'home'));
if ((typeof(window['sectionLevel']) == "undefined") && (sectionName == 'home')) {
	sectionLevel = 0;
} else if ((typeof(window['sectionLevel']) == "undefined") && (sectionName != 'home')) {
	sectionLevel = 1;
}
dirLevel = '';
for (var i = 0; i < sectionLevel; ++i) {
	dirLevel += '../';
}
// alert("sectionName " + sectionName + "\nsectionLevel " + sectionLevel + "\ndirLevel " + dirLevel);

imgDir = dirLevel + "images/";
lnkDir = dirLevel;

for (var i=0; i < aNav.length; ++i) {
	if (sectionName == aNav[i][NAVHTMLNAME]) {
		sOpen = "<a href=\"" + lnkDir + aNav[i][NAVLINK] +"\">\n";
		sImg = "<img name=\"" + aNav[i][NAVHTMLNAME] + "\" src=\"" 
			+ imgDir + aNav[i][NAVIMGNAME] + "-down.gif\" width=204 height=35 border=0 alt=\"\" />";
		sClose = "</a><br />\n";
	} else {
		sOpen = "<a onmouseover=\"changeImages('" + aNav[i][NAVHTMLNAME] + "', '" 
			+ imgDir + aNav[i][NAVIMGNAME] + "-over.gif'); return true;\"\n" 
			+ "onmouseout=\"changeImages('" + aNav[i][NAVHTMLNAME] + "', '" 
			+ imgDir + aNav[i][NAVIMGNAME] + ".gif'); return true;\"\n"
			+ "href=\"" + lnkDir + aNav[i][NAVLINK] +"\">\n";
		sImg = "<img name=\"" + aNav[i][NAVHTMLNAME] + "\" src=\"" + imgDir + aNav[i][NAVIMGNAME] + 
			".gif\" width=204 height=35 border=0 alt=\"\" />";
		sClose = "</a><br />\n";
	}
	// alert(str);
	document.write(sOpen + sImg + sClose);
}
