// GLOBAL VARIABLES FOR OGS ONLINE
var newWin;
var OGSOnLine = "/"
var Intranet = "http://intranet.ssainternal.net/"
var explicitRoot = "legacy.infor365.com"; // JDD 3/5/2007 -- Added for AJAX call.  Relative references are not working at this point.
var strQuickID = ""
var strDate = "";
var ApplixLink = "";
var AwaitingInqMSG = "";
allowedACID = ",1177562,83631,7526676699,1158348,1158346,10323,1158349,368350,1158307,1158306,397480,432481,301964,319888,";

function getCookie(cookieName, cookieKey) {
    cookieName = new String(cookieName + "=");
    allcookies = document.cookie;
    cookieLoc = allcookies.indexOf(cookieName);

    if (cookieLoc >= 0) {
        cookieStart = cookieLoc + cookieName.length;
        cookieEnd = allcookies.indexOf(";", cookieStart);
        if (cookieEnd == -1) {
            cookieEnd = allcookies.length;
        }
        cookieValue = allcookies.slice(cookieStart, cookieEnd);
        cookieValue = unescape(cookieValue);
    } else {
        cookieValue = "";
    }
    //return cookieValue;

    if (cookieValue != "") {
        cookieKeyPair = cookieValue.split("&");
        for (i=0; i<cookieKeyPair.length; i++) {
            cookieKeyPairName = cookieKeyPair[i].split ('=');
            if (cookieKeyPairName[0] == cookieKey) {
                return cookieKeyPairName[1];
            }
        }
    }
    return "";
}

AccountContactID = getCookie("Identity","AccountContactID");
FirstName = getCookie("Identity","FirstName");
AwaitingInq = getCookie("Identity","AwaitingInq");
ProductGroups = getCookie("Identity","ProductGroups");
DSDecisions = getCookie("Identity","DSDecisions");
Region = getCookie("Identity","Region");

//if (AccountContactID==1437754)
//	alert("<BR>" + ProductGroups + "<BR>");
	

//////////.search(/INF/i)
// HANDLER FOR AFFILIATES SELECTBOX
//////////
function formHandler(form)
{
	var URL = document.forms[form].site.options[document.forms[form].site.selectedIndex].value;
	window.location.href = URL;
}

//////////
// INCLUDE HEADER
//////////



function WriteHeader(PageType,UserType)
{
//alert("here");
	if ( PageType == "Login" ) 
	{
		HTMLStr =
			"  <table class='toparea' cellspacing='0' cellpadding='0' border=0>" +
			"	 <tr>" +
			"		<td width='20%' valign='bottom'><a href='/lvlone/index.aspx'><img src='/images/INFOR-Logo_158px1.gif' vspace='5' hspace=10 border='0'></a></td>" +
			"		<td width='40%' align='right'><img src='/images/infor365_banner.gif' hspace=15 vspace='5'></td>" +
			"		<td width='40%' valign='top' align='right'><a href='/help.asp'><b>Click Here for Help</b></a>&nbsp;&nbsp;</td>" +
			"	 </tr>" +
			"	 <tr bgcolor='#D3D1AA' height='1px' width='100%'><td colspan='3'></td></tr>" +
			"	 <tr bgcolor='#E8E6CE' height='30px' width='100%'><td colspan='3'>&nbsp;</td></tr>" +
			"	 <tr bgcolor='#D3D1AA' height='1px' width='100%'><td colspan='3'></td></tr>" +
			"  </table>";
	}
	else if ( PageType == "LoginHelp" )
	{
		HTMLStr =
			"  <table class='toparea' cellspacing='0' cellpadding='0' border=0>" +
			"	 <tr>" +
			"		<td width='20%' valign='bottom'><a href='/lvlone/index.aspx'><img src='/images/INFOR-Logo_158px1.gif' vspace='5' hspace=10 border='0'></a></td>" +
			"		<td width='40%' align='right'><img src='/images/infor365_banner.gif' hspace=15 vspace='5'></td>" +
			"		<td width='40%' valign='top' align='right'><a href='http://www.infor365.com'><b>Return to Login</b></a>&nbsp;&nbsp;</td>" +
			"	 </tr>" +
			"	 <tr bgcolor='#D3D1AA' height='1px' width='100%'><td colspan='3'></td></tr>" +
			"	 <tr bgcolor='#E8E6CE' height='30px' width='100%'><td colspan='3'>&nbsp;</td></tr>" +
			"	 <tr bgcolor='#D3D1AA' height='1px' width='100%'><td colspan='3'></td></tr>" +
			"  </table>";
	}
	else if ( PageType == "LoginSupport" )
	{
		HTMLStr =
			"  <table class='toparea' cellspacing='0' cellpadding='0' border=0>" +
			"	 <tr>" +
			"		<td valign='bottom'><a href='/lvlone/index.aspx'><img src='/images/INFOR-Logo_158px1.gif' vspace='5' hspace=20 border='0'></a></td>" +
			"		<td><img src='/images/infor365_banner.gif' hspace=15 vspace='5'></td>" +
			"		<td width='100%' valign='top' align='right'><a href='/help.asp'><b>Click Here for Help</b></a>&nbsp;|&nbsp;<b><a href='http://www.infor365.com'><b>Return to Login</b></a>&nbsp;&nbsp;</td>" +
			"	 </tr>" +
			"	 <tr bgcolor='#D3D1AA' height='1px' width='100%'><td colspan='3'></td></tr>" +
			"	 <tr bgcolor='#E8E6CE' height='30px' width='100%'><td colspan='3'>&nbsp;</td></tr>" +
			"	 <tr bgcolor='#D3D1AA' height='1px' width='100%'><td colspan='3'></td></tr>" +
			"  </table>";
	}
	else if ( PageType == "LoginOther" )
	{
		HTMLStr =
			"  <table class='toparea' cellspacing='0' cellpadding='0' border=0>" +
			"	 <tr>" +
			"		<td valign='bottom'><a href='/lvlone/index.aspx'><img src='/images/INFOR-Logo_158px1.gif' vspace='5' hspace=20 border='0'></a></td>" +
			"		<td><img src='/images/infor365_banner.gif' hspace=15 vspace='5'></td>" +
			"		<td width='100%' valign='top' align='right'><a href='/help.asp'><b>Click Here for Help</b></a>&nbsp;|&nbsp;<b><a href='http://www.infor365.com'><b>Return to Login</b></a>&nbsp;&nbsp;</td>" +
			"	 </tr>" +
			"	 <tr bgcolor='#D3D1AA' height='1px' width='100%'><td colspan='3'></td></tr>" +
			"	 <tr bgcolor='#E8E6CE' height='30px' width='100%'><td colspan='3'>&nbsp;</td></tr>" +
			"	 <tr bgcolor='#D3D1AA' height='1px' width='100%'><td colspan='3'></td></tr>" +
			"  </table>";
	}
	else
	{
		HTMLStr =
			"  <table class='toparea' cellspacing='0' cellpadding='0' border=0>" +
			"	 <tr>" +
			"		<td align='right' valign='bottom'><a href='/lvlone/index.aspx'><img src='/images/INFOR-Logo_158px1.gif' vspace='5' hspace=20 border='0'></a></td>" +
			"		<td align='right' valign='middle'><img src='/images/infor365_banner2.gif' hspace=15 vspace='5'></td>";
		if ( PageType == "professionals" )
		{
			HTMLStr +=
				"		<td width='100%' valign='top' align='right'><b><a href='" + OGSOnLine + "Profile/UserProfile.aspx'>Edit " + FirstName + "'s Profile</a></b>&nbsp;|&nbsp;<A HREF=" + OGSOnLine + "lvlone/help/help.aspx>Help</A>&nbsp;|&nbsp;<a href='" + OGSOnLine + "Login/LogOff.aspx'>Logoff</a>&nbsp;|&nbsp;<a href='/login/loginlanding.asp'>Contact Infor</a>&nbsp;|&nbsp;<A HREF=" + OGSOnLine + "lvlfour/content/submit.aspx><b>Submit Content</b></A>&nbsp;&nbsp;</td>";
		}
		else
		{
			HTMLStr +=
				"		<td width='100%' valign='top' align='right'><b><a href='" + OGSOnLine + "Profile/UserProfile.aspx'>Edit " + FirstName + "'s Profile</a></b>&nbsp;|&nbsp;<A HREF=" + OGSOnLine + "lvlone/help/help.aspx>Help</A>&nbsp;|&nbsp;<a href='" + OGSOnLine + "Login/LogOff.aspx'>Logoff</a>&nbsp;|&nbsp;<a href='/login/loginlanding.asp'>Contact Infor</a>&nbsp;&nbsp;</td>";
		}
		HTMLStr +=
			"	 </tr>" +
			"  </table>";
	}
	document.write(HTMLStr);
}
//////////
// INCLUDE NAVIGATION BAR
//////////
function WriteBodyTopTabs(selected,ProductGroup,PageType)
{


	fwLoadMenus(PageType);


	HTMLStr =
		"<table class='toparea' cellspacing='0' cellpadding='0' width='100%' border='0' >" +
		"	<tr bgcolor='#D3D1AA' height='1px' width='100%'><td colspan='4'></td></tr>" +
		"	<tr bgcolor='#E8E6CE' height='30px' width='100%'>" +
		"		<td><img src='/images/1ptrans.gif' width='128' height='1'></td>" +
		"		<td width='100%'>" +
		"			<table border='0' height='30px' cellspacing='0' cellpadding='0' width='100%'>" +
		"				<tr> " + 
		"					<td><a class='nav' href='/lvlone/index.aspx'>HOME</a></td>";
	if (display("KC"))
	{
		HTMLStr +=
		"				<td align='center'><a class='nav' id='anchor1' onmouseover='window.FW_showMenu2(window.fw_menu_0,\"anchor1\",106); return true;' onmouseout='FW_startTimeout(); return true;' onmousedown='return true;' onmouseup='return true;'>KNOWLEDGEBASE</a></td>";
	}
	if (display("DL"))
	{
		HTMLStr +=
		"				<td align='center' nowrap><a class='nav' id='anchor2' onmouseover='window.FW_showMenu2(window.fw_menu_1,\"anchor2\",106); return true;' onmouseout='FW_startTimeout(); return true;' onmousedown='return true;' onmouseup='return true;'>DOWNLOADS</td>";
	}
	HTMLStr +=
	"					<td align='center'><a class='nav' id='anchor3' onmouseover='window.FW_showMenu2(window.fw_menu_2,\"anchor3\",106); return true;' onmouseout='FW_startTimeout(); return true;' onmousedown='return true;' onmouseup='return true;' href='/applix_login/Incidents.aspx'>INCIDENTS</a></td>";
	if (display("DOC"))
	{
		HTMLStr +=
		"				<td align='center'><a class='nav' id='anchor4' onmouseover='window.FW_showMenu2(window.fw_menu_3,\"anchor4\",106); return true;' onmouseout='FW_startTimeout(); return true;' onmousedown='return true;' onmouseup='return true;'>DOCUMENTATION</a></td>";
	}
	
	if (display("COMM") || PageType == "affiliates")
	{
		HTMLStr +=
		"				<td align='center'><a class='nav' id='anchor5' onmouseover='window.FW_showMenu2(window.fw_menu_4,\"anchor5\",106); return true;' onmouseout='FW_startTimeout(); return true;' onmousedown='return true;' onmouseup='return true;'>COMMUNITIES</a></td>";
	}
	HTMLStr +=
		"					<td align='center'><a class='nav' id='anchor6' onmouseover='window.FW_showMenu2(window.fw_menu_5,\"anchor6\",106); return true;' onmouseout='FW_startTimeout(); return true;' onmousedown='return true;' onmouseup='return true;' href='/lvlone/resources/tools.aspx'>TOOLS</a></td>" +
		"					<td align='center'><a class='nav' id='anchor7' onmouseover='window.FW_showMenu2(window.fw_menu_6,\"anchor7\",106); return true;' onmouseout='FW_startTimeout(); return true;' onmousedown='return true;' onmouseup='return true;'>LINKS</a></td>" +			
		"					<td width='100%'></td>" +
		"				</tr>" +
		"			</table>" +
		"		</td>" +
		"		<td width='158'><input style='font-size:11px;' type='text' size=15 id='quicksearchtext' name='qText' value='Incident Search' onkeydown='javascript:imageFocus(event);'></td>" +
		"		<td width='34'><input type='image' src='/images/link_arrow.gif' value='Search' name='imgSearch' id='imgSearch' alt='Search' language='javascript' onClick='quicksearch();'></td>" +
		"	</tr>";
	if (selected == "home")
	{
		HTMLStr +=
			"</table>" +
			"<table class='toparea' cellspacing='0' cellpadding='0' width='100%' border='0' >" +
			"	<tr height='1px' width='100%'><td width='237' bgcolor='#E8E6CE'><img src='/images/1ptrans.gif' width='237' height='1'></td><td colspan='3' bgcolor='#D3D1AA'></td></tr>" +
			"	<tr height='8px' width='100%'><td width='237' bgcolor='#E8E6CE'><img src='/images/sidenav_top.gif' width='237' height='8'></td><td colspan='3' bgcolor='white'></td></tr>" +
			"</table>";
	}
	else
	{
		HTMLStr +=
			"	<tr bgcolor='#D3D1AA' height='1px' width='100%'><td colspan='4'></td></tr>" +
			"</table>";
	}
	document.write(HTMLStr);
}

