
<!--
	// Global variables
	var g_objLayerList = new Array();
	var g_iTimerID = Number( 0 );
	
	var g_strVisibleMenus = [ "", "", "", "" ];
	var g_iMenuLevels = 3;
	var g_strSection = String("");

	// 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 == 6 )
			{
				// Build the HTML code for the menu
				strHTML = String("");

				// How wide is the menu item
				iUnitsWide = Number( aMenu[ MENU_WIDTH ] );
				iPixelsWide = String( Number( MENU_UNIT_WIDTH[ iUnitsWide ] ) );

				// Color scheme?
				strBackgroundColor = ( ( aMenu[ MENU_COLOR ] == "red" ) ? "A27F79" : "8C7E5A" )

				strHTML += '<table width=' + iPixelsWide + ' border=0 cellspacing=0 cellpadding=0>';

				// 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 == 7  &&  aMenuItem[ MENUITEM_MENUNAME ] == aMenu[ MENU_NAME ] )
					{

						// Add the dividor if needed
						if ( bFirstItem )
						{	
							strHTML += '<tr>';
							strHTML += '<td width=10><img src="/images/spacer.gif" width=10 height=4 border=0></td>';
							strHTML += '<td width=100%><img src="/images/spacer.gif" width=1 height=1 border=0></td>';
							strHTML += '<td width=10><img src="/images/spacer.gif" width=10 height=1 border=0></td>';
							strHTML += '</tr>';			
							strHTML += '<tr>';
							strHTML += '<td width=10 bgcolor="#' + strBackgroundColor + '"><img src="/images/spacer.gif" width=10 height=1 border=0></td>';
							strHTML += '<td width=100% bgcolor="#' + strBackgroundColor + '"><img src="/images/spacer.gif" width=1 height=1 border=0></td>';
							strHTML += '<td width=10 bgcolor="#' + strBackgroundColor + '"><img src="/images/spacer.gif" width=10 height=1 border=0></td>';
							strHTML += '</tr>';
							
							bFirstItem = false;

						}
								
					
						// 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 background="/images/nav/nav_bak_' + aMenu[ MENU_COLOR ] + '.gif"><img src="/images/spacer.gif" width=10 height=' + iPixelsTall + ' border=0></td>';
						strHTML += '<td width=100% background="/images/nav/nav_bak_' + aMenu[ MENU_COLOR ] + '.gif"  valign=center>';
						strHTML += '<a';
						strHTML += ' href="' + aMenuItem[ MENUITEM_LINK ] + '"';
						strHTML += ' class="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 += '><nobr>'
						strHTML += aMenuItem[ MENUITEM_NAME ]
						strHTML += '</a></td>';
						
						strHTML += '<td width=10 background="/images/nav/nav_bak_' + aMenu[ MENU_COLOR ] + '.gif"><img src="/images/spacer.gif" width=10 height=1></td>';
						strHTML += '</tr>';

						strHTML += '<tr><td bgcolor="#' + strBackgroundColor + '" colspan=3><img src="/images/spacer.gif" width=1 height=1 border=0></td></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 ( g_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 );', 500 );
		}
	}


	// 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 ( g_bLoaded == true )
		{
			clearTimeout( g_iTimerID );

			if ( bOn )
			{
				ShowMenu( strMenuName, iLevel );
			}
			else
			{
				g_iTimerID = setTimeout( 'HideMenus( 1 );', 500 );
			}
		}
	}

	// Hides any visible menus
	function HideMenus( iLevel )
	{
		if ( g_bLoaded == true )
		{
			clearTimeout( g_iTimerID );
			if ( iLevel == 1 ) {
				ShowMenu( g_strSection, iLevel );
			} else {
				ShowMenu( '', iLevel );
			}
		}
	}


//-->