var vStyleLevel1 = 'menubar';
var vStyleLevel2 = 'smenubar';
var vStyleLevel3 = 'ssmenubar';
var vMenu = new Array(
				new Array('Home', 'index.htm', 'Home', '_self', 'home topmenu'),
				new Array('About Us', 'about.htm', 'About Us', '_self', 'topmenu',
					new Array(
						new Array('QC Measures', 'qc.htm', 'QC Measures', '_self', 'submenu'),
						new Array('Innovations', 'innserv.htm', 'Innovations', '_self', 'submenu'),
						new Array('Applications', 'app.htm', 'Applications', '_self', 'submenu')
					)
				),
				new Array('Products', 'products.htm', 'Products', '_self', 'topmenu',
					new Array(
						new Array('Safety Relief Valve', 'safety.htm', 'Safety Relief Valve', '_self', 'submenu',
							new Array(
								new Array('<i>Safe-Flow</i> BTS 50', 'sf_sf50.htm', 'Safe-Flow BTS 50', '_self', 'subsubmenu'),
								new Array('<i>Safe-Line</i> BTSC 50 BL', 'sf_sl50.htm', 'Safe-Line BTSC 50 BL', '_self', 'subsubmenu'),
								new Array('<i>Thermo-Safe</i> BTS 10', 'sf_trml10.htm', 'Thermo-Safe BTS 10', '_self', 'subsubmenu'),
								new Array('<i>Thermo-Safe</i> BTS 11', 'sf_trml11.htm', 'Thermo-Safe BTS 11', '_self', 'subsubmenu'),
								new Array('<i>Hi-Flow</i> BTSC 50 W', 'sf_sf50.htm#hf', 'Hi-Flow - BTSC 50 W', '_self', 'subsubmenu'),
								new Array('Bronze Safety Valve - BTS 60', 'sf_brz60.htm', 'Bronze Safety Valve - BTS 60', '_self', 'subsubmenu')
							)
						),
						new Array('Pressure Reducing Valve & Station', 'pressure.htm', 'Pressure Reducing Valve & Station', '_self', 'submenu',
							new Array(
								new Array('Pressure Reducing Valve', 'pr_prv.htm', 'Pressure Reducing Valve', '_self', 'subsubmenu'),
								new Array('Pressure Reducing Station', 'pr_prs.htm', 'Pressure Reducing Station', '_self', 'subsubmenu'),
								new Array('<i>Max-Flow</i> Gas Regulator', 'pr_lprv.htm', 'Max-Flow Gas Regulator', '_self', 'subsubmenu'),
								new Array('Gas Skid', 'pr_gskd.htm', 'Gas Skid', '_self', 'subsubmenu')
							)
						),
						new Array('<i>Actrol</i>&nbsp;-&nbsp;Automatic Control Valve', 'automatic.htm', 'Automatic Control Valve', '_self', 'submenu'),
						new Array('Pneumatic Control Valve', 'pneumatic.htm', 'Pneumatic Control Valve', '_self', 'submenu',
							new Array(
								new Array('<i>Accu-Flow</i> PCV 77', 'pn_afl77.htm', 'Accu-Flow PCV 77', '_self', 'subsubmenu'),
								new Array('<i>Accu-Flow</i> PCV 87', 'pn_afl87.htm', 'Accu-Flow PCV 87', '_self', 'subsubmenu')
							)
						),
						new Array('Plastic Lined Products', 'plastic.htm', 'Plastic Lined Products', '_self', 'submenu',
							new Array(
								new Array('Ball Valve', 'pl_ball.htm', 'Ball Valve', '_self', 'subsubmenu'),
								new Array('Plug Valve', 'pl_plug.htm', 'Plug Valve', '_self', 'subsubmenu'),
								new Array('Butterfly Valve', 'pl_btrfly.htm', 'Butterfly Valve', '_self', 'subsubmenu'),
								new Array('Diaphragm Valve', 'pl_diaph.htm', 'Diaphragm Valve', '_self', 'subsubmenu'),
								new Array('Safety Relief Valve', 'sf_sl50.htm', 'Safety Relief Valve', '_self', 'subsubmenu'),
								new Array('Ball Check Valve', 'pl_ballchk.htm', 'Ball Check Valve', '_self', 'subsubmenu'),
								new Array('Wafer Check Valve', 'pl_wafer.htm', 'Wafer Check Valve', '_self', 'subsubmenu'),
								new Array('Flush Bottom Valve', 'pl_flush.htm', 'Flush Bottom Valve', '_self', 'subsubmenu'),
								new Array('Sight Flow Indicator', 'pl_sight.htm', 'Sight Flow Indicator', '_self', 'subsubmenu'),
								new Array('Pipes, Fittings & Accessories', 'pl_pfa.htm', 'Pipes, Fittings & Accessories', '_self', 'subsubmenu')
							)
						)
					)
				),
				new Array('Contact Us', 'contact.php', 'Contact Us', '_self', 'topmenu')
			);

function RenderMenu()
{
	var i, j, k;

	var obj = document.getElementById('menu'); if(!obj) return;

	var vHTML = '<ul class="' + vStyleLevel1 + '" id="dmenu">';
	
	for(i=0; i<vMenu.length; i++)
	{
		vHTML += '<li class="' + vMenu[i][4] + '" onmouseover="ShowMenu(this);" onmouseout="HideMenu(this);"><a title="' + vMenu[i][2] + '" href="' + vMenu[i][1] + '">' + vMenu[i][0] + '</a>';
		
		if(vMenu[i].length==6)
		{
			vHTML += '<ul class="' + vStyleLevel2 + '">';
			
			for(j=0; j<vMenu[i][5].length; j++)
			{
				vHTML += '<li class="' + vMenu[i][5][j][4] + '"><a title="' + vMenu[i][5][j][2] + '" href="' + vMenu[i][5][j][1] + '">' + vMenu[i][5][j][0] + '</a>';
				
/*				if(vMenu[i][5][j].length==6)
				{
					vHTML += '<ul class="' + vStyleLevel3 + '">';
					
					for(k=0; k<vMenu[i][5][j][5].length; k++)
					{
						vHTML += '<li class="' + vMenu[i][5][j][5][k][4] + '"><a title="' + vMenu[i][5][j][5][k][2] + '" href="' + vMenu[i][5][j][5][k][1] + '">' + vMenu[i][5][j][5][k][0] + '</a></li>';
					}
					
					vHTML += '</ul>';
				}*/
				
				vHTML += '</li>';
			}

			vHTML += '</ul>';
		}
				
		vHTML += '</li>';
	}

	vHTML += '</ul>';

	obj.innerHTML = vHTML;
}

function ShowMenu(obj)
{
	this.className += ' over';

	try
	{
		obj = obj.childNodes[1];

/*		if(obj.filters)
		{
			obj.style.filter = 'revealTrans(duration=1, transition=5)';
			obj.filters[0].Apply();
			obj.style.visibility = 'visible';
			obj.filters[0].Play();
		}
		else*/
			obj.style.visibility = 'visible';
	}
	catch(e) { }
}

function HideMenu(obj)
{
	this.className = this.className.replace(' over', '');
	
	try
	{
		obj = obj.childNodes[1];

/*		if(obj.filters)
		{
			obj.style.filter = 'revealTrans(duration=1, transition=4)';
			obj.filters[0].Apply();
			obj.style.visibility = 'hidden';
			obj.filters[0].Play();
		}
		else*/
			obj.style.visibility = 'hidden';
	}
	catch(e) { }
}

if(window.attachEvent)
	window.attachEvent('onload', RenderMenu);
else
	window.addEventListener('load', RenderMenu, false);