//////////
// INCLUDE RIGHT HAND NAVIGATION
//////////
function WriteRightHandNavigation2( PageType, ProductGroup )
{
	HTMLStr = 
		"<td width='205px' nowrap align='right' valign='top'>" +
		"	<span id='rightContent'><BR>" +
	"		";
	if (display("COMM"))
	{
		HTMLStr = HTMLStr +
			"		<a href='/community/communities.aspx'><img src='/images/Infor365_Community.gif' width='192px' border='0' class='right-images'></a><br>"
	}
	HTMLStr = HTMLStr + 
		//"		<a href='http://www.inforum2009.com/'><img src='/images/Inforum_365_savedate.gif' width='192px' border='0' class='right-images'></a><br>" +
		"		<a href='http://www.infor.com/crp'><img src='/images/CRP_banner_192x64.gif' width='192px' border='0' class='right-images'></a><br>" +
		"		<a href='http://www.infor.com/flex'><img src='/images/InforFLEX_192x112px.gif' width='192px' border='0' class='right-images'></a><br>" +
		"	</span>" +
		"</td>";
	document.write(HTMLStr);
}

function WriteRightHandNavigation( PageType, ProductGroup )
{
	;
}
//////////
// INCLUDE FOOTER
//////////
function WriteFooter()
{
	HTMLStr =
		"<tr>" +
		"	<td class='ba-footer'>" +
		"		<table border='0' cellspacing='0' cellpadding='0' width='100%' class='ba-footer-content'>" +
		"			<tr>" +
		"				<td>" +
		"					<a href='/lvlone/index.aspx' class='footer'>Home</a> | " +
		"					<a href='http://www.infor.com/company/privacy/' class='footer'>Privacy</a> |" +
		"					<a href='/login/loginlanding.asp' class='footer'>Contact Infor</a>" +
		"				</td>" +
		"				<td align='right'><div class='copyright'>&#169; Copyright 2009 Infor. All rights reserved. <a href='http://www.Infor.com'>www.Infor.com</a></div></td>" +
		"			</tr>" +
		"		</table>" +
		"	</td>" +
		"</tr>";	
	document.write(HTMLStr);
}


////////////////////////////////////////////////////////////////////
// Functions related to drop down menus and collapsable areas
//
function Menu(label, mw, mh, fnt, fs, fclr, fhclr, bg, bgh) {
	this.version = "990702 [Menu; menu.js]";
	this.type = "Menu";
	this.menuWidth = mw||220;
	this.menuItemHeight = mh||16;

	this.fontSize = fs||11;
	this.fontWeight = "plain";
	this.fontFamily = fnt||"arial,helvetica,verdana,sans-serif";
	this.fontColor = fclr||"#3A3A3A";
	this.fontColorHilite = fhclr||"#3A3A3A";

	this.bgColor = "#E2E0C2";

	this.menuBorder = 0;
	this.menuItemBorder = 0;
	this.menuItemBgColor = bg||"#E2E0C2";
	this.menuLiteBgColor = "#D3D1AA";
	this.menuBorderBgColor = "#E2E0C2";
	this.menuHiliteBgColor = bgh||"#D3D1AA";
	this.menuContainerBgColor = "#E2E0C2";
	this.childMenuIcon = ">";
	this.items = new Array();
	this.actions = new Array();
	this.childMenus = new Array();

	this.hideOnMouseOut = true;

	this.addMenuItem = addMenuItem;
	this.addMenuSeparator = addMenuSeparator;
	this.writeMenus = writeMenus;
	this.FW_showMenu = FW_showMenu;
	this.onMenuItemOver = onMenuItemOver;
	this.onMenuItemAction = onMenuItemAction;
	this.hideMenu = hideMenu;
	this.hideChildMenu = hideChildMenu;

	if (!window.menus) window.menus = new Array();
	this.label = label || "menuLabel" + window.menus.length;
	window.menus[this.label] = this;
	window.menus[window.menus.length] = this;
	if (!window.activeMenus) window.activeMenus = new Array();
}

function addMenuItem(label, action) {
	this.items[this.items.length] = label;
	this.actions[this.actions.length] = action;
}

function addMenuSeparator() {
	this.items[this.items.length] = "separator";
	this.actions[this.actions.length] = "";
	this.menuItemBorder = 0;
}

// For NS6. 
function FIND(item) {
	if (document.all) return(document.all[item]);
	if (document.getElementById) return(document.getElementById(item));
	return(false);
}

function writeMenus(container) {
	if (window.triedToWriteMenus) return;

	if (!container && document.layers) {
		window.delayWriteMenus = this.writeMenus;
		var timer = setTimeout('delayWriteMenus()', 250);
		container = new Layer(100);
		clearTimeout(timer);
	} else if (document.all || document.hasChildNodes) {
		document.writeln('<SPAN ID="menuContainer"></SPAN>');
		container = FIND("menuContainer");
	}

	window.fwHideMenuTimer = null;
	if (!container) return;	
	window.triedToWriteMenus = true; 
	container.isContainer = true;
	container.menus = new Array();
	for (var i=0; i<window.menus.length; i++) 
		container.menus[i] = window.menus[i];
	window.menus.length = 0;
	var countMenus = 0;
	var countItems = 0;
	var top = 0;
	var content = '';
	var lrs = false;
	var theStat = "";
	var tsc = 0;
	if (document.layers) lrs = true;
	for (var i=0; i<container.menus.length; i++, countMenus++) {
		var menu = container.menus[i];
		if (menu.bgImageUp) {
			menu.menuBorder = 0;
			menu.menuItemBorder = 0;
		}
		if (lrs) {
			var menuLayer = new Layer(100, container);
			var lite = new Layer(100, menuLayer);
			lite.top = menu.menuBorder;
			lite.left = menu.menuBorder;
			var body = new Layer(100, lite);
			body.top = menu.menuBorder;
			body.left = menu.menuBorder;
		} else {
			content += ''+
			'<DIV ID="menuLayer'+ countMenus +'" STYLE="position:absolute;z-index:1;left:10;top:'+ (i * 100) +';visibility:hidden;">\n'+
			'  <DIV ID="menuLite'+ countMenus +'" STYLE="position:absolute;z-index:1;left:'+ menu.menuBorder +';top:'+ menu.menuBorder +';visibility:hide;" onMouseOut="mouseoutMenu();">\n'+
			'	 <DIV ID="menuFg'+ countMenus +'" STYLE="position:absolute;left:'+ menu.menuBorder +';top:'+ menu.menuBorder +';visibility:hide;">\n'+
			'';
		}
		var x=i;
		for (var i=0; i<menu.items.length; i++) {
			var item = menu.items[i];
			var childMenu = false;
			var defaultHeight = menu.fontSize+6;
			var defaultIndent = menu.fontSize;
			if (item.label) {
				item = item.label;
				childMenu = true;
			}
			menu.menuItemHeight = menu.menuItemHeight || defaultHeight;
			menu.menuItemIndent = menu.menuItemIndent || defaultIndent;
			var itemProps = 'font-family:' + menu.fontFamily +';font-weight:' + menu.fontWeight + ';fontSize:' + menu.fontSize + ';';
			if (menu.fontStyle) itemProps += 'font-style:' + menu.fontStyle + ';';
			if (document.all) 
				itemProps += 'font-size:' + menu.fontSize + ';" onMouseOver="onMenuItemOver(null,this);" onClick="onMenuItemAction(null,this);';
			else if (!document.layers) {
				itemProps += 'font-size:' + menu.fontSize + 'px;'; // zilla wants 12px.
			}
			var l;
			if (lrs) {
				l = new Layer(800,body);
			}
			var dTag	= '<DIV ID="menuItem'+ countItems +'" STYLE="position:absolute;left:0;top:'+ (i * menu.menuItemHeight) +';'+ itemProps +'">';
			var dClose = '</DIV>'
			if (menu.bgImageUp) {
				menu.menuBorder = 0;
				menu.menuItemBorder = 0;
				dTag	= '<DIV ID="menuItem'+ countItems +'" STYLE="background:url('+menu.bgImageUp+');position:absolute;left:0;top:'+ (i * menu.menuItemHeight) +';'+ itemProps +'">';
				if (document.layers) {
					dTag = '<LAYER BACKGROUND="'+menu.bgImageUp+'" ID="menuItem'+ countItems +'" TOP="'+ (i * menu.menuItemHeight) +'" style="' + itemProps +'">';
					dClose = '</LAYER>';
				}
			}
			var textProps = 'position:absolute;left:' + menu.menuItemIndent + ';top:1;';
			if (lrs) {
				textProps +=itemProps;
				dTag = "";
				dClose = "";
			}

			var dText	= '<DIV ID="menuItemText'+ countItems +'" STYLE="' + textProps + 'color:'+ menu.fontColor +';">'+ item +'&nbsp</DIV>\n<DIV ID="menuItemHilite'+ countItems +'" STYLE="' + textProps + 'top:1;color:'+ menu.fontColorHilite +';visibility:hidden;">'+ item +'&nbsp</DIV>';
			if (item == "separator") {
				content += ( dTag + '<DIV ID="menuSeparator'+ countItems +'" STYLE="position:absolute;left:1;top:2;"></DIV>\n<DIV ID="menuSeparatorLite'+ countItems +'" STYLE="position:absolute;left:1;top:2;"></DIV>\n' + dClose);
			} else if (childMenu) {
				content += ( dTag + dText + '<DIV ID="childMenu'+ countItems +'" STYLE="position:absolute;left:0;top:3;"><IMG SRC="'+ menu.childMenuIcon +'"></DIV>\n' + dClose);
			} else {
				content += ( dTag + dText + dClose);
			}
			if (lrs) {
				l.document.open("text/html");
				l.document.writeln(content);
				l.document.close();	
				content = '';
				theStat += "-";
				tsc++;
				if (tsc > 50) {
					tsc = 0;
					theStat = "";
				}
				status = theStat;
			}
			countItems++;  
		}
		if (lrs) {
			// focus layer
			var focusItem = new Layer(100, body);
			focusItem.visiblity="hidden";
			focusItem.document.open("text/html");
			focusItem.document.writeln("&nbsp;");
			focusItem.document.close();	
		} else {
		  content += '	  <DIV ID="focusItem'+ countMenus +'" STYLE="position:absolute;left:0;top:0;visibility:hide;" onClick="onMenuItemAction(null,this);">&nbsp;</DIV>\n';
		  content += '   </DIV>\n  </DIV>\n</DIV>\n';
		}
		i=x;
	}
	if (document.layers) {		
		container.clip.width = window.innerWidth;
		container.clip.height = window.innerHeight;
		container.onmouseout = mouseoutMenu;
		container.menuContainerBgColor = this.menuContainerBgColor;
		for (var i=0; i<container.document.layers.length; i++) {
			proto = container.menus[i];
			var menu = container.document.layers[i];
			container.menus[i].menuLayer = menu;
			container.menus[i].menuLayer.Menu = container.menus[i];
			container.menus[i].menuLayer.Menu.container = container;
			var body = menu.document.layers[0].document.layers[0];
			body.clip.width = proto.menuWidth || body.clip.width;
			body.clip.height = proto.menuHeight || body.clip.height;
			for (var n=0; n<body.document.layers.length-1; n++) {
				var l = body.document.layers[n];
				l.Menu = container.menus[i];
				l.menuHiliteBgColor = proto.menuHiliteBgColor;
				l.document.bgColor = proto.menuItemBgColor;
				l.saveColor = proto.menuItemBgColor;
				l.onmouseover = proto.onMenuItemOver;
				l.onclick = proto.onMenuItemAction;
				l.action = container.menus[i].actions[n];
				l.focusItem = body.document.layers[body.document.layers.length-1];
				l.clip.width = proto.menuWidth || body.clip.width + proto.menuItemIndent;
				l.clip.height = proto.menuItemHeight || l.clip.height;
				if (n>0) l.top = body.document.layers[n-1].top + body.document.layers[n-1].clip.height + proto.menuItemBorder;
				l.hilite = l.document.layers[1];
				if (proto.bgImageUp) l.background.src = proto.bgImageUp;
				l.document.layers[1].isHilite = true;
				if (l.document.layers[0].id.indexOf("menuSeparator") != -1) {
					l.hilite = null;
					l.clip.height -= l.clip.height / 2;
					l.document.layers[0].document.bgColor = proto.bgColor;
					l.document.layers[0].clip.width = l.clip.width -2;
					l.document.layers[0].clip.height = 1;
					l.document.layers[1].document.bgColor = proto.menuLiteBgColor;
					l.document.layers[1].clip.width = l.clip.width -2;
					l.document.layers[1].clip.height = 1;
					l.document.layers[1].top = l.document.layers[0].top + 1;
				} else if (l.document.layers.length > 2) {
					l.childMenu = container.menus[i].items[n].menuLayer;
					l.document.layers[2].left = l.clip.width -13;
					l.document.layers[2].top = (l.clip.height / 2) -4;
					l.document.layers[2].clip.left += 3;
					l.Menu.childMenus[l.Menu.childMenus.length] = l.childMenu;
				}
			}
			body.document.bgColor = proto.bgColor;
			body.clip.width  = l.clip.width +proto.menuBorder;
			body.clip.height = l.top + l.clip.height +proto.menuBorder;
			var focusItem = body.document.layers[n];
			focusItem.clip.width = body.clip.width;
			focusItem.Menu = l.Menu;
			focusItem.top = -30;
            		focusItem.captureEvents(Event.MOUSEDOWN);
            		focusItem.onmousedown = onMenuItemDown;
			menu.document.bgColor = proto.menuBorderBgColor;
			var lite = menu.document.layers[0];
			lite.document.bgColor = proto.menuLiteBgColor;
			lite.clip.width = body.clip.width +1;
			lite.clip.height = body.clip.height +1;
			menu.clip.width = body.clip.width + (proto.menuBorder * 3) ;
			menu.clip.height = body.clip.height + (proto.menuBorder * 3);
		}
	} else {
		if ((!document.all) && (container.hasChildNodes)) {
			container.innerHTML=content;
		} else {
			container.document.open("text/html");
			container.document.writeln(content);
			container.document.close();	
		}
		if (!FIND("menuLayer0")) return;
		var menuCount = 0;
		for (var x=0; x<container.menus.length; x++) {
			var menuLayer = FIND("menuLayer" + x);
			container.menus[x].menuLayer = "menuLayer" + x;
			menuLayer.Menu = container.menus[x];
			menuLayer.Menu.container = "menuLayer" + x;
			menuLayer.style.zIndex = 1;
		    	var s = menuLayer.style;
			s.top = s.pixelTop = -300;
			s.left = s.pixelLeft = -300;

			var menu = container.menus[x];
			menu.menuItemWidth = menu.menuWidth || menu.menuIEWidth || 140;
			menuLayer.style.backgroundColor = menu.menuBorderBgColor;
			var top = 0;
			for (var i=0; i<container.menus[x].items.length; i++) {
				var l = FIND("menuItem" + menuCount);
				l.Menu = container.menus[x];
				
				// Check for Firefox.
				if((whichBrs() != "Firefox") && (whichBrs() != "Internet Explorer 5.01"))
				{
					// JDD 2/10/2007 -- Fix overlapping problem by inserting an IFRAME under the menu.  This covers "windowed" controls.
					// Used a technique at BrainJar.com: Revenge of the Menu Bar and modified for this application.
					var iFrameEl = document.createElement("IFRAME");
					iFrameEl.id = "menuItemIFrame" + x + menuCount;
					iFrameEl.src = "javascript:false;";
					iFrameEl.style.display = "inline";
					iFrameEl.style.position = "absolute";
					iFrameEl.style.filter = "progid:DXImageTransform.Microsoft.Alpha(style=0,opacity=0)";
					// JDD 2/10/2007 -- Set the IFRAME to be underneath the menu in the zIndex.  The menu's zIndex is 1.
					// Set this property based on looking at the onMenuItemOver function.  See line where zIndex = 1.
					iFrameEl.style.zIndex = -1;
	                
	                
					// Attach the inserted IFRAME to the DIV tag via a property.
					l.iframeEl = l.insertBefore(iFrameEl);
                		}
				
				if (l.addEventListener) { // ns6
					l.style.width = menu.menuItemWidth;	
					l.style.height = menu.menuItemHeight;
					l.style.top = top;
					l.addEventListener("mouseover", onMenuItemOver, false);
					l.addEventListener("click", onMenuItemAction, false);
					l.addEventListener("mouseout", mouseoutMenu, false);
				} else { //ie
					l.style.pixelWidth = menu.menuItemWidth;	
					l.style.pixelHeight = menu.menuItemHeight;
					l.style.pixelTop = top;
					
					// If Firefox or IE 5.01
					if((whichBrs() != "Firefox") && (whichBrs() != "Internet Explorer 5.01"))
					{
						// JDD 2/10/2007 -- The Iframe attached to the <DIV> tag needs to have its properties set to match.
						l.iframeEl.style.pixelHeight = menu.menuItemHeight + menu.menuBorder + 1; 
						l.iframeEl.style.pixelWidth = menu.menuItemWidth + menu.menuBorder;	
					}
				}
				top = top + menu.menuItemHeight+menu.menuItemBorder;
				l.style.fontSize = menu.fontSize;
				l.style.backgroundColor = menu.menuItemBgColor;
				l.style.visibility = "inherit";
				l.saveColor = menu.menuItemBgColor;
				l.menuHiliteBgColor = menu.menuHiliteBgColor;
				l.action = container.menus[x].actions[i];
				l.hilite = FIND("menuItemHilite" + menuCount);
				l.focusItem = FIND("focusItem" + x);
				l.focusItem.style.pixelTop = l.focusItem.style.top = -30;
				var childItem = FIND("childMenu" + menuCount);
				if (childItem) {
					l.childMenu = container.menus[x].items[i].menuLayer;
					childItem.style.pixelLeft = childItem.style.left = menu.menuItemWidth -11;
					childItem.style.pixelTop = childItem.style.top =(menu.menuItemHeight /2) -4;
					//childItem.style.pixelWidth = 30 || 7;
					//childItem.style.clip = "rect(0 7 7 3)";
					l.Menu.childMenus[l.Menu.childMenus.length] = l.childMenu;
				}
				var sep = FIND("menuSeparator" + menuCount);
				if (sep) {
					sep.style.clip = "rect(0 " + (menu.menuItemWidth - 3) + " 1 0)";
					sep.style.width = sep.style.pixelWidth = menu.menuItemWidth;	
					sep.style.backgroundColor = menu.bgColor;
					sep = FIND("menuSeparatorLite" + menuCount);
					sep.style.clip = "rect(1 " + (menu.menuItemWidth - 3) + " 2 0)";
					sep.style.width = sep.style.pixelWidth = menu.menuItemWidth;	
					sep.style.backgroundColor = menu.menuLiteBgColor;
					l.style.height = l.style.pixelHeight = menu.menuItemHeight/2;
					l.isSeparator = true
					top -= (menu.menuItemHeight - l.style.pixelHeight)
				} else {
					l.style.cursor = "hand"
				}
				menuCount++;
			}
			menu.menuHeight = top-1;
			var lite = FIND("menuLite" + x);
			var s = lite.style;
if (menu.menuHeight +(menu.menuBorder * 2)<0)
			s.height = s.pixelHeight = 0;
else
			s.height = s.pixelHeight = menu.menuHeight +(menu.menuBorder * 2);
			s.width = s.pixelWidth = menu.menuItemWidth + (menu.menuBorder * 2);
			s.backgroundColor = menu.menuLiteBgColor;

			var body = FIND("menuFg" + x);
			s = body.style;
if (menu.menuHeight +(menu.menuBorder * 1)<0)
			s.height = s.pixelHeight = 0;
else
			s.height = s.pixelHeight = menu.menuHeight + menu.menuBorder;
			s.width = s.pixelWidth = menu.menuItemWidth + menu.menuBorder;
			s.backgroundColor = menu.bgColor;

			s = menuLayer.style;
			s.width = s.pixelWidth  = menu.menuItemWidth + (menu.menuBorder * 4);
if (menu.menuHeight +(menu.menuBorder * 4)<0)
			s.height = s.pixelHeight = 0;
else
			s.height = s.pixelHeight  = menu.menuHeight+(menu.menuBorder*4);
		}
	}
	if (document.captureEvents) {	
		document.captureEvents(Event.MOUSEUP);
	}
	if (document.addEventListener) {	
		document.addEventListener("mouseup", onMenuItemOver, false);
	}
	if (document.layers && window.innerWidth) {
		window.onresize = NS4resize;
		window.NS4sIW = window.innerWidth;
		window.NS4sIH = window.innerHeight;
	}
	document.onmouseup = mouseupMenu;
	window.fwWroteMenu = true;
	status = "";
}

