var path = location.pathname;
var lastSlash = path.lastIndexOf("/");
if (lastSlash < 1) {
	lastSlash = path.lastIndexOf("\\");
}
lastSlash = lastSlash + 1;
page = path.substring(lastSlash,path.length);

var dietStyle;
var sexStyle;
var habitStyle;
var healthStyle;
var socialStyle;
var humanStyle;
var normalStyle;
var highlight;

normalStyle = "class='pageheadsmall'" ;
highlight = "class='headsmallhighlight'" ;

dietStyle = normalStyle;
sexStyle = normalStyle;
habitStyle = normalStyle;
healthStyle = normalStyle;
socialStyle = normalStyle;
humanStyle = normalStyle;

switch (page) {
	case "mb_diet.html" :
		dietStyle = highlight ;
		break;
	case "mb_sex.html" :
		sexStyle = highlight ;
		break;
	case "mb_habit.html" :
		habitStyle = highlight ;
		break;
	case "mb_heal.html" :
		healthStyle = highlight ;
		break;
	case "mb_socl.html" :
		socialStyle = highlight ;
		break;
	case "mb_humn.html" :
		humanStyle = highlight ;
		break;
}  // switch


document.write ( "<tr>" +
"<td colspan='3' bgcolor='#666633'>" +
"&nbsp;&nbsp&nbsp&nbsp"  +
"<a href='mb_diet.html' " + dietStyle + "><nobr>Diet & exercise</nobr></a>" +
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
"<a href='mb_sex.html' " + sexStyle + "><nobr>Sex & relationships</nobr></a>" +
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
"<a href='mb_habit.html' " + habitStyle + "><nobr>Personal habits</nobr></a>" +
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
"<a href='mb_heal.html' " + healthStyle + "><nobr>Health & illness</nobr></a>" +
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
"<a href='mb_socl.html' " + socialStyle + "><nobr>Social Occasions</nobr></a>" +
"&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;" +
"<a href='mb_humn.html' " + humanStyle + ">Humans</a>" +

"</td></tr> " ) ;