<!--
// Browser Detection:
var USER_AGENT = navigator.userAgent.toLowerCase();
//alert(USER_AGENT);
var IS_IE = (USER_AGENT.indexOf("msie") > 0);
var IS_FF = (USER_AGENT.indexOf("firefox") > 0);
var IS_OP = (USER_AGENT.indexOf("opera") > 0);

// Mouse Movement Tracking:
var CURRENT_X = 0;
var CURRENT_Y = 0;

// Tooltip Menu:
var TOOLTIP_X_OFFSET = 20;
var TOOLTIP_Y_OFFSET = 10;
var TOOLTIP_ARROW_IMAGE_HEIGHT = 15;

// Menu Constants:
var MENU_VISIBLE = true;
var MENU_INVISIBLE = false;

//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// Function:  MenuObject
// Purpose:   A custom object to represent a menu within the web application.
// Arguments:
//			  isMenuVisible -- Stores whether or not the menu is visible
//			  menuLinkID -- Stores the element ID for the menu link
//			  menuID -- Stores the element ID for the menu
//			  menuLinkClassName -- Stores the CSS class for the menu link
//			  menuClassName -- Stores the CSS class for the menu
//			  menuLinkHoverName -- Stores the CSS class for the menu link when hovering
//			  menuHoverClassName -- Stores the CSS class for the menu when hovering			
//			  menuMinX -- The minimum X coordinate value
//			  menuMinY -- The minimum Y coordinate value
//			  menuMaxX -- The maximum X coordinate value
//			  menuMaxY -- The maximum Y coordinate value
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
function MenuObject(isMenuVisible, menuLinkID, menuID, menuLinkClassName, menuClassName, menuLinkHoverClassName, menuHoverClassName, menuMinX, menuMinY, menuMaxX, menuMaxY)
{
	this.IsMenuVisible = isMenuVisible;
	this.MenuLinkID = menuLinkID;
	this.MenuID = menuID;
	this.MenuLinkClassName = menuLinkClassName;
	this.MenuClassName = menuClassName;
	this.MenuLinkHoverClassName = menuLinkHoverClassName;
	this.MenuHoverClassName = menuHoverClassName;
	this.MinX = menuMinX;
	this.MinY = menuMinY;
	this.MaxX = menuMaxX;
	this.MaxY = menuMaxY;
	// Accessors for the DOM elements represented by the ID values.
	this.GetMenuLink = function() {return document.getElementById(this.MenuLinkID);};
	this.GetMenu =  function() {return document.getElementById(this.MenuID);};

	this.AlterVisibility = function(isVisible, menuText)
	{
		// Retrieve the DOM element references.
		var menuLinkElement = this.GetMenuLink();
		var menuElement = this.GetMenu();
		
		if ((menuLinkElement != null) && (menuElement!= null))
		{
			this.IsMenuVisible = isVisible;
			if (menuText != "")
			{
				menuElement.innerHTML = menuText;
			}
			menuLinkElement.className = ((this.IsMenuVisible == true) ? this.MenuLinkHoverClassName : this.MenuLinkClassName);
			menuElement.className = ((this.IsMenuVisible == true) ? this.MenuHoverClassName : this.MenuClassName);
		}
	}
	
	this.GetExternalContent = function(fileURL, defaultContent)
	{
		var menuElement = this.GetMenu();	
	
		if ((fileURL != null) && (fileURL != "") && (menuElement != null))
		{
			var content = getExternalFileContent(fileURL);
			
			menuElement.innerHTML = (content != "") ? content : defaultContent;
		}
	}	
}

