
	// -------------------------------------------------------------
	// Client-side global variables
	// -------------------------------------------------------------

	var sOpenMenuID = "";

	var iChunk = 0;
	var iChunkStep = 15;
	var iChunkDelay = 10;

	var sMenuStyle = "diagonal";	// values: "down", "across", "diagonal"

/* ----------------------------------------------------------------
   main function, doMenu, that hides any open pop-up menus, determines 
   which menu DIV to access, and starts its display 
	---------------------------------------------------------------- */

	function DoMenu() 
	{
		window.event.cancelBubble = true;
		var eSrc = window.event.srcElement;
		

		// ----------------------------------------------------------
		// If we have a menu open, close it
		// ----------------------------------------------------------

		if ("object" == typeof(document.all[sOpenMenuID])) 
		{
			document.all[sOpenMenuID].style.visibility = "hidden";

			// ----------------------------------------------------------
			// If the menu open is the one whose title we click then bail
			// ----------------------------------------------------------

			if (sOpenMenuID == eSrc.id.replace("imgMenuTitle","divMenu"))
			{
				sOpenMenuID = "";
				return false;
			}
			else 
			{
				sOpenMenuID = "";
			}
		}

		// ----------------------------------------------------------
		// If a menu title (other than that of an open menu) was clicked
		// ----------------------------------------------------------

		if ("clsMenuTitle" == eSrc.className) 
		{

		// ----------------------------------------------------------
		// Cancel default link behavior
		// ----------------------------------------------------------

			window.event.returnValue = false;

		// ----------------------------------------------------------
		// Get Menu associated with the Menu Title and make sure it exists
		// If it does, show the Menu
		// ----------------------------------------------------------

			sOpenMenuID = eSrc.id.replace("imgMenuTitle","divMenu")
			if ("object" == typeof(document.all[sOpenMenuID])) 
			{
				var eMenu = document.all[sOpenMenuID];
				iChunk = iChunkStep;

				// ----------------------------------------------------------
				// Get the offset of the parent TD, TR and TABLE for positioning the Menu
				// ----------------------------------------------------------

				var eTD = eSrc.parentElement.parentElement
				var eTR = eTD.parentElement
				var eTABLE = eTR.parentElement.parentElement;
				
				// ----------------------------------------------------------
				// Get the height if available off the source element for positioning the Menu
				// ----------------------------------------------------------

				//alert(eTABLE.width);
				//alert(eTABLE.offsetParent.offsetParent.offsetParent.offsetParent.offsetParent.offsetParent.offsetLeft);
				//alert(eTR.offsetTop);
				var nHEIGHT = 0;
				
				if (eSrc.height) 
				{
					nHeight = eSrc.height;
				}
				else 
				{
					nHeight = Number(eSrc.style.height.replace("px",""));
				}
				

				// ----------------------------------------------------------
				// Set the right and top offsets based on nHeight
				// ----------------------------------------------------------
				
				eMenu.style.left = eTABLE.offsetParent.offsetParent.offsetParent.offsetParent.offsetLeft + 165;
				//eMenu.style.top = eTABLE.offsetParent.offsetParent.offsetParent.offsetParent.offsetTop + eTR.offsetTop + 100;
				eMenu.style.top = 43 + eTR.offsetTop + 234;
				
				//alert(eTR.offsetTop);

				// ----------------------------------------------------------
				// Zero out the Menu size and start the ShowMenu process
				// ----------------------------------------------------------

				eMenu.style.clip = "rect(0 0 0 0)";
				eMenu.style.visibility = "visible";
				return window.setTimeout("ShowMenu(" + eMenu.id + ")", iChunkDelay);
			}
		}
	}

	// ----------------------------------------------------------
	// Function which returns the appropriate menu diplay animation
	// ----------------------------------------------------------

	function GetShowStyle() {
		if ("down" == sMenuStyle) return "rect(0 100% " + iChunk + "% 0)";
		if ("across" == sMenuStyle) return "rect(0 " + iChunk + "% 100% 0)";
		if ("diagonal" == sMenuStyle) return "rect(0 " + iChunk + "% " + iChunk + "% 0)";
		else return "rect(0 100% " + iChunk + "% 0)";
	}

	// ----------------------------------------------------------
	// Function which incrementally displays Menu in appropriate style
	// ----------------------------------------------------------

	function ShowMenu(eMenu) {
		eMenu.style.clip = GetShowStyle();
		if (100 >= iChunk) {
			window.setTimeout("ShowMenu(" + eMenu.id + ")", iChunkDelay);
		}
		iChunk += iChunkStep;
	}

	// ----------------------------------------------------------
	// Global document onclick event handler
	// ----------------------------------------------------------

	document.onclick = DoMenu;

