// Cascading Popup Menus v5.2 - Single Frame Menu example script. var menuWidth = 250; var hBar = new ItemStyle(40, 0, '', 0, 0, '#316AC4', '#316AC4', 'highText', 'highText', '', '', null, null, 'hand', 'hand'); var subM = new ItemStyle(22, 0, '', -12, 4, '#EBEBE0', '#316AC4', 'lowText', 'highText', 'itemBorder', 'itemBorder', null, null, 'hand', 'hand'); // Create a PopupMenu() object, and pass its own name so it can reference itself later on. // We also use a 'with' block to work with its properties and functions below. var pMenu = new PopupMenu('pMenu'); with (pMenu) { startMenu('root', false, -100, -100, 27, hBar, '', false); addItem('', 'Navigation / About Us / US', 'sm:',null,83); addItem('', 'ourteam', 'sm:',null,70); addItem('', 'Navigation / Our Portfolio / US', 'sm:',null,94); addItem('', 'Navigation / Working with Us / US', 'sm:',null,110); addItem('', 'Navigation / News and Events / US', 'sm:',null,99); addItem('', 'Navigation / Contact Us / US', 'sm:',null,80); addItem('', 'Navigation / Careers / US', 'sm:',null,200); //startMenu('Navigation / About Us / US', true, 0, 27, 160, subM, '', false); startMenu('Navigation / About Us / US', true, 'page.elmPos("aboutus").x', 'page.elmPos("aboutus").y + 27', 160, subM, '', false); //startMenu('Navigation / Our Portfolio / US', true, 0, 27, 160, subM, '', false); startMenu('Navigation / Our Portfolio / US', true, 'page.elmPos("ourportfolio").x', 'page.elmPos("ourportfolio").y + 27', 200, subM, '', false); //startMenu('Navigation / Working with Us / US', true, 0, 27, 160, subM, '', false); startMenu('Navigation / Working with Us / US', true, 'page.elmPos("workingwithus").x', 'page.elmPos("workingwithus").y + 27', 160, subM, '', false); addItem('Working With Us', '/workingwithus/default.cfm', ''); addItem('Case Studies', '/ourportfolio/case_studies.cfm', ''); //startMenu('Navigation / News and Events / US', true, 0, 27, 160, subM, '', false); startMenu('Navigation / News and Events / US', true, 'page.elmPos("newsevents").x', 'page.elmPos("newsevents").y + 27', 160, subM, '', false); //startMenu('Navigation / Careers / US', true, 0, 27, 160, subM, '', false); startMenu('Navigation / Careers / US', true, 'page.elmPos("careers").x', 'page.elmPos("careers").y + 27', 160, subM, '', false); addItem('Tech - North America', '/careers/technamerica.cfm', ''); addItem('Tech - Europe and Asia', '/careers/techeurope.cfm', ''); addItem('Life Sciences', '/careers/lifesciences.cfm', ''); //startMenu('Navigation / Contact Us / US', true, 0, 27, 160, subM, '', false); startMenu('Navigation / Contact Us / US', true, 'page.elmPos("contact").x', 'page.elmPos("contact").y + 27', 160, subM, '', false); addItem('Contact Us', '/contactus/default.cfm', ''); addItem('For the Press', '/contactus/forthepress.cfm', ''); } // BORDER: Added to all menus in a named object using a specified ItemStyle. The syntax is: // addMenuBorder(menuObject, ItemStyle, // opacity of border, 'border colour', border width, 'padding colour', padding width); // Opacity is a number from 0 to 100, or null for solid colour (just like the ItemStyles). addMenuBorder(pMenu, window.subBlank, null, '#666666', 1, '#CCCCDD', 2); // ******************** FUNCTIONS CALLED BY THE EFFECTS SECTION ******************** // These can be deleted if you're not using them. Alternatively, if you're using several menu // data files, you may want to move them to the "core" script file instead. // This is the "positioning from page anchors" code used by the advanced positioning expressions. page.elmPos=function(e,p) { var x=0,y=0,w=p?p:this.win; e=e?(e.substr?(isNS4?w.document.anchors[e]:getRef(e,w)):e):p; if(isNS4){if(e&&(e!=p)){x=e.x;y=e.y};if(p){x+=p.pageX;y+=p.pageY}} if (e && this.MS && navigator.platform.indexOf('Mac')>-1 && e.tagName=='A') { e.onfocus = new Function('with(event){self.tmpX=clientX-offsetX;' + 'self.tmpY=clientY-offsetY}'); e.focus();x=tmpX;y=tmpY;e.blur() } else while(e){x+=e.offsetLeft;y+=e.offsetTop;e=e.offsetParent} return{x:x,y:y}; }; // Borders and Dropshadows: // // Here's the menu border and dropshadow functions we call above. Edit ot delete if you're // not using them. Basically, they assign a string to pMenu.menu.menuName[0].extraHTML, which // is written to the document with the menus as they are created -- the string can contain // anything you want, really. They also adjust the menu dimensions and item positions // to suit. Dig out the Object Browser script and open up "pMenu" for more info. function addMenuBorder(mObj, iS, alpha, bordCol, bordW, backCol, backW) { // Loop through the menu array of that object, finding matching ItemStyles. for (var mN in mObj.menu) { var mR=mObj.menu[mN], dS='
'; else mR[0].extraHTML += dS+bordCol+'; left:0px; top:0px; width:'+mW+'px; height:'+mH+ 'px; z-index:980; '+ (alpha!=null?'filter:alpha(opacity='+alpha+'); -moz-opacity:'+alpha+'%; opacity:'+(alpha/100):'')+ '">'+dS+backCol+'; left:'+bordW+'px; top:'+bordW+'px; width:'+(mW-2*bordW)+'px; height:'+ (mH-2*bordW)+'px; z-index:990">
'; } }; // this function makes the drop downs go over select boxes function IE55SelectBoxFix(menuObj) { with (menuObj) { if (window.createPopup) for (var mN in menu) with (menu[mN][0]) { extraHTML += ''; } }}; // this is the function call for the above script IE55SelectBoxFix(pMenu);