// 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', '');
//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='