function NS4resize() {
	if (NS4sIW < window.innerWidth || 
		NS4sIW > window.innerWidth || 
		NS4sIH > window.innerHeight || 
		NS4sIH < window.innerHeight ) 
	{
		window.location.reload();
	}
}

function onMenuItemOver(e, l) {
	FW_clearTimeout();
	l = l || this;
	a = window.ActiveMenuItem;
	if (document.layers) {
		if (a) {
			a.document.bgColor = a.saveColor;
			if (a.hilite) a.hilite.visibility = "hidden";
			if (a.Menu.bgImageOver) {
				a.background.src = a.Menu.bgImageUp;
			}
			a.focusItem.top = -100;
			a.clicked = false;
		}
		if (l.hilite) {
			l.document.bgColor = l.menuHiliteBgColor;
			l.zIndex = 1;
			l.hilite.visibility = "inherit";
			l.hilite.zIndex = 2;
			l.document.layers[1].zIndex = 1;
			l.focusItem.zIndex = this.zIndex +2;
		}
		if (l.Menu.bgImageOver) {
			l.background.src = l.Menu.bgImageOver;
		}
		l.focusItem.top = this.top;
		l.Menu.hideChildMenu(l);
	} else if (l.style && l.Menu) {
		if (a) {
			a.style.backgroundColor = a.saveColor;
			if (a.hilite) a.hilite.style.visibility = "hidden";
			if (a.Menu.bgImageUp) {
				a.style.background = "url(" + a.Menu.bgImageUp +")";;
			}
		} 
		if (l.isSeparator) return;
		l.style.backgroundColor = l.menuHiliteBgColor;
		l.zIndex = 1;  // magic IE 4.5 mac happy doohicky.	jba
		if (l.Menu.bgImageOver) {
			l.style.background = "url(" + l.Menu.bgImageOver +")";
		}
		if (l.hilite) {
			l.style.backgroundColor = l.menuHiliteBgColor;
			l.hilite.style.visibility = "inherit";
		}
		l.focusItem.style.top = l.focusItem.style.pixelTop = l.style.pixelTop;
		l.focusItem.style.zIndex = l.zIndex +1;
		l.Menu.hideChildMenu(l);
	} else {
		return; // not a menu - magic IE 4.5 mac happy doohicky.  jba
	}
	window.ActiveMenuItem = l;
}

function onMenuItemAction(e, l) {
	l = window.ActiveMenuItem;
	if (!l) return;
	hideActiveMenus();
	if (l.action) {
		eval("" + l.action);
	}
	window.ActiveMenuItem = 0;
}

function FW_clearTimeout()
{
	if (fwHideMenuTimer) clearTimeout(fwHideMenuTimer);
	fwHideMenuTimer = null;
	fwDHFlag = false;
}
function FW_startTimeout()
{
	fwStart = new Date();
	fwDHFlag = true;
	fwHideMenuTimer = setTimeout("fwDoHide()", 1000);
}

function fwDoHide()
{
	if (!fwDHFlag) return;
	var elapsed = new Date() - fwStart;
	if (elapsed < 1000) {
		fwHideMenuTimer = setTimeout("fwDoHide()", 1100-elapsed);
		return;
	}
	fwDHFlag = false;
	hideActiveMenus();
	window.ActiveMenuItem = 0;
}

function FW_showMenu(menu, x, y, child) {
	if (!window.fwWroteMenu) return;
	FW_clearTimeout();
	if (document.layers) {
		if (menu) {
			var l = menu.menuLayer || menu;
			l.left = 1;
			l.top = 1;
			hideActiveMenus();
			if (this.visibility) l = this;
			window.ActiveMenu = l;
		} else {
			var l = child;
		}
		if (!l) return;
		for (var i=0; i<l.layers.length; i++) { 			   
			if (!l.layers[i].isHilite) 
				l.layers[i].visibility = "inherit";
			if (l.layers[i].document.layers.length > 0) 
				FW_showMenu(null, "relative", "relative", l.layers[i]);
		}
		if (l.parentLayer) {
			if (x != "relative") 
				l.parentLayer.left = x || window.pageX || 0;
			if (l.parentLayer.left + l.clip.width > window.innerWidth) 
				l.parentLayer.left -= (l.parentLayer.left + l.clip.width - window.innerWidth);
			if (y != "relative") 
				l.parentLayer.top = y || window.pageY || 0;
			if (l.parentLayer.isContainer) {
				l.Menu.xOffset = window.pageXOffset;
				l.Menu.yOffset = window.pageYOffset;
				l.parentLayer.clip.width = window.ActiveMenu.clip.width +2;
				l.parentLayer.clip.height = window.ActiveMenu.clip.height +2;
				if (l.parentLayer.menuContainerBgColor) l.parentLayer.document.bgColor = l.parentLayer.menuContainerBgColor;
			}
		}
		l.visibility = "inherit";
		if (l.Menu) l.Menu.container.visibility = "inherit";
	} else if (FIND("menuItem0")) {
		var l = menu.menuLayer || menu;	
		hideActiveMenus();
		if (typeof(l) == "string") {
			l = FIND(l);
		}
		window.ActiveMenu = l;
		var s = l.style;
		s.visibility = "inherit";
		if (x != "relative") 
			s.left = s.pixelLeft = x || (window.pageX + document.body.scrollLeft) || 0;
		if (y != "relative") 
			s.top = s.pixelTop = y || (window.pageY + document.body.scrollTop) || 0;
		l.Menu.xOffset = document.body.scrollLeft;
		l.Menu.yOffset = document.body.scrollTop;
	}
	if (menu) {
		window.activeMenus[window.activeMenus.length] = l;
	}
}

function onMenuItemDown(e, l) {
	var a = window.ActiveMenuItem;
	if (document.layers) {
		if (a) {
			a.eX = e.pageX;
			a.eY = e.pageY;
			a.clicked = true;
		}
    }
}

function mouseupMenu(e)
{
	hideMenu(true, e);
	hideActiveMenus();
	return true;
}

function mouseoutMenu()
{
	hideMenu(false, false);
	return true;
}


function hideMenu(mouseup, e) {
	var a = window.ActiveMenuItem;
	if (a && document.layers) {
		a.document.bgColor = a.saveColor;
		a.focusItem.top = -30;
		if (a.hilite) a.hilite.visibility = "hidden";
		if (mouseup && a.action && a.clicked && window.ActiveMenu) {
 			if (a.eX <= e.pageX+15 && a.eX >= e.pageX-15 && a.eY <= e.pageY+10 && a.eY >= e.pageY-10) {
				setTimeout('window.ActiveMenu.Menu.onMenuItemAction();', 2);
			}
		}
		a.clicked = false;
		if (a.Menu.bgImageOver) {
			a.background.src = a.Menu.bgImageUp;
		}
	} else if (window.ActiveMenu && FIND("menuItem0")) {
		if (a) {
			a.style.backgroundColor = a.saveColor;
			if (a.hilite) a.hilite.style.visibility = "hidden";
			if (a.Menu.bgImageUp) {
				a.style.background = "url(" + a.Menu.bgImageUp +")";;
			}
		}
	}
	if (!mouseup && window.ActiveMenu) {
		if (window.ActiveMenu.Menu) {
			if (window.ActiveMenu.Menu.hideOnMouseOut) {
				FW_startTimeout();
			}
			return(true);
		}
	}
	return(true);
}

