 //TopNav.js

IE5=1; 

//Global drop-down menu objects
x1 = new Object();
x2 = new Object();

//x, y coordinates for the menu objects (used by mmhide [mouse-move hide] function to know when to hide menus)
var Top, Left, Bottom, Right;
Top = 0;  Left = 0;  Bottom = 0; Right = 0;


//grabs an object by name
function getObj(name) 
{
	return document.getElementById(name).style;
}

//cross-browser variables    //ie = hidden, visible
var hide = "";               //ns = hide, show
var show = "";

hide="hidden"; 
show="visible"; 

function hideAll() 
{
	/* cross-browser object vars (x1, x2, etc. = the pull-down menus) defined after the <divs> in the document. */
	x1.visibility = hide;

//rt 040514
	x2.visibility = hide;
}

function showMenu(name, aName, homePage) 
{
	
	{ //the menus won't show over Flash animations in anything but IE.
		hideAll();
		position = getAnchorPosition(aName);
		x = getObj(name);
		//offset positions
		var offsetY, offsetX;
		
		Top = 200;
		Left = position.x;
							
		x.top = 263;
		x.left = Left;

		Right = Left + 130; 
		Bottom = Top + 130;
			
		x.visibility = show;
	} 
}

function mmHide(e) 
	{	
		//mouse move hide
		
		/* cross-browser object vars (x1, x2, etc. = the pull-down menus) defined after the <divs> in the document. */
		if ((x1.visibility == "HIDDEN")||(x1.visibility == "VISIBLE")) 
		{ 
			//in other words, is this Opera?
			mouseX = window.event.x;
			mouseY = window.event.y;
		} 
		else 
		{
			mouseX = window.event.x+document.body.scrollLeft;
			mouseY = window.event.y+document.body.scrollTop;  
		}

	//rt 040514
		if ((x2.visibility == "HIDDEN")||(x2.visibility == "VISIBLE")) 
		{ 
			//in other words, is this Opera?
			mouseX = window.event.x;
			mouseY = window.event.y;
		} 
		else 
		{
			mouseX = window.event.x+document.body.scrollLeft;
			mouseY = window.event.y+document.body.scrollTop;  
		}

		if ((mouseX > Right)||(mouseX < Left)||(mouseY > Bottom)||(mouseY < Top)) 
		{
			//hideAll(); 	
		}
	}
