var b_base="http://www.bu.edu";
var b_baseURL="/dbin/ece/web/";
var sticky;

function b_mouseOver(itm){
	document.body.style.cursor = "arrow";
	itm.className='b_hilite';
}

function b_mouseOut(itm){
	itm.className='b_normal';
}

function makeItem(title,token,forceHilite)
{
	var dTitle="&nbsp;&nbsp;&nbsp;"+title+"&nbsp;&nbsp;&nbsp;";
	var className="b_normal";

	if (token == sticky) forceHilite=true;

	if (forceHilite){
		className="b_hilite";
	}

	document.write('<TD ALIGN=CENTER CLASS="'+className+'"');
	document.write(' ID=bb_"' + token + '" ');
	if (!forceHilite){
		document.write('onMouseOver="b_mouseOver(this);" onMouseOut="b_mouseOut(this);"');
	}
	document.write(' onClick="window.location=\'' + b_base + b_baseURL + token + '\'" ');	
	document.writeln('>');

	document.writeln('<A CLASS="b_noLink" HREF="'+ b_base + b_baseURL+token+'">');
	document.write(dTitle);
	document.writeln('</A></TD>');
}

function ai_hilight()
{
	var cLoc = String(window.location);
	var idTg = String;
	var idTgb= String;
	var diIn;
	var baseEnd;
	var itm;

	baseEnd = cLoc.indexOf(b_baseURL);
	idTg = cLoc.substring(baseEnd + b_baseURL.length);
	diIn = idTg.indexOf("/");
	if (diIn>0){
		idTgb = idTg.substring(0,idTg.indexOf("/"));
	}else{
		idTgb = idTg;
	}
	sticky = idTgb;
}

function makeMenubar()
{
	ai_hilight();
	document.writeln('<TABLE CLASS="menu" CELLPADDING=0 CELLSPACING=1>');
	document.writeln('<TR>');
	makeItem("Home","");
	makeItem("About the Department","about");
	makeItem("Undergraduate Programs","undergrad");
	makeItem("Graduate Programs","grad");
	makeItem("Research","research");
	makeItem("People","people");
	makeItem("News & Events","news");
	document.writeln('</TR>');
	document.writeln('</TABLE>');
}

