
<!--
	// Global variables
	var g_objLayerList = new Array();
	var g_iTimerID = Number( 0 );
	
	var g_strVisibleMenus = [ "", "", "", "" ];
	var g_iMenuLevels = 3;

	// Browser Detection
	var bBrowser_isIE=(document.all)?1:0;
	var bBrowser_isNS4=(document.layers)?1:0;
	var bBrowser_isNS6=((document.getElementById)&&(navigator.appName=='Netscape'))?1:0;
	var bBrowser_isNS=(bBrowser_isNS4)?1:0;
	var bBrowser_isDHTML=(bBrowser_isIE||bBrowser_isNS4||bBrowser_isNS6)?1:0;
	var bBrowser_isMac=(navigator.userAgent.indexOf('Mac')!=-1)?1:0;
	var bBrowser_isIEMac=(bBrowser_isMac&&bBrowser_isIE)?1:0;
	var bBrowser_isIE4Mac=(bBrowser_isIEMac&&(navigator.appVersion.indexOf('4.',4)!=-1))?1:0;
	var bBrowser_isIE5Mac=(bBrowser_isIEMac&&(navigator.appVersion.indexOf('5.')!=-1))?1:0;	

	// This function builds the navigation menus
	// Uses: Global Arrays g_aMenus and g_aMenuItems
	function CreateMenus()
	{
		// Write out the opening divs
		document.write( '<div class="menu_outer_div"><center><div class="menu_inner_div">' );

		// Look through the list of menus and create them
		iMenuItem = Number( 1 );
		for ( iMenu=0; iMenu<g_aMenus.length; iMenu++ )
		{
			strMenu = String( g_aMenus[iMenu] );
			aMenu = strMenu.split( '|' );

			// Make sure this bBrowser_is a valid menu
			if ( aMenu.length == 4 )
			{
				// Build the HTML code for the menu
				strHTML = String("");

				strHTML += '<table width=152 border=0 cellspacing=0 cellpadding=0 bgcolor="#e5e5e5" class="menu">';
				
				// Add the links for all the items
				for ( i=0; i<g_aMenuItems.length; i++ )
				{
					strMenuItem = String( g_aMenuItems[i] );
					aMenuItem = strMenuItem.split( '|' );
					
					// Make sure this bBrowser_is a valid item
					if ( aMenuItem.length == 7  &&  aMenuItem[ MENUITEM_MENUNAME ] == aMenu[ MENU_NAME ] )
					{					
						strHTML += '<tr>';
						strHTML += '<td width=21><img src="/global/images/nav/menu-bullet.gif" width=21 height=20 border=0></td>';
						strHTML += '<td width=131 valign=center background="/global/images/nav/menu-item.gif">';
						strHTML += '<a';
						strHTML += ' href="' + aMenuItem[ MENUITEM_LINK ] + '"';
						strHTML += ' class="menu_link"';
						
						strHTML += ' onmouseover="Subroll(true);"';
						strHTML += ' onmouseout="Subroll(false);"';
						
						strHTML += '>'
						strHTML += aMenuItem[ MENUITEM_NAME ]
						strHTML += '</a></td>';

						strHTML += '</tr>';
					}
					iMenuItem++;
				}

				strHTML += '</table>' + '<p>';
				
				CreateMenu( aMenu[ MENU_NAME ], strHTML, aMenu[ MENU_LEFT ], aMenu[ MENU_TOP ] );
			}
		}
		document.write( '</center></div></div>' );
	}

	
	// Creates an individual menu
	function CreateMenu( strName, strHTML, iX, iY )
	{
		z = g_objLayerList.length;
		g_objLayerList[ z ] = strName;

		document.write('<div id="' + strName + '" style="position:absolute; left:' + iX + 'px; top:' + iY + 'px; width:120px; height:auto; visibility:hidden; z-index:' + (z+1000) + ';">');
		document.write( strHTML );
		document.write('</div>');
	}


	// Makes a menu visible
	function ShowMenu( strMenuName, iLevel )
	{
		if ( bLoaded == true )
		{
			// If this menu is already visible, then we're done
			if ( g_strVisibleMenus[ iLevel ] == strMenuName )
			{
				// Do nothing
			}
			else
			{
				// Hide the previous menu, if any
				for ( i=iLevel; i<=g_iMenuLevels; i++ )
				{
					if ( g_strVisibleMenus[ i ] != "" )
					{
						DocumentObject( g_strVisibleMenus[ i ], true ).visibility = "hidden";						
						g_strVisibleMenus[ i ] = "";
					}
				}
				
				// Show the menu
				if ( strMenuName != "" )
				{
					DocumentObject( strMenuName, true ).visibility = "visible";
				}
				
				// Remember that this menu is visible
				g_strVisibleMenus[ iLevel ] = strMenuName;
			}
		}
	}

	
	// This function bBrowser_is called when user rolls over a menu item, to make sure the menu doesn't hide
	function Subroll( bOn )
	{
		clearTimeout( g_iTimerID );

		if ( ! bOn )
		{
			g_iTimerID = setTimeout( 'HideMenus( 1 );', 1500 );
		}
	}


	// This function is called when user rolls over a menu item, to make sure the menu doesn't hide
	function MenuRoll( strMenuName, iLevel, bOn )
	{
		if ( bLoaded == true )
		{
			clearTimeout( g_iTimerID );

			if ( bOn )
			{
				ShowMenu( strMenuName, iLevel );
			}
			else
			{
				g_iTimerID = setTimeout( 'HideMenus( 1 );', 1500 );
			}
		}
	}

	// Hides any visible menus
	function HideMenus( iLevel )
	{
		if ( bLoaded == true )
		{
			clearTimeout( g_iTimerID );
			ShowMenu( '', iLevel );
		}
	}

//-->
