
<!--
	// Global variables
	var layerList = new Array();
	var TimerID = Number( 0 );

	// Browser Detection
	var isIE=(document.all)?1:0;
	var isNS4=(document.layers)?1:0;
	var isNS6=((document.getElementById)&&(navigator.appName=='Netscape'))?1:0;
	var isNS=(isNS4)?1:0;
	var DHTML=(isIE||isNS4||isNS6)?1:0;
	var isMac=(navigator.userAgent.indexOf('Mac')!=-1)?1:0;
	var isIEMac=(isMac&&isIE)?1:0;
	var isIE4Mac=(isIEMac&&(navigator.appVersion.indexOf('4.',4)!=-1))?1:0;
	var isIE5Mac=(isIEMac&&(navigator.appVersion.indexOf('5.')!=-1))?1:0;	


	// This function builds the navigation menus
	// Uses: Global Arrays aMenus and aMenuItems
	function CreateMenus()
	{
		// Look through the list of menus and create them
		for ( iMenu=0; iMenu<aMenus.length; iMenu++ )
		{
			strMenu = String( aMenus[iMenu] );
			aMenu = strMenu.split( ',' );

			// Make sure this is a valid menu
			if ( aMenu.length == 3 )
			{
				// Build the HTML code for the menu
				strCode = String("");
				strCode += '<table border=0 cellspacing=0 cellpadding=0>';
				
				// Top of the table
				strCode += '<tr>';
				strCode += '<td width=1 bgcolor="#000000"><img src="/brew_2004/images/spacer.gif" width=1 height=8 border=0></td>';
				strCode += '<td bgcolor="#ffffff" colspan=3><img src="/brew_2004/images/spacer.gif" width=1 height=8 border=0></td>';
				strCode += '</tr>';

				// Add the links for all the items
				for ( i=0; i<aMenuItems.length; i++ )
				{
					strMenuItem = String( aMenuItems[i] );
					aMenuItem = strMenuItem.split( ',' );

					// Make sure this is a valid item
					if ( aMenuItem.length == 3  &&  aMenuItem[0] == aMenu[0] )
					{
						strCode += '<tr>';
						strCode += '<td width=1 bgcolor="#000000"><img src="/brew_2004/images/spacer.gif" width=1 height=1 border=0></td>';
						strCode += '<td width=8 bgcolor="#ffffff" ><img src="/brew_2004/images/spacer.gif" width=8 height=1 border=0></td>';
						strCode += '<td bgcolor="#ffffff" class="menu_link"><a href="' + aMenuItem[2] + '" class="menu_link" onmouseover="Subroll(true);" onmouseout="Subroll(false);">' + aMenuItem[1] + '</a></td>';
						strCode += '<td width=8 bgcolor="#ffffff"><img src="/brew_2004/images/spacer.gif" width=8 height=1 border=0></td>';
						strCode += '</tr>';
						
						strCode += '<tr>';
						strCode += '<td width=1 bgcolor="#000000"><img src="/brew_2004/images/spacer.gif" width=1 height=4 border=0></td>';
						strCode += '<td colspan=3 bgcolor="#ffffff"><img src="/brew_2004/images/spacer.gif" width=1 height=4 border=0></td>';
						strCode += '</tr>';
					}
				}
				
				strCode += '<tr>';
				strCode += '<td width=1 bgcolor="#000000"><img src="/brew_2004/images/spacer.gif" width=1 height=8 border=0></td>';
				strCode += '<td colspan=3 bgcolor="#ffffff"><img src="/brew_2004/images/spacer.gif" width=1 height=8 border=0></td>';
				strCode += '</tr>';

				strCode += '</table>';
				
				CreateMenu( aMenu[0], strCode, aMenu[1], aMenu[2] );
			}
		}
	}

	
	// Creates an individual menu
	function CreateMenu( strName, strCode, iX, iY )
	{
		z = layerList.length;
		layerList[ z ] = strName;

		if ( isNS4  &&  ! isNS6 ) 
		{
			document.write( '<layer name="' + strName + '" left=' + iX + ' top=' + iY + ' visibility="hide" z-index=' + z + '>');
			document.write( strCode );
			document.write( '</layer>\n' );
		}
		else
		{
			document.write('<div id="' + strName + '" style="position:absolute; overflow:none; left:' + iX + 'px; top:' + iY + 'px; visibility:hidden; z-index:' + z + '">');
			document.write( strCode );
			document.write('</div>');
		}
	}


	// Makes a menu visible
	function ShowMenu( strMenuName, bHideOthers )
	{
		if ( bLoaded == true )
		{
			for ( i=0; i<layerList.length; i++ )
			{
				var layer;

				if ( document.layers )
					layer = document.layers[ layerList[i] ];
				else if (document.all)
					layer = eval('document.all.' + layerList[i] + '.style');

				if ( layerList[i] == strMenuName )
				{
					if ( document.layers )
						layer.visibility = "show";
					if ( document.all )
						layer.visibility = "visible";
				}
				else
				if ( bHideOthers )
				{
					if ( document.layers )
						layer.visibility = "hide";
					if ( document.all )
						layer.visibility = "hidden";
				}
			}
		}
	}

	
	// This function is called when user rolls over a menu item, to make sure the menu doesn't hide
	function Subroll( bOn )
	{
		clearTimeout( TimerID );

		if ( ! bOn )
		{
			TimerID = setTimeout( 'HideMenus();', 1000 );
		}
	}


	// This function is called when user rolls over a menu item, to make sure the menu doesn't hide
	function Roll( strMenuName, bOn )
	{
		if ( bLoaded == true )
		{
			clearTimeout( TimerID );

			if ( bOn )
			{
				ShowMenu( strMenuName, true );
			}
			else
			{
				TimerID = setTimeout( 'HideMenus();', 1000 );
			}
		}
	}


	// Hides any visible menus
	function HideMenus()
	{
		if ( bLoaded == true )
		{
			clearTimeout( TimerID );
			ShowMenu( '', true );
		}
	}
//-->