// Represents the Navigation menu.
var NAV_MENU = new MenuObject(false, "aNavigation", "divNavigation", "absPosition navMenuBase", "displayNone", "absPosition navMenuBase navMenuHover", "absPosition dropShadowMenuBase displayBlock", 5, 90, 305, 415);
// Represents the Navigation base IFRAME menu.
var NAV_BASE_MENU = new MenuObject(false, "ifMenu", "ifMenu", "displayNone", "displayNone", "absPosition dropShadowMenuBase displayBlock", "absPosition dropShadowMenuBase displayBlock", 5, 90, 305, 415);
// Represents the tooltip menu.
var TOOLTIP_MENU = new MenuObject(false, "tooltipArrow", "tooltipText", "displayNone", "displayNone", "absPosition tooltipBase noBorder displayBlock", "absPosition tooltipBase padding5px displayBlock", 0,0,0,0);
// Represents the contact menu.
var CONTACT_MENU = new MenuObject(false, "aContact", "contactQuickMenu", "absPosition navMenuBase", "displayNone", "absPosition navMenuBase", "absPosition dropShadowMenuBase displayBlock", 650, 45, 694, 71);

// Capture the mouse movement for the document.
if (!(IS_IE)) {document.captureEvents(Event.MOUSEMOVE);}
document.onmousemove = TrackMouseMovement;

//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
// Function:  TrackMouseMovement
// Purpose:   Tracks the movement of the mouse pointer for the current window.
// Arguments:
//			  e -- The current event (Used by Non-IE browsers)
//\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\\
function TrackMouseMovement(e)
{
	// Determine which event to use based on the first, non-null reference.
	var evt = (e) || (window.event);
	
	// Store the current mouse position.
	if (evt.pageX || evt.pageY)
	{
		CURRENT_X = evt.pageX;
		CURRENT_Y = evt.pageY;
	}
	else
	{
		if ((evt != null) && (document.body != null))
		{
			if ((evt.clientX != null) && (document.body.scrollLeft != null) && (document.body.clientLeft != null))
			{
				CURRENT_X = evt.clientX + document.body.scrollLeft - document.body.clientLeft;
			}
			if ((evt.clientY != null) && (document.body.scrollTop != null) && (document.body.clientTop != null))
			{		
				CURRENT_Y = evt.clientY + document.body.scrollTop  - document.body.clientTop;
			}
		}
	}
	
	// Determine whether to act upon the visibility of the navigation menu.
	if (NAV_MENU.IsMenuVisible == true)
	{
		if ((CURRENT_X < NAV_MENU.MinX) || (CURRENT_X > NAV_MENU.MaxX) || (CURRENT_Y < NAV_MENU.MinY) || (CURRENT_Y > NAV_MENU.MaxY))
		{
			NAV_BASE_MENU.AlterVisibility(false, '');
			NAV_MENU.AlterVisibility(false, '');
		}
	}
	// Determine whether to act upon the visibility of the contact menu.
	if (CONTACT_MENU.IsMenuVisible == true)
	{
		if ((CURRENT_X < CONTACT_MENU.MinX) || (CURRENT_X > CONTACT_MENU.MaxX) || (CURRENT_Y < CONTACT_MENU.MinY) || (CURRENT_Y > CONTACT_MENU.MaxY))
		{
			CONTACT_MENU.AlterVisibility(false, '');
		}
	}
	// Determine whether to act upon the visibility of the tooltip menu.
	if (TOOLTIP_MENU.IsMenuVisible == true)
	{
		if (TOOLTIP_MENU.GetMenuLink() != null)
		{
			TOOLTIP_MENU.GetMenuLink().style.left = (CURRENT_X + TOOLTIP_X_OFFSET) + "px";	
			TOOLTIP_MENU.GetMenuLink().style.top = (CURRENT_Y + TOOLTIP_Y_OFFSET) + "px";
		}
		if (TOOLTIP_MENU.GetMenu() != null)
		{
			TOOLTIP_MENU.GetMenu().style.left = (CURRENT_X) + "px";	
			// Position the tooltip text below the tooltip arrow, and take into account the 1px border.
			TOOLTIP_MENU.GetMenu().style.top = (CURRENT_Y + ((TOOLTIP_Y_OFFSET + TOOLTIP_ARROW_IMAGE_HEIGHT) - 1)) + "px";	
		}
	}
}


-->
