
<!--
	// 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=166 border=0 cellspacing=0 cellpadding=1 bgcolor="#808080"><tr><td>';
				strHTML += '<table width=164 border=0 cellspacing=0 cellpadding=0 bgcolor="#ffffff">';

				// Is this the first menu item ?
				bFirstItem = true;
				
				// 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 == 6  &&  aMenuItem[ MENUITEM_MENUNAME ] == aMenu[ MENU_NAME ] )
					{
						// How tall is this menu item
						iUnitsTall = Number( aMenuItem[ MENUITEM_UNITSTALL ] );
						iPixelsTall = String( Number( MENU_UNIT_HEIGHT[ iUnitsTall ] ) );

						// Is there a sub menu for this item?
						bSubMenu = aMenuItem[ MENUITEM_HASSUBMENU ] == "true";

						strHTML += '<tr>';
						strHTML += '<td width=10><img src="/globimag/spacer.gif" width=10 height=' + iPixelsTall + ' border=0></td>';
						strHTML += '<td width=144 valign=center>';
						strHTML += '<a';
						strHTML += ' href="' + aMenuItem[ MENUITEM_LINK ] + '"';
						strHTML += ' class="' + ( aMenuItem[ MENUITEM_HASSUBMENU ] == "true" ? 'nav_parent_link' : 'nav_link' ) + '"';
						
						if ( bSubMenu )
						{
							strHTML += ' onmouseover="MenuRoll(\'' + aMenuItem[ MENUITEM_SUBMENUNAME ] + '\',' + ( Number( aMenu[ MENU_LEVEL ] ) + 1 ) + ',true); Subroll(true);"';
							strHTML += ' onmouseout="Subroll(false);"';
						}
						else
						{
							strHTML += ' onmouseover="HideMenus( ' + ( Number( aMenu[ MENU_LEVEL ] ) + 1 ) + ')"; Subroll(true);"';
							strHTML += ' onmouseout="Subroll(false);"';
						}
						
						strHTML += '>'
						strHTML += aMenuItem[ MENUITEM_NAME ]
						strHTML += '</a></td>';
												
						strHTML += '<td width=10><img src="/globimag/spacer.gif" width=10 height=1></td>';
						strHTML += '</tr>';
					}
					iMenuItem++;
				}

				strHTML += '</table></td></tr></table>' + '<p>';
				
				CreateMenu( aMenu[ MENU_NAME ], strHTML, 
					( Number( aMenu[ MENU_LEFT ] ) - ( bHome ? HOME_SHIFT_LEFT : 0 ) ), 
					( Number( aMenu[ MENU_TOP ] ) - ( bHome ? HOME_SHIFT_UP : 0 ) ) );
			}
		}
		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";
						// DocumentObject( g_strVisibleMenus[ i ] + "_div", true ).visibility = "hidden";
						
						g_strVisibleMenus[ i ] = "";
					}
				}
				
				// Show the menu
				if ( strMenuName != "" )
				{
					DocumentObject( strMenuName, true ).visibility = "visible";
					// DocumentObject( strMenuName + "_div", 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 );', 2000 );
		}
	}


	// This function bBrowser_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 );', 2000 );
			}
		}
	}

	// Hides any visible menus
	function HideMenus( iLevel )
	{
		if ( bLoaded == true )
		{
			clearTimeout( g_iTimerID );
			ShowMenu( '', iLevel );
		}
	}


//-->