var aboutNav = 'none';
var aboutContent = 'none';

$(document).ready(function() {
	document.getElementById('directorsNav').onclick=function() {toggleAboutHandler('directorsNav','directorsContent');};
	document.getElementById('collaboratorsNav').onclick=function() {toggleAboutHandler('collaboratorsNav','collaboratorsContent');};
	document.getElementById('partnersNav').onclick=function() {toggleAboutHandler('partnersNav','partnersContent');};
	document.getElementById('supportersNav').onclick=function() {toggleAboutHandler('supportersNav','supportersContent');};
	document.getElementById('linksNav').onclick=function() {toggleAboutHandler('linksNav','linksContent');};
	toggleAboutHandler('linksNav','linksContent');
});

function toggleAboutHandler(aboutNavName,aboutContentName) {
	if (aboutNav == aboutNavName) {
		//do nothing
	} else if (aboutNav == 'none') {
		toggleAbout(aboutNavName,aboutContentName);
	} else {
		toggleAbout(aboutNav,aboutContent);
		toggleAbout(aboutNavName,aboutContentName);
	}
	aboutNav = aboutNavName;
	aboutContent = aboutContentName;
}

function toggleAbout(aboutNavName,aboutContentName) {
	if (aboutNavName && aboutContentName) {
		var col = document.getElementById(aboutNavName).style;
		col.color = (col.color==''||col.color=='#FFFFFF'||col.color=='white')?'#eaff95':'';
		var disp = document.getElementById(aboutContentName).style;
		disp.display = (disp.display==''||disp.display=='block')?'none':'block';
		var map = document.getElementById('map').style;
		map.display = (map.display==''||map.display=='block')?'none':'block';
	} else {
		reportProblem('toggleAbout');
	}

}

