var scrollTim=1;
var current

menuArr = new Array()

menuArr[1] = new Array()
menuArr[1][0] = "100"
menuArr[1][1] = new Array()
menuArr[1][1][1] = "About Us"
menuArr[1][1][2] = "../TEL/TELAboutUs.htm"
menuArr[1][1][3] = "a11"
menuArr[1][2] = new Array()
menuArr[1][2][1] = 'Mission'
menuArr[1][2][2] = '../TEL/TELMission.htm'
menuArr[1][2][3] = "a12"
menuArr[1][3] = new Array()
menuArr[1][3][1] = 'Careers'
menuArr[1][3][2] = '../TEL/TELCareers.htm'
menuArr[1][3][3] = "a14"


menuArr[2] = new Array()
menuArr[2][0] = "110"
menuArr[2][1] = new Array()
menuArr[2][1][1] = "Products"
menuArr[2][1][2] = "../TELLABS/LABSProducts.htm"
menuArr[2][1][3] = "a21"
menuArr[2][2] = new Array()
menuArr[2][2][1] = "Customers"
menuArr[2][2][2] = "../TELLABS/LABSCustomers.htm"
menuArr[2][2][3] = "a22"
menuArr[2][3] = new Array()
menuArr[2][3][1] = "Customer Support"
menuArr[2][3][2] = "../TELLABS/LABSSupport.htm"
menuArr[2][3][3] = "a24"


menuArr[3] = new Array()
menuArr[3][0] = "115"
menuArr[3][1] = new Array()
menuArr[3][1][1] = "Products"
menuArr[3][1][2] = "#"
menuArr[3][1][3] = "a31"
menuArr[3][2] = new Array()
menuArr[3][2][1] = "&nbsp;&nbsp;&nbsp;- Flow Meters"
menuArr[3][2][2] = '../TELTECH/TECHProdFlow.htm'
menuArr[3][2][3] = "a32"
menuArr[3][3] = new Array()
menuArr[3][3][1] = '&nbsp;&nbsp;&nbsp;- Level gauges'
menuArr[3][3][2] = '../TELTECH/TECHProdLevel.htm'
menuArr[3][3][3] = "a33"
menuArr[3][4] = new Array()
menuArr[3][4][1] = '&nbsp;&nbsp;&nbsp;- Tank Fittings'
menuArr[3][4][2] = '../TELTECH/TECHProdFittings.htm'
menuArr[3][4][3] = "a34"
menuArr[3][5] = new Array()
menuArr[3][5][1] = '&nbsp;&nbsp;&nbsp;- Service'
menuArr[3][5][2] = '../TELTECH/TECHSupport.htm'
menuArr[3][5][3] = "a35"
menuArr[3][6] = new Array()
menuArr[3][6][1] = 'Customers'
menuArr[3][6][2] = '../TELTECH/TECHCustomers.htm'
menuArr[3][6][3] = "a36"
menuArr[3][7] = new Array()
menuArr[3][7][1] = 'Business Partners'
menuArr[3][7][2] = '../TELTECH/TECHPartners.htm'
menuArr[3][7][3] = "a37"
menuArr[3][8] = new Array()
menuArr[3][8][1] = 'Credentials'
menuArr[3][8][2] = '../TELTECH/TECHCredentials.htm'
menuArr[3][8][3] = "a38"
menuArr[3][9] = new Array()
menuArr[3][9][1] = 'Commercial'
menuArr[3][9][2] = '../TELTECH/TECHCommercial.htm'
menuArr[3][9][3] = "a39"


menuArr[4] = new Array()
menuArr[4][0] = "110"
menuArr[4][1] = new Array()
menuArr[4][1][1] = "Customers"
menuArr[4][1][2] = "../TELMARK/MARKCustomers.htm"
menuArr[4][1][3] = "a41"
menuArr[4][2] = new Array()
menuArr[4][2][1] = "Business Partners"
menuArr[4][2][2] = "../TELMARK/MARKPartners.htm"
menuArr[4][2][3] = "a44"
menuArr[4][3] = new Array()
menuArr[4][3][1] = "Product Guide"
menuArr[4][3][2] = "../TELMARK/MARKProducts.htm"
menuArr[4][3][3] = "a43"
menuArr[4][4] = new Array()
menuArr[4][4][1] = "Customer Support"
menuArr[4][4][2] = "../TELMARK/MARKSupport.htm"
menuArr[4][4][3] = "a44"


