// please keep in alpha order by function

function isIE()
{
	return (window.ActiveXObject != null); 
}


function writeNavButtons()
{
	var oppor="opportunity.htm";
	var btns = new Array("btnred.gif","btnblue.gif","btnyellow.gif","btngreen.gif");
	var pages = new Array("index.htm","aboutus.htm",
							"homestudy.htm",oppor,"forms.htm","contact.htm");
	var names = new Array("Home","About Us",
							"Home Study","Opportunities","Kids First Forms","Contact Us");
	var loc = location + "";
	var ls = loc.lastIndexOf("/");
	if (ls > 0)
		loc = loc.substr(ls + 1);
	if (loc.length > 6 && loc.substr(0,6)=='Advert')
	{
		loc = oppor;
	}
	var s = "<table border=0>";
	for (var i=0;i<pages.length;i++)
	{
		var fc = "black";
		var bi = btns[i % btns.length];
		var nm = names[i].replace(" ","&nbsp;");
		while (nm.indexOf(" ")>-1)
			nm = nm.replace(" ","&nbsp;");			
		if (loc == pages[i])
		{
			fc = "gray";
			bi = "btngray.gif";
		}
		s += "<tr><td><a style='width:150px;height:45px;"
			+ "text-align:center;";
		if (isIE())
		{
			s += "line-height:45px;"
		}
		else
		{
			s += "vertical-align:middle;display:table-cell;";
		}
		s += "font-weight:bold;text-decoration:none;"
			+ "color:" + fc + ";"
			+ "background-image:url(" + bi + ");'"
			+ " href='" + pages[i] + "'>" + nm + "</a></td></tr>";
	}
	document.write(s + "</table>");
}

