	//set global variables
	var curTab, node
	
	function threeColumn() {
		var elm = $('frame');
		elm.style.height = 'auto';
		var x = elm.offsetHeight;
		elm.style.height = x + "px";
		$('contentBody').style.height = x + "px";
	}

	//expanding / collapsing the navigation  for products left menu
	function expCol() {
		var destination, expandId, showEl, menuState, hideEl, collapseId, cookieName;
		var tempEl, tempTab;
		var tabCount = 0
		
		//find out what brand to work with	
		var tempArr = new Array();
		var tabArr = new Array();
		tempArr = document.getElementsByClassName('expcol');
		if (tempArr[0] !=  null) {
			for ( var i = 0; i < tempArr.length; i++ ) {
				tempTab = tempArr[i].next().id.charAt(0)
				if (i == 0) {
					tabArr[i] = tempTab
				}
				else {
					if (!(tabArr[tabCount] == tempTab)) {
						tabCount += 1;
						tabArr[tabCount] = tempTab
					}
				}
			}	
		}

		//handle click event for menus
		document.getElementsByClassName('expcol').each(function(el,i){
			el.onclick = function() { 
				//filter through all expcol 
				document.getElementsByClassName('expcol').each(function(el2,i){
					el2.removeClassName('navLinkNoHover')  //allow hover
					collapseId = el2.next().id
					if (!($(collapseId) == null))  {
						$(collapseId).style.display = 'none';
					}
				});
				expandId = el.next().id
				//first letter of div id determines tab
				cookieName = 'menuState' + expandId.charAt(0)
				createCookie(cookieName, expandId, 0)
				
				el.next().style.display = 'block';  //display menu user clicked on
				if ( el.hasClassName('link') ) { //if link is part of class, redirect to appropriate url
					window.location = el.href;
				}
				return false
			}  //onclick
		});
		
		//handle click event for submenus
		document.getElementsByClassName('expcolSub').each(function(el,i) {
			el.onclick = function() {
				var parentEl = el.up()	//get parent element ( class expcol )
				var expandEl = el.next()
				var collapseId = readCookie('subMenuState' + parentEl.id)
				if (!($(collapseId) == null  )) {
					$(collapseId).previous(0).removeClassName('navLinkNoHover')
					$(collapseId).style.display = 'none';
				}
				expandEl.style.display = 'block';	//show
				expandEl.previous(0).addClassName('navLinkNoHover')
				createCookie('subMenuState' + parentEl.id, expandEl.id, 0)
				return false
			}	//onclick
		});
		
		//display menu (if any)		
		for ( var i = 0; i < tabArr.length; i++) {
			//tabArr[i] contains current tab...read from cookie if user has any menu open based on current tab
			var expandMenu = readCookie('menuState' + tabArr[i])
			if (expandMenu != null) {
				$(expandMenu).style.display = 'block'
				if (!$(expandMenu).previous(0).hasClassName('link'))
					$(expandMenu).previous(0).addClassName('navLinkNoHover')  //don't hover on link that activates current menu
			}
			var subExpandMenu = readCookie('subMenuState' + expandMenu)
			if ( subExpandMenu != null ) {
				$(subExpandMenu).previous(0).addClassName('navLinkNoHover')
				$(subExpandMenu).style.display = 'block'			
			}
		}
	} //expcol

	//function used to handle hover elements for stoopid IE
	function sfHover() {
		var sfEls = document.getElementById("nav").getElementsByTagName("li");
		for (var i=0; i<sfEls.length; i++) {
			sfEls[i].onmouseover=function() {
				this.className += " sfhoverIE";
			}
			sfEls[i].onmouseout=function() {
				$(this).removeClassName('sfhoverIE');
				//this.removeClassName('sfhoverIE')
			}
		}
	}
	
	function appear(el) {
		var tempArr = new Array();
		tempArr = $(el).getElementsByClassName('dropDivs');		
		if (!(tempArr[0] ==  null)) {
			tab = tempArr[0].id.charAt(0);
			var expand = readCookie('menuState' + tab)
			if (!(expand == null))
				Effect.Appear($(expand), {duration: 0.2});
		}
	}
	
	//handle clicking on tabs
	function sfClick() {
		var tabArr = new Array("cp", "op", "id", "in", "fi", "su", "co" )
		var sfEls = document.getElementById("nav").getElementsByTagName("LI");	
		for (var i=0; i<sfEls.length; i++) {		
			sfEls[i].onclick=function() {
				if (!( $(curTab) == $(this.getAttribute('open') ))) {  //if not clicking on current tab
					$('nav').getElementsBySelector('[open="' + curTab + '"]').each(function(node) {
						node.removeClassName('sfhover')
					});				
					if ( curTab != undefined && curTab != '') {
						$(curTab).getElementsByClassName("dropDivs").each(function(node) {
							Effect.Fade( node, { duration: 0.2 } )   //fade away sub-menus
						});
						Effect.Fade( $(curTab), { duration: 0.2 } ) //fade away menus
					}			
					var oldTab = curTab
					curTab = this.getAttribute('open')
					createCookie('curTab',curTab, 0)
//					$('nav').getElementsBySelector('[open="' + curTab + '"]').each(function(node) {
//						node.className += " sfhover"  //highlight tab
//					});
					if ( oldTab != undefined) { 
//						setTimeout( "Effect.Appear( $(curTab), { duration: 0.2 } )", 200); //fade in menus
//						setTimeout("appear('"+curTab+"')", 200);  //fade in sub-menus
					} else { //if on index page and no tab selected, don't wait for current tab fade-out
//						Effect.Appear ( $(curTab), { duration: 0.2 } )  //fade in menus
//						appear(curTab)
					}
				}
			}
		}
	}  //sfClick
	
	function highlightLeft() {
		$(curTab).descendants().each(function(el,i){  //all elements within current tab being used
			if ( ( el.hasClassName('navLink') || el.hasClassName('productsSub') ) && (!(el.hasClassName('expcol')))  ) {
				href = el.readAttribute('href')
				if (!(href == null)) { 
					path = window.location.toString();
					if (!(path.indexOf(href) == -1)) {
						el.up().addClassName('navOver')
					}
				}	
			}
		});
	}//highlightLeft
		
	if (window.attachEvent) window.attachEvent("onload", sfHover);
	
	window.onload = function() {
		var curURL = window.location.toString()
		var domain = ".com"
		sfClick();  //handle clicking on tabs		
		expCol();   //expanding / collapsing the navigation  for products left menu			
		threeColumn();
		curTab = readCookie('curTab')
		if (typeof highlight == 'undefined') { //if variable highlight does not exist (index page)
			if ( curTab == null )
				curTab = 'in'  //investors  as highlighted tab if none clicked
			
			var highlighted = false //variable to indicate if any tab has been highlighted
			var showDiv	//div to show
			var highlightLink = ''//tab to highlight
			document.getElementsByClassName('navMenuSub').each(function(node) {  //go through all navmenusubs
				node.getElementsBySelector('a').each(function(nodeHref) { //grab every link within navMenuDiv
					var href = nodeHref.getAttribute('href', 2)  //grab url of href node
					
					/////////////////////////////////////////////////////////////////////
					// Developer's Note - Brian F.
					/////////////////////////////////////////////////////////////////////
                    // Because this navigation code is so convoluted, the "Equipment
                    // Sizing" page does not display the left menu correctly
                    // when a calculator is selected from the dropdown and the user
                    // is redirected to the same page, but with a query string.  In
                    // order for the menu to remain visible, the code below simply 
                    // ignores the query string value for this page specifically.
					/////////////////////////////////////////////////////////////////////
					// Ignore any query string values for the Equipment Sizing page
					if (curURL.indexOf("laundry-equip-sizing.asp") != -1)
					{
					    var queryStringIndex = curURL.indexOf("?");
					    if (queryStringIndex != -1) curURL = curURL.substr(0, queryStringIndex);
					}
					
					var curURLEnd = curURL.substr(curURL.indexOf(domain) + domain.length) //grab everything after ipso.com/
					
					var curURLIndex = curURLEnd.indexOf("index.") 
					if ( curURLIndex != -1 ) curURLEnd = curURLEnd.substr(0, curURLIndex) //grab everything minus index.asp / index.htm, etc.
					var hrefIndex = href.indexOf("index.")
					if ( hrefIndex != -1 ) href = href.substr(0, hrefIndex)
										
					if (href.toLowerCase() == curURLEnd.toLowerCase() && href != '' ) {  //compare current link with nodeHref's
						var tabToHighlight = node.getAttribute('id')					
						if ( !highlighted || (tabToHighlight == curTab) )  {  //if no tab is highlighted or on current tab
							highlighted = true
							showDiv = tabToHighlight
							highlightTab = nodeHref
							highlightLink = nodeHref;
						}
					}
				});
			});

			if ( highlightLink != '' ) {
				highlightLink.addClassName('navOver')  //highlight current url
				$('nav').getElementsBySelector('[open="' + showDiv + '"]').each(function(highlightMe) {
					highlightMe.up().addClassName('sfhover')  //highlight current tab
				});
				$(showDiv).style.display = 'block';
				curTab = showDiv
			}			
		}    
		else {  // don't highlight any tab
			curTab = ''
		} 			
		
		if ($('txtLocator').value != 'Zip')
			$('txtLocator').value = 'Zip'		
			
		$('txtLocator').onclick=function() {
			this.select()	
		}	
	} 
// -->