for(i=1;i<menuArr.length;i++)
{
	str = ''
	if(menuArr[i].length!=0)
	{
		str = str + '<div id="div'+i+'" width="' + menuArr[i][0] + '" style="position:absolute;z-index:9999; left: 0px; top: 0px;visibility:hidden;" onmouseover="dontHideSlowly()">'
		str = str + '  <table class="menuBgColor" width="' + menuArr[i][0] + '" cellpadding=0 cellspacing=0>'
		for(j=1;j<menuArr[i].length;j++)
		{
			str = str + '     <tr> '
			
			str = str + '		<td class="menuTdBorder" height=20><a href="'+menuArr[i][j][2]+'" '+menuArr[i][j][4]+' class="MenuTxtSmallBold" id="linkh'+i+''+j+'">'+menuArr[i][j][1]+'</a></td>'
						
			str = str + '    </tr>'
		}				
		str = str + '        </table>'
		str = str + '</div>'
		document.write(str)	
		
		var el = document.getElementById('div'+i);
		if (typeof el.contains == 'undefined')
		{
			el.contains = function(node)
			{
				if (null == node)
					return false;
				if (this == node)
					return true;
				else return this.contains(node.parentNode);
			}
		}
		el.onmouseout = handle_mouseout;
	}
	else
	{
	}
}

document.write('<iframe id="posFrame" src="blank.htm" onmouseout="hide(current)" onmouseover="javascript:false;" scrolling="no" frameborder="0" style="position:absolute;z-index:0; top:0px; left:0px;visibility:hidden;"></iframe>')
function handle_mouseout(e)
{
	e = (e) ? e : window.event;
	if (!this.contains(e.relatedTarget || e.toElement))
	hideSlowly();
}

function show(subMenu, mainMenu)
{
	try
	{
		clearTimeout(scrollTim)
	}
	catch(error){}

	current=subMenu
	var p=fGetXY(mainMenu);

	var posFr = document.getElementById("posFrame");
	
	try
	{
		if(subMenu == "div5"){
			document.getElementById(subMenu).style.left= p[0]-1; 
		}
		else
		{
			document.getElementById(subMenu).style.left= p[0]-1;
		}
		
		document.getElementById(subMenu).style.top = p[1]+22;
		document.getElementById(subMenu).style.visibility="visible"

		posFr.style.zIndex=document.getElementById(subMenu).style.zIndex - 1;
		posFr.style.width = document.getElementById(subMenu).offsetWidth;
		posFr.style.height = document.getElementById(subMenu).offsetHeight;
		
		if(subMenu == "div5"){
			posFr.style.left= p[0]-1; 
		}
		else
		{
			posFr.style.left= p[0]-1;
		}
		posFr.style.top = p[1]+22;
		posFr.style.visibility="visible"
	}
	catch(error){}

}
function hide(subMenu)
{
	try
	{
		document.getElementById("posFrame").style.visibility="hidden"
		document.getElementById(subMenu).style.visibility="hidden"
		document.getElementById(subMenu).style.top=0
		document.getElementById(subMenu).style.left=0
	}
	catch(error){}
}
function hideSlowly()
{
	scrollTim = setTimeout("hideall()", 200);
}
function dontHideSlowly()
{
	try
	{
		clearTimeout(scrollTim)
	}
	catch(error){}
}

function hideall()
{
	document.getElementById("posFrame").style.visibility="hidden"
	for(i=1;i<=(4+1);i++)
	{
		try
		{
			document.getElementById("div"+i).style.visibility="hidden"
			document.getElementById("div"+i).style.top=0
			document.getElementById("div"+i).style.left=0
			
			//Now reset the flash sequence at home page also.
			resetFlash();
		}
		catch(error){}
	}
}
function fGetXY(aTag)
{
 var p=[0,0];
 while(aTag!=null)
 {
  p[0]+=aTag.offsetLeft;
    
  p[1]+=aTag.offsetTop;
  aTag=aTag.offsetParent;
 }
 return p;
}

/*Custome functions for styling created for this specific project.
functions are called from the Td created from array above*/

/*function setMenuTdBG(tdID)
{
	tdID.style.backgroundColor="#ABADF7"
}
function resetMenuTdBG(tdID)
{
	tdID.style.backgroundColor="#ABADF7"
}*/
