// Client-side global variables
// -------------------------------------------------------------
var sOpenTD = "";
var sPrevState = "";

if (document.images)
{
	var menuImg=new Image();
	menuImg.src="menuarrowOn.gif";
}

function menuChange(eSrc, clsName)
{
	var theImg = document.images["menuImg" + eSrc.getAttribute("id")];
	
	if(eSrc.tagName == "TD"){
		if(sOpenTD != "")
			if(sPrevState != "")
			{
				sOpenTD.className = sPrevState;
				if(theImg)
				{	
					// added this statement because img src changes where
					// visible in Netscape 6
					if(theImg.src != "http://associationforum.webitects.com/images/menuarrowOn.gif")
					{
						// swap image for "on" version
						theImg.src="/images/menuarrowOn.gif";
						
						// turn off all other images and TDs
						for(var i=1; i<7; i++)
							if(document.images["menuImg0" + i] != theImg && document.images["menuImg0" + i].src != "http://associationforum.webitects.com/images/menuarrow.gif")
								document.images["menuImg0" + i].src = "/images/menuarrow.gif";
					}
				}
				
			}
			else
			{	
				sOpenTD.className = "glbMenu";
			}
			
		sPrevState = eSrc.className;	
		sOpenTD = eSrc;
		
		eSrc.className = clsName;
	}
	
}
