var menuList = new Array("markets", "projects");
var offset, openMenu, menuWidth, menuHeight, menuTop;
offset = 0;
menuWidth = 0;
menuHeight = 0;
menuTop = 0;
if(navigator.appName == "Netscape")
	var isNS4 = true;


function nowhere()
{
	return;
}	
	
function openMenu(menuName)
{
	//alert("Gets in this function");
	this.closeMenu();
	
	whichMenu = menuName;
	if(document.all)
	{
		// IE Menu Coordinates
		if(menuName == "markets")
		{
			
			
			offset = 53;  			// Distance for the left edge of the enu right of center.
			menuWidth = 110;  		// Width of the menu
			menuHeight = 160; 		// Height of the menu
			menuTop = 346;			// Top coordinates of the menu.
		}
		else
		{
			offset = 136;
			menuWidth=127;
			menuHeight=58;
			menuTop = 445;
		}
		menuObj = eval("document.all." + menuName + ".style");
		menuObj.pixelTop = menuTop;
		menuObj.pixelLeft = ((document.body.clientWidth / 2) + offset)
		menuObj.visibility = "visible";
	}
	else
	{
	
	// Netscape Menu Coordinates
		if(menuName == "markets")
		{
		
			// Coordinates for the Markets menu
			offset = 45;  		// Distance to the right of the center of the page
			menuWidth = 105;  	// Width of the Menu	
			menuHeight = 157;  	// Height of the menu
			menuTop = 322;
		}
		else
		{
			// Coordinates for the Projects menu
			offset = 129;
			menuWidth=127;
			menuHeight=58;
			menuTop = 440;
		}
		menuObj = eval("document." + menuName);
		menuObj.top = menuTop;
		menuObj.left = ((window.innerWidth  / 2) + offset)
		menuObj.visibility = "show";
	}
	//mouseMove();
}
var topCoord, leftCoord, rightCoord, bottomCoord;
var menuList = new Array("markets", "projects");

	
function closeMenu()
{
	whichMenu = null;
	for(i = 0; i < menuList.length; i++)
	{
		if(document.all)
		{
			menuObj = eval("document.all." + menuList[i] + ".style");
			menuObj.visibility = "hidden";
		}
		else
		{
			menuObj = eval("document." + menuList[i]);
			menuObj.visibility = "hide";
		}
	}
}



	
if(navigator.appName == 'Netscape') 
{
    document.captureEvents(Event.MOUSEMOVE);
    document.onmousemove = netscapeMouseMove;
}

function microsoftMouseMove() 
{
	
    if(window.event.x < ((document.body.clientWidth / 2) + offset) || window.event.x > ((document.body.clientWidth / 2) + offset) + menuWidth)
	{ 
	 	closeMenu()
		return;
    }
	
	if(window.event.y > ((menuTop + menuHeight) - document.body.scrollTop) || window.event.y < menuTop - document.body.scrollTop)
	{
		
		closeMenu()
		return;
	}
}
function netscapeMouseMove(e) 
{
    if(e.pageX < eval(parseInt(window.innerWidth  / 2) + offset) || e.pageX > eval(parseInt(window.innerWidth  / 2) + offset) + menuWidth) 
	{
		closeMenu()
		return;
	} 
	if(e.pageY > (menuTop + menuHeight) + 20 || e.pageY < menuTop)
	{
		closeMenu()
		return;
	}
}