// mainmenu.js

var sPath = window.location.pathname;
var sDeli = '\\';
// var sDeli = '/';
var sPage = sPath.substring(sPath.lastIndexOf(sDeli) + 1);
//alert(sPage);

if (true)
	sRoot = "/";
else
	sRoot = "";

var i = 0;
var iLoc = "images/"
var domain = "/misbehavin/"
var pageName = new Array(6);
var imageText = new Array(6);
var imageSelected = new Array(6);
var imageOff = new Array(6);
var imageOn = new Array(6);

pageName[i] = "default.aspx";
imageText[i] = "home";
imageSelected[i] = iLoc + "home1.jpg";
imageOff[i] = iLoc + "home0.jpg";
imageOn[i] = iLoc + "home1.jpg";
i++;
pageName[i] = "mbschedule.aspx";
imageText[i] = "calendar";
imageSelected[i] = iLoc + "calendar1.jpg";
imageOff[i] = iLoc + "calendar0.jpg";
imageOn[i] = iLoc + "calendar1.jpg";
i++;
pageName[i] = "music.aspx";
imageText[i] = "music";
imageSelected[i] = iLoc + "music1.jpg";
imageOff[i] = iLoc + "music0.jpg";
imageOn[i] = iLoc + "music1.jpg";
i++;
pageName[i] = "photos.aspx";
imageText[i] = "photos";
imageSelected[i] = iLoc + "photos1.jpg";
imageOff[i] = iLoc + "photos0.jpg";
imageOn[i] = iLoc + "photos1.jpg";
i++;
pageName[i] = "bios.aspx";
imageText[i] = "bios";
imageSelected[i] = iLoc + "bios1.jpg";
imageOff[i] = iLoc + "bios0.jpg";
imageOn[i] = iLoc + "bios1.jpg";
i++;
pageName[i] = "gear.aspx";
imageText[i] = "gear";
imageSelected[i] = iLoc + "gear1.jpg";
imageOff[i] = iLoc + "gear0.jpg";
imageOn[i] = iLoc + "gear1.jpg";

document.write("<table border=\"0\" align=\"right\"><tr>")
for (j=0; j<i+1; j++)
{
	if ((sPage == sRoot + pageName[j]) || sPage == domain + pageName[j] || ((sPage == sRoot || sPage == domain) && (pageName[j] == "index.htm")))
	{
                // current page
		document.write("<td valign=\"middle\"><img src=\"" + imageSelected[j] + "\" alt=\"You are on the " + imageText[j] + " page.\" title=\"You are on the " + imageText[j] + " page.\" /></td>");
	}
	else
	{
		// link
		document.write("<td valign=\"middle\"><a href=\"" + pageName[j] + "\"><img src=\"" + imageOff[j] + "\" alt=\"Go to the " + imageText[j] + " page.\"  title=\"Go to the " + imageText[j] + " page.\" onmouseover=\"this.src='" + imageOn[j] + "'\" onmouseout=\"this.src='" + imageOff[j] + "'\" /></a></td>");
	}
}
document.write("</tr></table>")