function PxToNum(pxStr)
{ // pxStr == 27px, we want 27.
	if (pxStr.length > 2) {
		n = Number(pxStr.substr(0, pxStr.length-2));
		return(n);
	}
	return(0);
}

function hideChildMenu(hcmLayer) {
	FW_clearTimeout();
	var l = hcmLayer;
	for (var i=0; i < l.Menu.childMenus.length; i++) {
		var theLayer = l.Menu.childMenus[i];
		if (document.layers) {
			theLayer.visibility = "hidden";
		} else {
			theLayer = FIND(theLayer);
			theLayer.style.visibility = "hidden";
		}
		theLayer.Menu.hideChildMenu(theLayer);
	}

	if (l.childMenu) {
		var childMenu = l.childMenu;
		if (document.layers) {
			l.Menu.FW_showMenu(null,null,null,childMenu.layers[0]);
			childMenu.zIndex = l.parentLayer.zIndex +1;
			childMenu.top = l.top + l.parentLayer.top + l.Menu.menuLayer.top + l.Menu.menuItemHeight/3;
			if (childMenu.left + childMenu.clip.width > window.innerWidth) {
				childMenu.left = l.parentLayer.left - childMenu.clip.width + l.Menu.menuLayer.left + 15;
				l.Menu.container.clip.left -= childMenu.clip.width;
			} else {
				childMenu.left = l.parentLayer.left + l.parentLayer.clip.width  + l.Menu.menuLayer.left -5;
			}
			var w = childMenu.clip.width+childMenu.left-l.Menu.container.clip.left;
			if (w > l.Menu.container.clip.width)  
				l.Menu.container.clip.width = w;
			var h = childMenu.clip.height+childMenu.top-l.Menu.container.clip.top;
			if (h > l.Menu.container.clip.height) l.Menu.container.clip.height = h;
			l.document.layers[1].zIndex = 0;
			childMenu.visibility = "inherit";
		} else if (FIND("menuItem0")) {
			childMenu = FIND(l.childMenu);
			var menuLayer = FIND(l.Menu.menuLayer);
			var s = childMenu.style;
			s.zIndex = menuLayer.style.zIndex+1;
			if (document.all) { // ie case.
				s.pixelTop = l.style.pixelTop + menuLayer.style.pixelTop;
				s.left = s.pixelLeft = (menuLayer.style.pixelWidth) + menuLayer.style.pixelLeft;
			} else { // zilla case
				var top = PxToNum(l.style.top) + PxToNum(menuLayer.style.top);
				var left = (PxToNum(menuLayer.style.width)) + PxToNum(menuLayer.style.left);
				s.top = top;
				s.left = left;
			}
			childMenu.style.visibility = "inherit";
		} else {
			return;
		}
		window.activeMenus[window.activeMenus.length] = childMenu;
	}
}

function hideActiveMenus() {
	if (!window.activeMenus) return;
	for (var i=0; i < window.activeMenus.length; i++) {
		if (!activeMenus[i]) continue;
		if (activeMenus[i].visibility && activeMenus[i].Menu) {
			activeMenus[i].visibility = "hidden";
			activeMenus[i].Menu.container.visibility = "hidden";
			activeMenus[i].Menu.container.clip.left = 0;
		} else if (activeMenus[i].style) {
			var s = activeMenus[i].style;
			s.visibility = "hidden";
			s.left = -200;
			s.top = -200;
		}
	}
	if (window.ActiveMenuItem) {
		hideMenu(false, false);
	}
	window.activeMenus.length = 0;
}

function ToggleDisplayNew(id)
{
	var elem = document.getElementById(id);
	var showDiv =""; 
	if ( (id == 'exp0') && elem.style.display == '') 
	{
		elem.style.display = 'block';
		elem.style.visibility = 'visible'; 
	} 
	if (elem) 
	{
		if (elem.style.display != 'block' && elem.style.display != 'visible' ) 
		{
			elem.style.display = 'block';
			elem.style.visibility = 'visible';
		} 
		else
		{
			elem.style.display = 'none';
			elem.style.visibility = 'hidden';
		}
	}
}

function ToggleDisplay(id, id2, id3)
{
    var elem = document.getElementById(id);
    var menu = document.getElementById(id2);
    var image = document.getElementById(id3); 
    if ( (id == 'exp0' || id == 'exp1' || id == 'Navexp' || id == 'exp12') && elem.style.display == '') 
    {
		elem.style.display = 'block';
		elem.style.visibility = 'visible'; 
	} 
    if (elem) 
    {
        if (elem.style.display != 'block' && elem.style.display != 'visible' ) 
        {
			elem.style.display = 'block';
			elem.style.visibility = 'visible';
			menu.style.height = '30';
			image.src = '/images/1ptrans.gif'
        } 
        else
        {
			elem.style.display = 'none';
			elem.style.visibility = 'hidden';
			menu.style.height = '20';
			image.src = '/images/downloads_dot.gif'
        }
    }
}

function FW_showMenu2(menu, id, y, child) 
{
var elem = document.getElementById(id);
total = +1;
total += elem.offsetLeft;
total += elem.offsetParent.offsetLeft;
total += elem.offsetParent.offsetParent.offsetLeft;
total += elem.offsetParent.offsetParent.offsetParent.offsetLeft;
total += elem.offsetParent.offsetParent.offsetParent.offsetParent.offsetLeft;
//alert("total=" + total);
var x = total;

	if (!window.fwWroteMenu) return;
	FW_clearTimeout();
	if (document.layers) {
		if (menu) {
			var l = menu.menuLayer || menu;
			l.left = 1;
			l.top = 1;
			hideActiveMenus();
			if (this.visibility) l = this;
			window.ActiveMenu = l;
		} else {
			var l = child;
		}
		if (!l) return;
		for (var i=0; i<l.layers.length; i++) { 			   
			if (!l.layers[i].isHilite) 
				l.layers[i].visibility = "inherit";
			if (l.layers[i].document.layers.length > 0) 
				FW_showMenu(null, "relative", "relative", l.layers[i]);
		}
		if (l.parentLayer) {
			if (x != "relative") 
				l.parentLayer.left = x || window.pageX || 0;
			if (l.parentLayer.left + l.clip.width > window.innerWidth) 
				l.parentLayer.left -= (l.parentLayer.left + l.clip.width - window.innerWidth);
			if (y != "relative") 
				l.parentLayer.top = y || window.pageY || 0;
			if (l.parentLayer.isContainer) {
				l.Menu.xOffset = window.pageXOffset;
				l.Menu.yOffset = window.pageYOffset;
				l.parentLayer.clip.width = window.ActiveMenu.clip.width +2;
				l.parentLayer.clip.height = window.ActiveMenu.clip.height +2;
				if (l.parentLayer.menuContainerBgColor) l.parentLayer.document.bgColor = l.parentLayer.menuContainerBgColor;
			}
		}
		l.visibility = "inherit";
		if (l.Menu) l.Menu.container.visibility = "inherit";
	} else if (FIND("menuItem0")) {
		var l = menu.menuLayer || menu;	
		hideActiveMenus();
		if (typeof(l) == "string") {
			l = FIND(l);
		}
		window.ActiveMenu = l;
		var s = l.style;
		s.visibility = "inherit";
		if (x != "relative") 
			s.left = s.pixelLeft = x || (window.pageX + document.body.scrollLeft) || 0;
		if (y != "relative") 
			s.top = s.pixelTop = y || (window.pageY + document.body.scrollTop) || 0;
		l.Menu.xOffset = document.body.scrollLeft;
		l.Menu.yOffset = document.body.scrollTop;
	}
	if (menu) {
		window.activeMenus[window.activeMenus.length] = l;
	}
}

function MM_swapImgRestore() { //v3.0
  var i,x,a=document.MM_sr; for(i=0;a&&i<a.length&&(x=a[i])&&x.oSrc;i++) x.src=x.oSrc;
}

function MM_preloadImages() { //v3.0
  var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new Array();
    var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0; i<a.length; i++)
    if (a[i].indexOf("#")!=0){ d.MM_p[j]=new Image; d.MM_p[j++].src=a[i];}}
}

function MM_findObj(n, d) { //v4.01
  var p,i,x;  if(!d) d=document; if((p=n.indexOf("?"))>0&&parent.frames.length) {
    d=parent.frames[n.substring(p+1)].document; n=n.substring(0,p);}
  if(!(x=d[n])&&d.all) x=d.all[n]; for (i=0;!x&&i<d.forms.length;i++) x=d.forms[i][n];
  for(i=0;!x&&d.layers&&i<d.layers.length;i++) x=MM_findObj(n,d.layers[i].document);
  if(!x && d.getElementById) x=d.getElementById(n); return x;
}

