PROBLEM:
i have two layers that pull in javascript menus on the same page.
both are brought in with basically the same script (see below). i've changed the div id and obviously the php require file (as well as the "var TargetLoc='relatedlinks';" for relative positioning). the problem is there seems to be a conflict. i get the error message "stack overflow on line 95" AND neither menu appears. if i remove one of the menus, the other works.
CODE
<div id="relatedlinks" style="position: relative; width: 133px; height: 125px;"><img src="images/templates/spacer.gif" width="133" height="125" hspace="0" vspace="0" border="0">
<?php require("nav/relatedlinks_nav.html"); ?></div>
PHP REQUIRE
var NoOffFirstLineMenus=1; // Number of first level items
var LowBgColor='#ffffff'; // Background color when mouse is not over
var LowSubBgColor='#ffffff'; // Background color when mouse is not over on subs
var HighBgColor='#ffffff'; // Background color when mouse is over
var HighSubBgColor='#ffffff'; // Background color when mouse is over on subs
var FontLowColor='000000'; // Font color when mouse is not over
var FontSubLowColor='000000'; // Font color subs when mouse is not over
var FontHighColor='#9c0138'; // Font color when mouse is over
var FontSubHighColor='#9c0138'; // Font color subs when mouse is over
var BorderColor='#FFFFFF'; // Border color
var BorderSubColor='FFFFFF'; // Border color for subs
var BorderWidth=0; // Border width
var BorderBtwnElmnts=0; // Border between elements 1 or 0
var FontFamily="verdana" // Font family menu items
var FontSize=7; // Font size menu items
var FontBold=0; // Bold menu items 1 or 0
var FontItalic=0; // Italic menu items 1 or 0
var MenuTextCentered='left'; // Item text position 'left', 'center' or 'right'
var MenuCentered='left'; // Menu horizontal position 'left', 'center' or 'right'
var MenuVerticalCentered='top'; // Menu vertical position 'top', 'middle','bottom' or static
var ChildOverlap=1; // horizontal overlap child/ parent
var ChildVerticalOverlap=1; // vertical overlap child/ parent
var StartTop=0; // Menu offset x coordinate
var StartLeft=1; // Menu offset y coordinate
var VerCorrect=0; // Multiple frames y correction
var HorCorrect=0; // Multiple frames x correction
var LeftPaddng=3; // Left padding
var TopPaddng=2; // Top padding
var FirstLineHorizontal=0; // SET TO 1 FOR HORIZONTAL MENU, 0 FOR VERTICAL
var MenuFramesVertical=1; // Frames in cols or rows 1 or 0
var DissapearDelay=500; // delay before menu folds in
var TakeOverBgColor=1; // Menu frame takes over background color subitem frame
var FirstLineFrame='space'; // Frame where first level appears
var SecLineFrame='space'; // Frame where sub levels appear
var DocTargetFrame='space'; // Frame where target documents appear
var TargetLoc='relatedlinks'; // span id for relative positioning
var HideTop=0; // Hide first level when loading new document 1 or 0
var MenuWrap=1; // enables/ disables menu wrap 1 or 0
var RightToLeft=0; // enables/ disables right to left unfold 1 or 0
var UnfoldsOnClick=0; // Level 1 unfolds onclick/ onmouseover
var WebMasterCheck=0; // menu tree checking on or off 1 or 0
var ShowArrow=0; // Uses arrow gifs when 1
var KeepHilite=1; // Keep selected path highligthed
var Arrws=['/images/templates/arrow_red.gif',5,6,'../images/templates/arrow_red.gif',5,6,'../images/templates/arrow_red.gif',5,6]; // Arrow source, width and height
function BeforeStart(){return}
function AfterBuild(){return}
function BeforeFirstOpen(){return}
function AfterCloseAll(){return}
// Menu tree
// MenuX=new Array(Text to show, Link, background image (optional), number of sub elements, height, width);
// For rollover images set "Text to show" to: "rollover:Image1.jpg:Image2.jpg"
Menu1=new Array(" <font class=\"javascriptnav\">Why 5 A Day</font>","/html/colorway/colorway_home.php","",8,17,150);
Menu1_1=new Array(" <font class=\"javascriptnav\">Legislation</font>","/html/aboutpbh/mission.php","",0,17,150);
Menu1_2=new Array(" <font class=\"javascriptnav\">Priorities</font>","/html/aboutpbh/investing.php","",0,17);
Menu1_3=new Array(" <font class=\"javascriptnav\">Policy 101</font>","/html/aboutpbh/members.php","",0,17);
Menu1_4=new Array(" <font class=\"javascriptnav\">Programs in Action</font>","/html/industry/guidelines.php","",0,17);
Menu1_5=new Array(" <font class=\"javascriptnav\">Partnership</font>","JavaScript:OpenWindow('../content/aboutpbh/midyear1504.html');","",0,17);
Menu1_6=new Array(" <font class=\"javascriptnav\">Blah</font>","JavaScript:OpenWindow('../content/aboutpbh/annualreport01.html');","",0,17);
Menu1_7=new Array(" <font class=\"javascriptnav\">Contact Us</font>","/html/common/contactus_home.php","",0,17);
Menu1_8=new Array(" <font class=\"javascriptnav\">5 A Day Newsletter</font>","/html/common/newsletter_home.php","",0,17);