var curMenu = 1;
var menu;
var menu2;
var menu3;

var curI = 0;
var curJ = 0;

/*
	Override standard menu buildout in this file with functions for NYCO deployment 
*/

function addNewMenu(name, curImage, overImage)
{
//	alert(name)

 	menu = ms.addMenu(document.getElementById(name));
/*menu.addItem("testing3", "blah.jsp");
	menu.addItem("testing2", "blah.jsp");*/
	menu.onactivate = function() { changeImages(name, overImage) };
	menu.ondeactivate = function() { changeImages(name, curImage) };	
}

function addNewMenuOff(name, curImage, overImage)
{
//	alert(name)

 	menu = ms.addMenu(document.getElementById(name));

}

function addSub(name, url)
{
	menu.addItem(name, url);
}

function addSub2(name, url, i, j)
{

	if (curI != i || curJ != j)
	{
		//alert("New Menu#: " + i + ", " + j);
		// have to create new submenu
		menu2 = menu.addMenu(menu.items[i]);
		curI = i;
		curJ = j;

	}
	menu2.addItem(name, url);
}
	// set up drop downs anywhere in the body of the page. I think the bottom of the page is better.. 
	// but you can experiment with effect on loadtime.
	if (mtDropDown.isSupported()) {


		var ms = new mtDropDownSet(mtDropDown.direction.down, 0, 0, mtDropDown.reference.bottomLeft);

		
	}