function MM_swapImage() { //v3.0
  var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new Array; for(i=0;i<(a.length-2);i+=3)
   if ((x=MM_findObj(a[i]))!=null){document.MM_sr[j++]=x; if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
}

function fwLoadMenus(PageType) 
{


	// Return if one of the menu items is already in memory
	if (window.fw_menu_6)
	{

		return;
	}
	if ( (PageType == "professionals")  || ( PageType == "affiliates" ) )
	{

		window.fw_menu_0 = new Menu('KnowledgeBase'); 
		window.fw_menu_0.addMenuItem('Infor AutoRelease',"location='/ftpaccess/primus/index.aspx'");
		window.fw_menu_0.addMenuItem('Infor Baan',"location='/Solutions/SearchBaanKB.aspx'"); 
		window.fw_menu_0.addMenuItem('Infor bizLink',"location='/ftpaccess/primus/index.aspx'");
		window.fw_menu_0.addMenuItem('Infor CRM CORrelation',"location='/ftpaccess/primus/index.aspx'");
		window.fw_menu_0.addMenuItem('Infor EAM',"location='/ftpaccess/primus/index.aspx'");
		window.fw_menu_0.addMenuItem('Infor ERP A+',"location='/ftpaccess/primus/index.aspx'");
		window.fw_menu_0.addMenuItem('Infor ERP COM',"location='/ftpaccess/primus/index.aspx'");
		window.fw_menu_0.addMenuItem('Infor ERP commerce@work',"location='/ftpaccess/primus/index.aspx'");
		window.fw_menu_0.addMenuItem('Infor ERP FACTS',"location='/ftpaccess/primus/index.aspx'");
		//window.fw_menu_0.addMenuItem('Infor ERP GrowthPower',"location='/ftpaccess/primus/index.aspx'");
		//window.fw_menu_0.addMenuItem('Infor ERP Point.Man',"location='/ftpaccess/primus/index.aspx'");
		window.fw_menu_0.addMenuItem('Infor ERP GrowthPower',"location='/solutions/search.aspx?kb=atg&t=searchTab&locale=en_US&_dyncharset=UTF-8'");
		window.fw_menu_0.addMenuItem('Infor ERP Point.Man',"location='/solutions/search.aspx?kb=atg&t=searchTab&locale=en_US&_dyncharset=UTF-8'");
		window.fw_menu_0.addMenuItem('Infor ERP SHIMS',"location='/ftpaccess/primus/index.aspx'");
		window.fw_menu_0.addMenuItem('Infor ERP SyteLine',"location='/solutions/search.aspx?kb=atg&t=searchTab&locale=en_US&_dyncharset=UTF-8'");
		//window.fw_menu_0.addMenuItem('Progress - Infor ERP SyteLine',"location='/ftpaccess/primus/index.aspx'");

		window.fw_menu_0.addMenuItem('Infor ERP SX (SX.enterprise)',"location='/ftpaccess/primus/index.aspx'");
		window.fw_menu_0.addMenuItem('Infor ERP TAKESTOCK',"location='/ftpaccess/primus/index.aspx'");
		window.fw_menu_0.addMenuItem('Infor ERP TRANS4M',"location='/ftpaccess/primus/index.aspx'");
		window.fw_menu_0.addMenuItem('Infor ERP VE (Visual Enterprise)',"location='/ftpaccess/primus/index.aspx'");
		//window.fw_menu_0.addMenuItem('Infor ERP VE (Visual Enterprise)',"location='/solutions/search.aspx?kb=atg&t=searchTab&locale=en_US&_dyncharset=UTF-8'");
		window.fw_menu_0.addMenuItem('Infor ERP XA',"location='/ftpaccess/primus/index.aspx'");
		window.fw_menu_0.addMenuItem('Infor Financials (Varial)',"location='/ftpaccess/primus/index.aspx'");

		//window.fw_menu_0.addMenuItem('Infor HCM Workforce Management',"location='/ftpaccess/workforce/index.aspx'"); 
		window.fw_menu_0.addMenuItem('Infor HCM Workforce Management',"location='/solutions/search.aspx?kb=atg&t=searchTab&locale=en_US&_dyncharset=UTF-8'");
			
		window.fw_menu_0.addMenuItem('Infor Infinium',"location='/Solutions/InfiniumSolutions.aspx'"); 

		window.fw_menu_0.addMenuItem('Infor SRM SupplyWeb',"location='/ftpaccess/primus/index.aspx'");
		window.fw_menu_0.addMenuItem('Infor TriSyn',"location='/solutions/search.aspx?kb=atg&t=searchTab&locale=en_US&_dyncharset=UTF-8'");
		window.fw_menu_0.addMenuItem('Infor Xpert',"location='/ftpaccess/primus/index.aspx'");
		window.fw_menu_0.addMenuItem('Other Infor Product FAQs',"location='/Solutions/faq_app/scopequeryform.asp'"); 
		window.fw_menu_0.hideOnMouseOut=true; 
	
		window.fw_menu_1 = new Menu('Downloads');
		window.fw_menu_1.addMenuItem('Infor AutoRelease',"location='/FTPAccess/primus/GSM.aspx'");
		window.fw_menu_1.addMenuItem('Infor Baan',"location='/Solutions/SearchBaanKB.aspx'");
		window.fw_menu_1.addMenuItem('Infor BPCS',"location='/Solutions/mr_app/mrqueryform.asp'");
		window.fw_menu_1.addMenuItem('Infor CRM Epiphany (Common Fixes)',"location='/FTPAccess/Directory.aspx?Type=2'");
		window.fw_menu_1.addMenuItem('Infor Decisions',"window.open('/FTPAccess/CommonFixes.aspx?f=d')");
		window.fw_menu_1.addMenuItem('Infor EAM',"location='/FTPAccess/datastream/CustSupGetPatch.aspx'"); 
		window.fw_menu_1.addMenuItem('Infor Enspire and TouchStone2000',"location='/FTPAccess/updates_fixes/index.aspx'"); 
		//*****Temporarily commented out until support determines whether to bring this back.  Please leave code commented out - Kim F.
		//window.fw_menu_1.addMenuItem('Infor ERP A+',"location='http://knbase.dalycommerce.net/eRC/EngPc/csAnsrch.asp'");
		window.fw_menu_1.addMenuItem('Infor ERP Adage (One-Offs)',"location='/FTPAccess/Adage/index.aspx'"); 
		//*****Temporarily commented out until support determines whether to bring this back.  Please leave code commented out - Kim F.
		//window.fw_menu_1.addMenuItem('Infor ERP commerce@work',"location='http://knbase.dalycommerce.net/eRC/EngPc/csAnsrch.asp'");
		window.fw_menu_1.addMenuItem('Infor ERP Point.Man',"location='/FTPAccess/primus/GSM.aspx'");
		window.fw_menu_1.addMenuItem('Infor ERP Protean',"location='/FTPAccess/Directory.aspx?Type=3&Dir=protean'");
		window.fw_menu_1.addMenuItem('Infor ERP SyteLine',"location='/FTPAccess/primus/GSM.aspx'"); 
		window.fw_menu_1.addMenuItem('Infor ERP Trans4M',"location='/FTPAccess/primus/GSM.aspx'");
		window.fw_menu_1.addMenuItem('Infor ERP VE (Visual Enterprise)',"location='/FTPAccess/primus/GSM.aspx'");
		window.fw_menu_1.addMenuItem('Infor ERP XA and ThruPut',"location='/FTPAccess/primus/GSM.aspx'");
		window.fw_menu_1.addMenuItem('Infor FMS Elevon (Monthly Updates)',"location='http://198.202.129.70/e-2/downloads/category2.cfm'");
		window.fw_menu_1.addMenuItem('Infor Hansen',"location='/ftpaccess/hansen/index.aspx'");	
		window.fw_menu_1.addMenuItem('Infor Infinium',"location='/downloads/Infiniumdownloads.aspx'"); 
		//window.fw_menu_1.addMenuItem('Infor Ironside',"location='http://www.ironside.com/enet/onepoint.asp'"); 
		window.fw_menu_1.addMenuItem('Infor MyDay',"window.open('/FTPAccess/CommonFixes.aspx?f=m')");
		window.fw_menu_1.addMenuItem('Infor SRM SupplyWeb',"location='/FTPAccess/primus/GSM.aspx'");
		window.fw_menu_1.addMenuItem('Infor TriSyn',"location='/FTPAccess/trisyn/index.aspx'");
		window.fw_menu_1.addMenuItem('Other Infor Product Solutions',"location='/Solutions/faq_app/scopequeryform.asp'"); 
		window.fw_menu_1.hideOnMouseOut=true; 
		
		window.fw_menu_2 = new Menu('Incidents'); 
		window.fw_menu_2.addMenuItem('Product Incident Manager',"location='/applix_login/Incidents.aspx'");
		window.fw_menu_2.addMenuItem('Add Product Incident',"window.open('/applix_login/Incident_Add.aspx')");
		window.fw_menu_2.addMenuItem('Add General Information Request',"window.open('/applix_login/ClientCareIncident.aspx')");
		window.fw_menu_2.addMenuItem('Search Product Incidents',"location='/applix_login/IncidentSearch.aspx'");
		window.fw_menu_2.addMenuItem('Saved Searches',"location='/applix_login/IncidentMySearches.aspx'");
		window.fw_menu_2.addMenuItem('Search Archived Incidents',"location='/applix_login/IncidentSearchArc.aspx'");
		window.fw_menu_2.hideOnMouseOut=true;

		window.fw_menu_3 = new Menu('Documentation'); 
		window.fw_menu_3.addMenuItem('Infor AutoRelease',"location='/Documentation/EInfo.aspx'");
		window.fw_menu_3.addMenuItem('Infor Baan',"location='/Documentation/Baan/supportdocumentation.asp'");
		window.fw_menu_3.addMenuItem('Infor ERP BPCS and LX',"location='/lvlone/products/product_list.aspx'");
		window.fw_menu_3.addMenuItem('Infor ERP SyteLine',"location='/Documentation/EInfo.aspx'");
		window.fw_menu_3.addMenuItem('Infor ERP Trans4M',"location='/Documentation/EInfo.aspx'");
		window.fw_menu_3.addMenuItem('Infor ERP VE (Visual Enterprise)',"location='/Documentation/EInfo.aspx'");
		window.fw_menu_3.addMenuItem('Infor ERP XA',"location='/Documentation/EInfo.aspx'");
		window.fw_menu_3.addMenuItem('Infor Infinium',"location='/Documentation/InfiniumDocumentation.aspx'");
		window.fw_menu_3.addMenuItem('Infor SRM SupplyWeb',"location='/Documentation/EInfo.aspx'");
		window.fw_menu_3.addMenuItem('Infor Xpert', "location='/Documentation/EInfo.aspx'");
		window.fw_menu_3.addMenuItem('Other Infor Products',"location='/lvlone/products/product_list.aspx'");
		window.fw_menu_3.hideOnMouseOut=true;

		window.fw_menu_4 = new Menu('Communities', 275);
		if (PageType == "professionals" || PageType == "affiliates")
		{
			//if (allowedACID.search(AccountContactID)>0)
			//window.fw_menu_4.addMenuItem('Infor365 Community', "location='/modules/LeverageOnlineCommunity/InitialPostToLeverage.aspx'"); 
			window.fw_menu_4.addMenuItem('Infor365 Community', "window.open('/modules/LeverageOnlineCommunity/InitialPostToLeverage.aspx')"); 
		}

		if (PageType != "affiliates")
		{
			window.fw_menu_4.addMenuItem('Infor CRM Epiphany Forum Archive',"location='/modules/includes/EPNYWebBoardauthCookie.asp?Board=customer'"); 
		}
		//window.fw_menu_4.addMenuItem('Infor CRM Epiphany Forum',"location='/forum/epiphany.html'"); 
		//window.fw_menu_4.addMenuItem('Infor EAM Forum',"location='/forum/eam.html'"); 
		//window.fw_menu_4.addMenuItem('Infor ERP A+ and commerce@work Daily Live Chat',"location='/FTPAccess/daly/os_chat_index.aspx'");
		//window.fw_menu_4.addMenuItem('Infor ERP FT (FACTs) Forum', "location='http://www.aperum.com/infor_nexus/customerdb_gateway.html'");
		//window.fw_menu_4.addMenuItem('Infor ERP FT (FACTs) Forum For Partners', "location='http://www.aperum.com/infor_nexus/solutionpartnerdb_gateway.html'");
		//window.fw_menu_4.addMenuItem('Infor ERP SyteLine',"location='/forum/primus.aspx'");
		//window.fw_menu_4.addMenuItem('Infor ERP VE (Visual Enterprise) Forums',"location='/forum/primus.aspx'");
		//window.fw_menu_4.addMenuItem('Infor TakeStock Forum',"location='http://www.aperum.com/infor_nexus/customerdb_gateway.html'");
		window.fw_menu_4.hideOnMouseOut=true;	

		window.fw_menu_5 = new Menu('Tools');
		window.fw_menu_5.addMenuItem('Connect to FTP Site',"location='/FTPAccess/Directory.aspx?Type=2'");
		window.fw_menu_5.addMenuItem('Request a Software License Key',"location='/lvlone/products/keys.aspx'");
		window.fw_menu_5.addMenuItem('Support Guides and Tools',"location='/lvlone/resources/tools.aspx'");
		window.fw_menu_5.hideOnMouseOut=true;	

		window.fw_menu_6 = new Menu('Links'); 
		window.fw_menu_6.addMenuItem('Infor Corporate Site',"location='http://www.infor.com/'");
		window.fw_menu_6.addMenuItem('Infor Education Services',"location='http://www.infor.com/infor/Services_Education.htm'");
		window.fw_menu_6.addMenuItem('Infor Event Calendar',"location='http://www.infor.com/infor/Company_Events.htm'");
		window.fw_menu_6.addMenuItem('Infor HCM Workforce University',"location='/lvlone/download_documents.aspx?file=Infor365-WFM_Training_Information.pdf'");
		window.fw_menu_6.addMenuItem('Infor Knowledgezone',"location='http://knowledgezone.infor.com/'"); 
		window.fw_menu_6.addMenuItem('Infor Knowledgezone for Automotive',"location='http://automotive.knowledgezone.infor.com'"); 
		window.fw_menu_6.addMenuItem('Infor Knowledgezone for Distribution',"location='/educationtraining/ClassroomTraining.aspx'"); 
		window.fw_menu_6.addMenuItem('Infor Offices',"location='http://www.infor.com/company/locations/'");
		window.fw_menu_6.addMenuItem('Infor Partners',"location='http://www.infor.com/partners/'");
		window.fw_menu_6.addMenuItem('Infor Professional Services',"location='/services/services.aspx'");
		window.fw_menu_6.addMenuItem('Infor Xpert and COM Training Center',"location='http://194.99.90.35/'");
		window.fw_menu_6.hideOnMouseOut=true;

		window.fw_menu_6.writeMenus();
	}
	else
	{


		
		if (display("KC"))
		{
			window.fw_menu_0 = new Menu('KnowledgeBase');
			if ( ProductGroups.search(/MAP_AR/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor AutoRelease',"location='/ftpaccess/primus/index.aspx'");
			} 
			if ( ProductGroups.search(/BAAN/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor Baan and LN',"location='/Solutions/SearchBaanKB.aspx'"); 
			}
			if ( ProductGroups.search(/NXT_BIZL/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor bizLink',"location='/ftpaccess/primus/index.aspx'");
			}
			if ( ProductGroups.search(/NXT_COR/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor CRM CORrelation',"location='/ftpaccess/primus/index.aspx'");
			}
			if ( ProductGroups.search(/SSA_EPI/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor CRM Epiphany',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/DST_/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor EAM',"location='/ftpaccess/primus/index.aspx'"); 
			}
			if ( ProductGroups.search(/DALY_A+/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP A+',"location='/ftpaccess/primus/index.aspx'");
			}
			if ( ProductGroups.search(/SSA_BPCS/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP BPCS and LX',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_CAS/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP CAS',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/INFOR_COM/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP COM',"location='/ftpaccess/primus/index.aspx'");
			}
			if ( ProductGroups.search(/DALY_COM/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP commerce@work',"location='/ftpaccess/primus/index.aspx'");
			}
			if ( ProductGroups.search(/FACTS/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP FACTS',"location='/ftpaccess/primus/index.aspx'");
			}
			if ( ProductGroups.search(/MAP_GP/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP GrowthPower',"location='/solutions/search.aspx?kb=atg&t=searchTab&locale=en_US&_dyncharset=UTF-8'");
			}
			//if ( ProductGroups.search(/MAP_GP/i) != -1 )
			//{
			//	window.fw_menu_0.addMenuItem('Infor ERP GrowthPower',"location='/ftpaccess/primus/index.aspx'");
			//}
			if ( ProductGroups.search(/SSA_KBM/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP KBM',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_MMAN/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP MANMAN',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_MAX/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP MAX',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_MK/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP MK',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			//if ( ProductGroups.search(/MAP_XS/i) != -1 )
			//{
			//	window.fw_menu_0.addMenuItem('Infor ERP Point.Man',"location='/ftpaccess/primus/index.aspx'");
			//}
			if ( ProductGroups.search(/MAP_XS/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP Point.Man',"location='/solutions/search.aspx?kb=atg&t=searchTab&locale=en_US&_dyncharset=UTF-8'");
			}
			if ( ProductGroups.search(/SSA_PRI/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP Prism',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_PRMS/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP PRMS',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_PRO/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP Protean',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/NXT_SHIM/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP SHIMS',"location='/ftpaccess/primus/index.aspx'");
			}
			if ( ProductGroups.search(/MAP_SL/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP SyteLine',"location='/solutions/search.aspx?kb=atg&t=searchTab&locale=en_US&_dyncharset=UTF-8'");
				//window.fw_menu_0.addMenuItem('Progress - Infor ERP SyteLine',"location='/ftpaccess/primus/index.aspx'");

			}
			if ( ProductGroups.search(/NXT_SX/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP SX (SX.enterprise)',"location='/ftpaccess/primus/index.aspx'");
			}

			if ( ProductGroups.search(/TAKE/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP TAKESTOCK',"location='/ftpaccess/primus/index.aspx'");
			}

			if ( ProductGroups.search(/MAP_T4/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP TRANS4M',"location='/ftpaccess/primus/index.aspx'");
			}
			if ( ProductGroups.search(/MAP_VE/i) != -1 || ProductGroups.search(/MAP_VQ/i) != -1 || ProductGroups.search(/MAP_VW/i) != -1 || ProductGroups.search(/MAP_VT/i) != -1)
			{
				window.fw_menu_0.addMenuItem('Infor ERP VE (Visual Enterprise)',"location='/ftpaccess/primus/index.aspx'");
				//window.fw_menu_0.addMenuItem('Infor ERP VE (Visual Enterprise)',"location='/solutions/search.aspx?kb=atg&t=searchTab&locale=en_US&_dyncharset=UTF-8'");
			}
			if ( ProductGroups.search(/MAP_IS/i) != -1 || ProductGroups.search(/MAP_TH/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor ERP XA and ThruPut',"location='/ftpaccess/primus/index.aspx'");
			}

			if ( ProductGroups.search(/INFOR_COM/i) != -1)
			{
				window.fw_menu_0.addMenuItem('Infor Financials(Varial)',"location='/ftpaccess/primus/index.aspx'");
			}

			if ( ProductGroups.search(/SSA_ELE/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor FMS Elevon',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_BON/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor HCM Talent Management',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/WRKB/i) != -1 )
			{
				//window.fw_menu_0.addMenuItem('Infor HCM Workforce Management',"location='/ftpaccess/workforce/index.aspx'"); 
				window.fw_menu_0.addMenuItem('Infor HCM Workforce Management',"location='/solutions/search.aspx?kb=atg&t=searchTab&locale=en_US&_dyncharset=UTF-8'");
			}
			if ( ProductGroups.search(/,INF,/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor Infinium',"location='/Solutions/InfiniumSolutions.aspx'"); 
			}
			if ( ProductGroups.search(/SSA_IRO/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor Ironside',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_MNET/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor Masterpiece',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_DTR/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor SCM Distribution Replenishment',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_SCEM/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor SCM Event Management',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_TRL/i) != -1 || ProductGroups.search(/SSA_CAPS/i) != -1)
			{
				window.fw_menu_0.addMenuItem('Infor SCM Transportation & Logistics',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_EXE/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor SCM Warehouse Management',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_BOSS/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor SCM Warehouse Management BOSS',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_PRV/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor SCM Warehouse Management Foursite',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}

			if ( ProductGroups.search(/MAP_SW/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor SRM SupplyWeb',"location='/ftpaccess/primus/index.aspx'"); 
			}
			if ( ProductGroups.search(/TRISYN/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor TriSyn',"location='/solutions/search.aspx?kb=atg&t=searchTab&locale=en_US&_dyncharset=UTF-8'");
			}
			if ( ProductGroups.search(/PART_COG/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor Performance Management',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/DTS_XPPS/i) != -1 )
			{
				window.fw_menu_0.addMenuItem('Infor Xpert',"location='/ftpaccess/primus/index.aspx'"); 
			}
			window.fw_menu_0.hideOnMouseOut=true; 
		}



		//tab visible to users with DL=true
		if (display("DL"))
		{
			window.fw_menu_1 = new Menu('Downloads');
			if ( ProductGroups.search(/MAP_AR/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor AutoRelease',"location='/FTPAccess/primus/GSM.aspx'");
			}
			if ( ProductGroups.search(/BAAN/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor Baan and LN',"location='/Solutions/SearchBaanKB.aspx'"); 
			}
			if ( ProductGroups.search(/SSA_EPI/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor CRM Epiphany (Common Fixes)',"location='/FTPAccess/CommonFixes.aspx?f=e'"); 
			}
			if ( ProductGroups.search(/DST_/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor EAM',"location='/FTPAccess/datastream/CustSupGetPatch.aspx'"); 
			}
			if ( ProductGroups.search(/APER_/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor Enspire and TouchStone2000',"location ='/ftpaccess/updates_fixes/index.aspx'"); 
			}

			//*****Temporarily commented out until support determines whether to bring this back.  Please leave code commented out - Kim F.
			//if ( ProductGroups.search(/DALY_A+/i) != -1 )
			//{
			//	window.fw_menu_1.addMenuItem('Infor ERP A+',"location='http://knbase.dalycommerce.net/eRC/EngPc/csAnsrch.asp'");
			//}
			if ( ProductGroups.search(/ADAGE/i) != -1)
			{
				window.fw_menu_1.addMenuItem('Infor ERP Adage (One-Offs)',"location='/ftpaccess/adage/index.aspx'"); 
			}
			if ( ProductGroups.search(/SSA_BPCS/i) != -1 )
			{
				//window.fw_menu_1.addMenuItem('Infor BPCS and LX',"location='/Solutions/faq_app/scopequeryform.asp'"); 
				window.fw_menu_1.addMenuItem('Infor BPCS (BMRs)',"location='/Solutions/mr_app/mrqueryform.asp'");
 				window.fw_menu_1.addMenuItem('Infor BPCS (Common Fixes)',"location='/FTPAccess/CommonFixes.aspx?f=b'"); 
			}
			if ( ProductGroups.search(/INFOR_DEC/i) != -1 )
			{				
				window.fw_menu_1.addMenuItem('Infor Decisions',"window.open('/FTPAccess/CommonFixes.aspx?f=d')");
			}
			if ( ProductGroups.search(/SSA_CAS/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor ERP CAS',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}

			//*****Temporarily commented out until support determines whether to bring this back.  Please leave code commented out - Kim F.
			//if ( ProductGroups.search(/DALY_COM/i) != -1)
			//{
			//	window.fw_menu_1.addMenuItem('Infor ERP commerce@work',"location='http://knbase.dalycommerce.net/eRC/EngPc/csAnsrch.asp'");
			//}
			if ( ProductGroups.search(/SSA_KBM/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor ERP KBM',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_MMAN/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor ERP MANMAN',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_MAX/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor ERP MAX',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_MK/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor ERP MK',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/MAP_XS/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor ERP Point.Man',"location='/FTPAccess/primus/GSM.aspx'");	
			}
			if ( ProductGroups.search(/SSA_PRI/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor ERP Prism',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_PRMS/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor ERP PRMS',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_PRO/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor ERP Protean (Common Fixes)',"location='/FTPAccess/Directory.aspx?Type=3&Dir=protean'"); 
			}
			if ( ProductGroups.search(/MAP_SL/i) != -1)
			{
				window.fw_menu_1.addMenuItem('Infor ERP SyteLine',"location='/FTPAccess/primus/GSM.aspx'");		
			}
			if ( ProductGroups.search(/MAP_T4/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor ERP Trans4M',"location='/FTPAccess/primus/GSM.aspx'");
			}
			if ( ProductGroups.search(/MAP_VE/i) != -1 || ProductGroups.search(/MAP_VQ/i) != -1 || ProductGroups.search(/MAP_VW/i) != -1 || ProductGroups.search(/MAP_VT/i) != -1)
			{
				window.fw_menu_1.addMenuItem('Infor ERP VE (Visual Enterprise)',"location='/FTPAccess/primus/GSM.aspx'");	
			}
			if ( ProductGroups.search(/MAP_IS/i) != -1 || ProductGroups.search(/MAP_TH/i) != -1)
			{
				window.fw_menu_1.addMenuItem('Infor ERP XA and ThruPut',"location='/FTPAccess/primus/GSM.aspx'");	
			}
			if ( ProductGroups.search(/SSA_ELE/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor FMS Elevon (Monthly Updates)',"location='http://198.202.129.70/e-2/downloads/category2.cfm'"); 
			}
			if ( ProductGroups.search(/HANSEN7/i) != -1 || ProductGroups.search(/HANSEN8/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor Hansen',"location='/ftpaccess/hansen/index.aspx'"); 
			}
			if ( ProductGroups.search(/SSA_BON/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor HCM Talent Management',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/,INF,/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor Infinium',"location='/downloads/Infiniumdownloads.aspx'"); 
			}
			//if ( ProductGroups.search(/SSA_IRO/i) != -1 )
			//{
			//	window.fw_menu_1.addMenuItem('Infor Ironside',"location='http://www.ironside.com/enet/onepoint.asp'"); 
			//}
			if ( ProductGroups.search(/SSA_MNET/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor Masterpiece',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/MAP_SL/i) != -1 || ProductGroups.search(/ADAGE/i) != -1 || ProductGroups.search(/BAAN/i) != -1 || ProductGroups.search(/MAP_V/i) != -1 )
			//if ( ProductGroups.search(/MYDAY/i) != -1 )
			{				
				window.fw_menu_1.addMenuItem('Infor MyDay',"window.open('/FTPAccess/CommonFixes.aspx?f=m')");
			}
			if ( ProductGroups.search(/SSA_DTR/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor SCM Distribution Replenishment',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_SCEM/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor SCM Event Management',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_TRL/i) != -1 || ProductGroups.search(/SSA_CAPS/i) != -1)
			{
				window.fw_menu_1.addMenuItem('Infor SCM Transportation & Logistics',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_EXE/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor SCM Warehouse Management',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_BOSS/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor SCM Warehouse Management BOSS',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/SSA_PRV/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor SCM Warehouse Management Foursite',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			if ( ProductGroups.search(/MAP_SW/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor SRM SupplyWeb',"location='/FTPAccess/primus/GSM.aspx'");
			}
			if ( ProductGroups.search(/TRISYN/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor TriSyn',"location='/FTPAccess/trisyn/index.aspx'");
			}
			if ( ProductGroups.search(/PART_COG/i) != -1 )
			{
				window.fw_menu_1.addMenuItem('Infor Performance Management',"location='/Solutions/faq_app/scopequeryform.asp'"); 
			}
			window.fw_menu_1.hideOnMouseOut=true; 
		}

		// INCIDENTS tab visible to all users
		window.fw_menu_2 = new Menu('Incidents');
		window.fw_menu_2.addMenuItem('Product Incident Manager',"location='/applix_login/Incidents.aspx'");
		window.fw_menu_2.addMenuItem('Add Product Incident',"window.open('/applix_login/Incident_Add.aspx')");
		//if ( ( ProductGroups.search(/BAAN/i) != -1 ) || ( ProductGroups.search(/,INF,/i) != -1 ) || ( ProductGroups.search(/SSA_/i) != -1 ) || ( ProductGroups.search(/PART_/i) != -1 ) || ( ProductGroups.search(/MAP_/i) != -1 ))
		if (display("GEN"))
		{	
				window.fw_menu_2.addMenuItem('Add General Information Request',"window.open('/applix_login/ClientCareIncident.aspx')");
		}
		window.fw_menu_2.addMenuItem('Search Product Incidents',"location='/applix_login/IncidentSearch.aspx'");
		window.fw_menu_2.addMenuItem('Saved Searches',"location='/applix_login/IncidentMySearches.aspx'");
		window.fw_menu_2.addMenuItem('Search Archived Incidents',"location='/applix_login/IncidentSearchArc.aspx'");
		window.fw_menu_2.hideOnMouseOut=true;

		// DOCUMENTATION tab visible to all users where DOC=true
		if (display("DOC"))
		{

			window.fw_menu_3 = new Menu('Documentation');
			if ( ProductGroups.search(/MAP_AR/i) != -1 )
			{
				window.fw_menu_3.addMenuItem('Infor AutoRelease',"location='/Documentation/EInfo.aspx'");
			}
			if ( ProductGroups.search(/BAAN/i) != -1 )
			{
				window.fw_menu_3.addMenuItem('Infor Baan',"location='/Documentation/Baan/supportdocumentation.asp'");
			}
			if ( ProductGroups.search(/,INFOR_DEC,/i) != -1 )
			{
				window.fw_menu_3.addMenuItem('Infor Decisions',"location='/lvlone/products/product_list.aspx'");
			}
			if (ProductGroups.search(/SSA_BPCS/i) != -1 )
			{
				window.fw_menu_3.addMenuItem('Infor ERP BPCS and LX',"location='/lvlone/products/product_list.aspx'");
			}
			if ( ProductGroups.search(/MAP_SL/i) != -1 )
			{
				window.fw_menu_3.addMenuItem('Infor ERP SyteLine',"location='/Documentation/EInfo.aspx'");
			}
			if ( ProductGroups.search(/MAP_T4/i) != -1 )
			{
				window.fw_menu_3.addMenuItem('Infor ERP Trans4M',"location='/Documentation/EInfo.aspx'");
			}
			if ( ProductGroups.search(/MAP_VE/i) != -1 || ProductGroups.search(/MAP_VQ/i) != -1 || ProductGroups.search(/MAP_VW/i) != -1 || ProductGroups.search(/MAP_VT/i) != -1 )
			{
				window.fw_menu_3.addMenuItem('Infor ERP VE (Visual Enterprise)',"location='/Documentation/EInfo.aspx'");
			}
			if ( ProductGroups.search(/MAP_IS/i) != -1 || ProductGroups.search(/MAP_TH/i) != -1 )
			{
				window.fw_menu_3.addMenuItem('Infor ERP XA and ThruPut',"location='/Documentation/EInfo.aspx'");
			}
			if ( ProductGroups.search(/WRKB/i) != -1 )
			{
				window.fw_menu_3.addMenuItem('Infor HCM Workforce Management',"location='/ftpaccess/workforce/index.aspx'"); 
				//window.fw_menu_3.addMenuItem('Infor HCM Workforce Management',"location='/solutions/search.aspx?kb=atg&t=searchTab&locale=en_US&_dyncharset=UTF-8'");
			}
			if ( ProductGroups.search(/,INF,/i) != -1 )
			{
				window.fw_menu_3.addMenuItem('Infor Infinium',"location='/Documentation/InfiniumDocumentation.aspx'");
			}
			if ( ProductGroups.search(/MAP_SL/i) != -1 || ProductGroups.search(/ADAGE/i) != -1 || ProductGroups.search(/BAAN/i) != -1 || ProductGroups.search(/MAP_V/i) != -1 )
			//if ( ProductGroups.search(/,MYDAY,/i) != -1 )
			{
				window.fw_menu_3.addMenuItem('Infor MyDay',"location='/lvlone/products/product_list.aspx'");
			}
			if ( ProductGroups.search(/MAP_SW/i) != -1 )
			{
				window.fw_menu_3.addMenuItem('Infor SRM SupplyWeb',"location='/Documentation/EInfo.aspx'");
			}
			if ( ProductGroups.search(/TRISYN/i) != -1 )
			{
				window.fw_menu_3.addMenuItem('Infor TriSyn',"location='/lvlone/products/product_list.aspx'");
			}
			if (ProductGroups.search(/DTS_XPPS/i) != -1)
			{
				window.fw_menu_3.addMenuItem('Infor Xpert', "location='/Documentation/EInfo.aspx'");
			}
			if (( ProductGroups.search(/INC_BLEND/i) != -1 ) || ( ProductGroups.search(/INFOR_COM/i) != -1 ) || ( ProductGroups.search(/FOS_OPT/i) != -1 ) || ( ProductGroups.search(/DST_/i) != -1 ) || ( ProductGroups.search(/SSA_/i) != -1 && ProductGroups != ",SSA_BPCS,") || ( ProductGroups.search(/PART_/i) != -1 ) || ( ProductGroups.search(/NXT/i) != -1 ) || ( ProductGroups.search(/DALY/i) != -1 ) || ( ProductGroups.search(/TAKE/i) != -1 ) || ( ProductGroups.search(/DMAS/i) != -1 ) || ( ProductGroups.search(/APER/i) != -1 ) || ( ProductGroups.search(/FACTS/i) != -1 ) || ( ProductGroups.search(/ADAGE/i) != -1 ))
			{
				//among SSA_, this (SSA_BPCS) is an exception because it's handled seperately
				if (ProductGroups != ",SSA_BPCS,")
					window.fw_menu_3.addMenuItem('Other Infor Products',"location='/lvlone/products/product_list.aspx'");
			}

			window.fw_menu_3.hideOnMouseOut=true;
		}

		// COMMUNITIES tab visible to some users
		if (display("COMM") || PageType == "affiliates")
		{

			window.fw_menu_4 = new Menu('Communities', 275);
			if (PageType == "affiliates" || ProductGroups.search(/SSA_CAPS/i) != -1 || ProductGroups.search(/MAP_XS/i) != -1 || ProductGroups.search(/,INF,/i) != -1 || ProductGroups.search(/DST_/i) != -1 || ProductGroups.search(/ADAGE/i) != -1 || ProductGroups.search(/BAAN/i) != -1 || ProductGroups.search(/DMAS/i) != -1 || ProductGroups.search(/FACTS/i) != -1 || 
			ProductGroups.search(/MAP_V/i) != -1 || ProductGroups.search(/MAP_GP/i) != -1 || ProductGroups.search(/MAP_IS/i) != -1 || ProductGroups.search(/MAP_SL/i) != -1 || ProductGroups.search(/MAP_TH/i) != -1 || ProductGroups.search(/SSA_,/i) != -1 || ProductGroups.search(/SSA_BPCS/i) != -1 || ProductGroups.search(/SSA_EPI/i) != -1 || ProductGroups.search(/TAKE/i) != -1 ||
			ProductGroups.search(/TRISYN/i) != -1 || ProductGroups.search(/SSA_CAS/i) != -1 || ProductGroups.search(/SSA_EXE/i) != -1 || ProductGroups.search(/PART_4J/i) != -1 || ProductGroups.search(/SSA_KBM/i) != -1 || ProductGroups.search(/SSA_MMAN/i) != -1 || ProductGroups.search(/SSA_MNET/i) != -1 || ProductGroups.search(/SSA_MAX/i) != -1 || ProductGroups.search(/SSA_PRI/i) != -1 || 
			ProductGroups.search(/WRKB/i) != -1 || ProductGroups.search(/MERCIA/i) != -1 || ProductGroups.search(/SSA_PRO/i) != -1 || ProductGroups.search(/SSA_PRMS/i) != -1 || ProductGroups.search(/NXT_SX/i) != -1 || ProductGroups.search(/NXT_BIZL/i) != -1 || ProductGroups.search(/SSA_DTR/i) != -1 || ProductGroups.search(/NXT_SHIM/i) != -1 || ProductGroups.search(/SSA_BON/i) != -1 ||
			ProductGroups.search(/DTS_XPPS/i) != -1 || ProductGroups.search(/INC_BLEND/i) != -1 || ProductGroups.search(/INFOR_COM/i) != -1 || ProductGroups.search(/DALY_COM/i) != -1 || ProductGroups.search(/MAP_AR/i) != -1 || ProductGroups.search(/MAP_T4/i) != -1 || ProductGroups.search(/MAP_SW/i) != -1 || ProductGroups.search(/SSA_IRO/i) != -1 || ProductGroups.search(/HANSEN7/i) != -1 || ProductGroups.search(/HANSEN8/i) != -1 || ProductGroups.search(/HANSEN/i) != -1 || ProductGroups.search(/SPEAR/i) != -1 ||
			ProductGroups.search(/SSA_ELE/i) != -1 || ProductGroups.search(/DALY_A+/i) != -1 ||	ProductGroups.search(/FOS_OPT/i) != -1 ||	ProductGroups.search(/SSA_SCEM/i) != -1 || ProductGroups.search(/SSA_TRL/i) != -1 || ProductGroups.search(/SSA_ARZ/i) != -1 || ProductGroups.search(/SSA_MK/i) != -1 || ProductGroups.search(/SSA_PRV/i) != -1 || ProductGroups.search(/SSA_BOSS/i) != -1 )
			{
				//window.fw_menu_4.addMenuItem('Infor365 Community', "location='/modules/LeverageOnlineCommunity/InitialPostToLeverage.aspx'"); 
				window.fw_menu_4.addMenuItem('Infor365 Community', "window.open('/modules/LeverageOnlineCommunity/InitialPostToLeverage.aspx')"); 
			}
			if ( ProductGroups.search(/SSA_EPI/i) != -1 )
			{
				window.fw_menu_4.addMenuItem('Infor CRM Epiphany Forum Archive',"location='/modules/includes/EPNYWebBoardauthCookie.asp?Board=customer'");
				//window.fw_menu_4.addMenuItem('Infor CRM Epiphany Forum',"location='/forum/epiphany.html'"); 
			}
			//if ( ProductGroups.search(/DST_/i) != -1 )
			//{
			//	window.fw_menu_4.addMenuItem('Infor EAM Forum',"location='/forum/eam.html'"); 		
			//}
			//if ( ProductGroups.search(/FACTS/i) != -1 )
			//{
			//	window.fw_menu_4.addMenuItem('Infor ERP FT (FACTs) Forum',"location='http://www.aperum.com/infor_nexus/customerdb_gateway.htmlw'");
			//	if (PageType == "partners")
			//	{
			//		window.fw_menu_4.addMenuItem('Infor ERP FT (FACTs) Forum For Partners', "location='http://www.aperum.com/infor_nexus/solutionpartnerdb_gateway.html'");
			//	}
			//}
			//if ( ProductGroups.search(/DALY_A+/i) != -1 || ProductGroups.search(/DALY_COM/i) != -1)
			//{
			//	window.fw_menu_4.addMenuItem('Infor ERP A+ and commerce@work Daily Live Chat',"location='/ftpaccess/daly/os_chat_index.aspx'");
			//}
			//if ( ProductGroups.search(/MAP_SL/i) != -1 )
			//{
			//	window.fw_menu_4.addMenuItem('Infor ERP SyteLine',"location='/forum/primus.aspx'");
			//}
			//if ( ( ProductGroups.search(/MAP_VT/i) != -1) || ( ProductGroups.search(/MAP_VE/i) != -1) || ( ProductGroups.search(/MAP_VW/i) != -1) || ( ProductGroups.search(/MAP_VQ/i) != -1) )
			//{
			//	window.fw_menu_4.addMenuItem('Infor ERP VE (Visual Enterprise) Forums',"location='/forum/primus.aspx'");
			//}
			//if ( ProductGroups.search(/TAKE/i) != -1 )
			//{
			//	window.fw_menu_4.addMenuItem('Infor TakeStock Forum',"location='http://www.aperum.com/infor_nexus/customerdb_gateway.html'");
			//}
			window.fw_menu_4.hideOnMouseOut=true;	
		}



		// TOOLS tab visible to all users	
		window.fw_menu_5 = new Menu('Tools');
		//if (ProductGroups != ",HANSEN,")
		if (display("FTP"))
		{
			window.fw_menu_5.addMenuItem('Connect to FTP Site',"location='/FTPAccess/Directory.aspx?Type=2'");
		}
		if (( ProductGroups.search(/,WRKB,/i) != -1 ) ||  ( ProductGroups.search(/,DTS_XPPS,/i) != -1 ) ||  ( ProductGroups.search(/,INF,/i) != -1 ) || ( ProductGroups.search(/BAAN/i) != -1 ) || ( ProductGroups.search(/SSA_/i) != -1 ) || ( ProductGroups.search(/MAP_AR/i) != -1 ) || ( ProductGroups.search(/MAP_SL/i) != -1 ) || ( ProductGroups.search(/MAP_IS/i) != -1 ) || ( ProductGroups.search(/PART_/i) != -1 ) )
		{
			//SSA_CAPS is the only exception so far
			if (ProductGroups !=",SSA_CAPS,")
				window.fw_menu_5.addMenuItem('Request a Software License Key',"location='/lvlone/products/keys.aspx'");
		}
		window.fw_menu_5.addMenuItem('Support Guides and Tools',"location='/lvlone/resources/tools.aspx'");
		window.fw_menu_5.hideOnMouseOut=true;	

		// LINKS tab visible to all users
		window.fw_menu_6 = new Menu('Links'); 
		window.fw_menu_6.addMenuItem('Infor Corporate Site',"location='http://www.infor.com/'");
		window.fw_menu_6.addMenuItem('Infor Education Services',"location='http://www.infor.com/infor/Services_Education.htm'");
		window.fw_menu_6.addMenuItem('Infor Event Calendar',"location='http://www.infor.com/infor/Company_Events.htm'");
		if ( ProductGroups.search(/WRKB/i) != -1)
		{		
			window.fw_menu_6.addMenuItem('Infor HCM Workforce University',"location='/lvlone/download_documents.aspx?file=Infor365-WFM_Training_Information.pdf'");
		}	
		if ( ProductGroups.search(/MAP_IS/i) != -1 || ProductGroups.search(/MAP_TH/i) != -1 || ProductGroups.search(/MAP_SL/i) != -1 || ProductGroups.search(/MAP_VE/i) != -1 || ProductGroups.search(/MAP_VQ/i) != -1 || ProductGroups.search(/MAP_VW/i) != -1 || ProductGroups.search(/MAP_VT/i) != -1 || ProductGroups.search(/MAP_XS/i) != -1 || ProductGroups.search(/BAAN/i) != -1)
		{
			window.fw_menu_6.addMenuItem('Infor Knowledgezone',"location='http://knowledgezone.infor.com/'"); 
		}
		if (ProductGroups.search(/MAP_T4/i) != -1 || ProductGroups.search(/MAP_AR/i) != -1 || ProductGroups.search(/MAP_XL/i) != -1 || ProductGroups.search(/MAP_SW/i) != -1)
		{
			window.fw_menu_6.addMenuItem('Infor Knowledgezone for Automotive',"location='http://automotive.knowledgezone.infor.com'"); 
		}	
		if ( ProductGroups.search(/NXT_SX/i) != -1)
		{
			window.fw_menu_6.addMenuItem('Infor Knowledgezone for Distribution',"location='/educationtraining/ClassroomTraining.aspx'"); 
			window.fw_menu_6.addMenuItem('Infor Professional Services',"location='/services/services.aspx'"); 
		}	
		window.fw_menu_6.addMenuItem('Infor Offices',"location='http://www.infor.com/company/locations/'");
		if (PageType != "clients" )
		{
			window.fw_menu_6.addMenuItem('Infor Partners',"location='http://www.infor.com/partners/'");
		}
		if (ProductGroups.search(/DTS_XPPS/i) != -1 || ProductGroups.search(/INFOR_COM/i) != -1)
		{
			window.fw_menu_6.addMenuItem('Infor Xpert and COM Training Center',"location='http://194.99.90.35/'");
		}
		window.fw_menu_6.hideOnMouseOut=true;			

		window.fw_menu_6.writeMenus();
	}	
}

function display(tab)
{
	var str1;
	var str2;
	var str3;
	var str4;
	var str5;
	var str6;

	str1 = "";
	str2 = "";
	str3 = ProductGroups;
	str4 = "";
	str5 = ProductGroups;
	str6 = ProductGroups;

	// For KC - ONLY show for these Product Groups
	if ( ProductGroups.search(/MAP_AR/i) != -1 ||
		ProductGroups.search(/BAAN/i) != -1 ||
		ProductGroups.search(/NXT_BIZL/i) != -1 ||
		ProductGroups.search(/NXT_COR/i) != -1 ||
		ProductGroups.search(/SSA_EPI/i) != -1 ||
		ProductGroups.search(/DST_/i) != -1 ||
		ProductGroups.search(/DALY_A+/i) != -1 ||
		ProductGroups.search(/DALY_COM/i) != -1 ||
		ProductGroups.search(/SSA_BPCS/i) != -1 ||
		ProductGroups.search(/MAP_GP/i) != -1 ||
		ProductGroups.search(/SSA_KBM/i) != -1 ||
		ProductGroups.search(/SSA_MMAN/i) != -1 ||
		ProductGroups.search(/SSA_MAX/i) != -1 ||
		ProductGroups.search(/SSA_MK/i) != -1 ||
		ProductGroups.search(/MAP_XS/i) != -1 ||
		ProductGroups.search(/SSA_PRI/i) != -1 ||
		ProductGroups.search(/SSA_PRMS/i) != -1 ||
		ProductGroups.search(/SSA_PRO/i) != -1 ||
		ProductGroups.search(/NXT_SHIM/i) != -1 ||
		ProductGroups.search(/MAP_SL/i) != -1 ||
		ProductGroups.search(/NXT_SX/i) != -1 ||
		ProductGroups.search(/MAP_T4/i) != -1 ||
		ProductGroups.search(/MAP_V/i) != -1 ||
		ProductGroups.search(/MAP_IS/i) != -1 ||
		ProductGroups.search(/SSA_ELE/i) != -1 ||
		ProductGroups.search(/SSA_BON/i) != -1 ||
		ProductGroups.search(/,INF,/i) != -1 ||
		ProductGroups.search(/SSA_IRO/i) != -1 ||
		ProductGroups.search(/SSA_MNET/i) != -1 ||
		ProductGroups.search(/SSA_DTR/i) != -1 ||
		ProductGroups.search(/SSA_SCEM/i) != -1 ||
		ProductGroups.search(/SSA_TRL/i) != -1 ||
		ProductGroups.search(/SSA_EXE/i) != -1 ||
		ProductGroups.search(/SSA_BOSS/i) != -1 ||
		ProductGroups.search(/SSA_PRV/i) != -1 ||
		ProductGroups.search(/MAP_SW/i) != -1 ||
		ProductGroups.search(/PART_COG/i) != -1 ||
		ProductGroups.search(/SSA_CAPS/i) != -1 ||
		ProductGroups.search(/DTS_XPPS/i) != -1 ||
		ProductGroups.search(/MAP_TH/i) != -1 ||
		ProductGroups.search(/TAKE,/i) != -1 ||
		ProductGroups.search(/INFOR_COM/i) != -1 ||
		ProductGroups.search(/TRISYN/i) != -1 ||
		ProductGroups.search(/FACTS/i) != -1 ||
		
		ProductGroups.search(/WRKB/i) != -1)

		str1 = "knowledgebase"

	// For DL - Only show for these Product Groups
	if ( ProductGroups.search(/MAP_AR/i) != -1 ||
		ProductGroups.search(/BAAN/i) != -1 ||
		ProductGroups.search(/SSA_EPI/i) != -1 ||
		ProductGroups.search(/DST_/i) != -1 ||
		ProductGroups.search(/APER_/i) != -1 ||
		//ProductGroups.search(/DALY_A+/i) != -1 ||
		ProductGroups.search(/ADAGE/i) != -1 ||
		ProductGroups.search(/SSA_BPCS/i) != -1 ||
		ProductGroups.search(/SSA_CAS/i) != -1 ||
		//ProductGroups.search(/DALY_COM/i) != -1 ||
		ProductGroups.search(/SSA_KBM/i) != -1 ||
		ProductGroups.search(/SSA_MMAN/i) != -1 ||
		ProductGroups.search(/SSA_MAX/i) != -1 ||
		ProductGroups.search(/SSA_MK/i) != -1 ||
		ProductGroups.search(/MAP_XS/i) != -1 ||
		ProductGroups.search(/SSA_PRI/i) != -1 ||
		ProductGroups.search(/SSA_PRMS/i) != -1 ||
		ProductGroups.search(/SSA_PRO/i) != -1 ||
		ProductGroups.search(/MAP_SL/i) != -1 ||
		ProductGroups.search(/MAP_T4/i) != -1 ||
		ProductGroups.search(/MAP_V/i) != -1 ||
		ProductGroups.search(/MAP_IS/i) != -1 ||
		ProductGroups.search(/MAP_TH/i) != -1 ||
		ProductGroups.search(/SSA_ELE/i) != -1 ||
		ProductGroups.search(/SSA_BON/i) != -1 ||
		ProductGroups.search(/,INF,/i) != -1 ||
		ProductGroups.search(/SSA_IRO/i) != -1 ||
		ProductGroups.search(/SSA_MNET/i) != -1 ||
		ProductGroups.search(/SSA_DTR/i) != -1 ||
		ProductGroups.search(/SSA_SCEM/i) != -1 ||
		ProductGroups.search(/SSA_TRL/i) != -1 ||
		ProductGroups.search(/SSA_EXE/i) != -1 ||
		ProductGroups.search(/SSA_BOSS/i) != -1 ||
		ProductGroups.search(/SSA_PRV/i) != -1 ||
		ProductGroups.search(/MAP_SW/i) != -1 ||
		ProductGroups.search(/PART_COG/i) != -1 ||
		ProductGroups.search(/TRISYN/i) != -1 ||
		ProductGroups.search(/MYDAY/i) != -1 ||
		ProductGroups.search(/HANSEN7/i) != -1 ||
		ProductGroups.search(/HANSEN8/i) != -1 ||
		ProductGroups.search(/SSA_CAPS/i) != -1)

		str2 = "downloads"

	// For DOC - Don't show for these Product Groups
	//str3 = str3.replace("ADAGE,","");
	str3 = str3.replace("HANSEN,","");
	str3 = str3.replace("HANSEN7,","");
	str3 = str3.replace("HANSEN8,","");
	str3 = str3.replace("SPEAR,","");
	str3 = str3.replace("SHIPLGX,","");
	str3 = str3.replace("MAP_GP,","");
	str3 = str3.replace("MERCIA,","");
	str3 = str3.replace(",","");


	if (( ProductGroups.search(/MAP_SL/i) != -1) ||  
		( ProductGroups.search(/MAP_VT/i) != -1) || 
		( ProductGroups.search(/MAP_VE/i) != -1) || 
		( ProductGroups.search(/MAP_VW/i) != -1) || 
		( ProductGroups.search(/MAP_VQ/i) != -1) || 
		( ProductGroups.search(/,INF,/i) != -1) || 
		( ProductGroups.search(/SSA_EPI/i) != -1) || 
		( ProductGroups.search(/DST_/i) != -1 ) || 
		( ProductGroups.search(/FACTS/i) != -1) || 
		( ProductGroups.search(/TAKE/i) != -1) || 
		( ProductGroups.search(/DALY_A+/i) != -1 ) || 
		( ProductGroups.search(/DALY_COM/i) != -1 ) || 
		ProductGroups.search(/ADAGE/i) != -1 || 
		ProductGroups.search(/BAAN/i) != -1 || 
		ProductGroups.search(/DMAS/i) != -1 || 
		ProductGroups.search(/FACTS/i) != -1 || 
		ProductGroups.search(/MAP_V/i) != -1 || 
		ProductGroups.search(/MAP_AR/i) != -1 || 
		ProductGroups.search(/MAP_GP/i) != -1 || 
		ProductGroups.search(/MAP_IS/i) != -1 || 
		ProductGroups.search(/MAP_SL/i) != -1 || 
		ProductGroups.search(/MAP_T4/i) != -1 || 
		ProductGroups.search(/MAP_TH/i) != -1 || 
		ProductGroups.search(/MAP_XS/i) != -1 || 
		ProductGroups.search(/SSA_,/i) != -1 || 
		ProductGroups.search(/SSA_BPCS/i) != -1 || 
		ProductGroups.search(/SSA_EPI/i) != -1 || 
		ProductGroups.search(/SSA_CAPS/i) != -1 ||
		ProductGroups.search(/INC_BLEND/i) != -1 ||
		ProductGroups.search(/SSA_CAS/i) != -1 ||
		ProductGroups.search(/INFOR_COM/i) != -1 ||
		ProductGroups.search(/SSA_EXE/i) != -1 ||
		ProductGroups.search(/PART_4J/i) != -1 ||
		ProductGroups.search(/SSA_KBM/i) != -1 ||
		ProductGroups.search(/SSA_MMAN/i) != -1 ||
		ProductGroups.search(/SSA_MNET/i) != -1 ||
		ProductGroups.search(/SSA_MAX/i) != -1 ||
		ProductGroups.search(/SSA_PRI/i) != -1 ||
		ProductGroups.search(/SSA_PRO/i) != -1 ||
		ProductGroups.search(/SSA_PRMS/i) != -1 ||
		ProductGroups.search(/NXT_SX/i) != -1 ||
		ProductGroups.search(/SSA_ELE/i) != -1 ||
		ProductGroups.search(/DALY_A+/i) != -1 ||
		ProductGroups.search(/FOS_OPT/i) != -1 ||
		ProductGroups.search(/SSA_SCEM/i) != -1 ||
		ProductGroups.search(/SSA_TRL/i) != -1 ||
		ProductGroups.search(/SSA_ARZ/i) != -1 ||
		ProductGroups.search(/SSA_PRV/i) != -1 ||
		ProductGroups.search(/SSA_BOSS/i) != -1 ||
		ProductGroups.search(/NXT_BIZL/i) != -1 ||
            		ProductGroups.search(/NXT_SHIM/i) != -1 ||
            		ProductGroups.search(/SSA_MK/i) != -1 ||
		ProductGroups.search(/MERCIA/i) != -1 ||
		ProductGroups.search(/SSA_BON/i) != -1 ||
 		ProductGroups.search(/DTS_XPPS/i) != -1 ||           
		ProductGroups.search(/HANSEN/i) != -1 ||
		ProductGroups.search(/SPEAR/i) != -1 ||
		ProductGroups.search(/SSA_IRO/i) != -1 ||
		ProductGroups.search(/TRISYN/i) != -1 ||
		ProductGroups.search(/MAP_SW/i) != -1 ||
		ProductGroups.search(/WRKB/i) != -1 ||
		ProductGroups.search(/SSA_DTR/i) != -1)

		str4 = "communities"

	//FTP
	str5 = str5.replace("HANSEN,","");
	str5 = str5.replace("DTS_XPPS,","");
	str5 = str5.replace("WRKB,","");

	str5 = str5.replace(",","");

	//General Incident
	str6 = str6.replace("HANSEN,","");
	str6 = str6.replace("HANSEN7,","");
	str6 = str6.replace("HANSEN8,","");
	str6 = str6.replace("SPEAR,","");
	str6 = str6.replace("SHIPLGX,","");
	str6 = str6.replace("DTS_XPPS,","");		
	str6 = str6.replace(",","");

//if (AccountContactID==688217)
//	alert(str1 + "=" + str2 + "==" + str3 + "===");

	if (tab == "KC")
		return (str1.length > 1);
	else if (tab=="DL")
		return (str2.length > 1);
	else if (tab=="DOC")
		return (str3.length > 1);
	else if (tab=="COMM")
		return (str4.length > 1);
	else if (tab=="FTP")
		return (str5.length > 1);
	else if (tab=="GEN")
		return (str6.length > 1);
	else
		return false;
}

////////////////////////////////////////////////////////////////////
// Misc Functions 
//---------------------------------------------------------------------------------------
function quicksearch()
{
	//alert(document.all['quicksearchtext'].value);

	var test = typeof(document.getElementsById);
	var test2 = typeof(document.all);
	var test3 = typeof(document.getElementById);
	//alert(test);
	//alert(document.getElementById("quicksearchtext").value);
	
	var quickText;

	if (test == 'object') 
	{
		quickText= document.getElementsById('quicksearchtext').value;
	}
	if (test2 == "object")
	{

		quickText= document.all['quicksearchtext'].value;
	}
	if (test3=="function")
		quickText = document.getElementById("quicksearchtext").value;

	var i;
	i = quickText; //document.forms[0].quicksearchtext.value;
	var re=/^[0-9]+$/;   //   /^\d{6}$/;



	if (i.search(re)==-1)	
		alert("The incident ID you entered is not valid.");
	else
		window.open("/applix_login/IncidentDetails_Print.aspx?ID=" + i);

	

}
function imageFocus(e){
   if(window.event)
	;
   else
   {
	key =  e.which;
	if(key==13) 
	{
				
		document.getElementById("imgSearch").focus();
	}
   }
}
function changeImages() {
 if (document.images) {
  var img;
  for (var i=0; i<changeImages.arguments.length; i+=2) {
   img = null;
   if (document.layers) {
    img = findElement(changeImages.arguments[i],0);
   }
   else {
    img = document.images[changeImages.arguments[i]];
   }
   if (img) {
    img.src = changeImages.arguments[i+1];
   }
  }
 }
}

// Function to determine which browser the customer is using.
// JDD 2/12/2007 -- Modified to determine different versions of I.E.
// NOTE: I.E. version 5.01 is not displaying DIVs correctly.
function whichBrs() 
{
	var agt = navigator.userAgent.toLowerCase();
	
	if (agt.indexOf("opera") != -1) return 'Opera';
	if (agt.indexOf("staroffice") != -1) return 'Star Office';
	if (agt.indexOf("webtv") != -1) return 'WebTV';
	if (agt.indexOf("beonex") != -1) return 'Beonex';
	if (agt.indexOf("chimera") != -1) return 'Chimera';
	if (agt.indexOf("netpositive") != -1) return 'NetPositive';
	if (agt.indexOf("phoenix") != -1) return 'Phoenix';
	if (agt.indexOf("firefox") != -1) return 'Firefox';
	if (agt.indexOf("safari") != -1) return 'Safari';
	if (agt.indexOf("skipstone") != -1) return 'SkipStone';
	if (agt.indexOf("netscape") != -1) return 'Netscape';
	if (agt.indexOf("mozilla/5.0") != -1) return 'Mozilla';
	
	if (agt.indexOf("msie 5.01") != -1) return 'Internet Explorer 5.01';
	if (agt.indexOf("msie") != -1) return 'Internet Explorer';
	
	
	if (agt.indexOf('\/') != -1) 
	{
		if (agt.substr(0,agt.indexOf('\/')) != 'mozilla') 
		{
			return navigator.userAgent.substr(0, agt.indexOf('\/'));
		}
		else 
		{
			return 'Netscape';
		}
	} 
	else if (agt.indexOf(' ') != -1)
	{
		return navigator.userAgent.substr(0, agt.indexOf(' '));
	}
	else 
	{
		return navigator.userAgent;
	}
}


function windowopen(url)
{
alert("new function");
	if(newWin)
	{
		newWin.location = url;
	}
	else
	{
		newWin = window.open(url,0,"toolbar=no,location=no,status=no,menubar=no,scrollbars=yes");
	}
	

	newWin.focus();

}
