var hBar = new ItemStyle(65, 5, '', 0, 0, '/images/menubarback.gif', '/images/menubarover.gif', 'highText', 'highText', '', '', null, null, 'hand', 'hand'); 
var button = new ItemStyle(22, 1, '<div class="arrow"><img src="/images/nav_arrow.gif"></div>', -15, 2, '10#00696F', '10#00E0D5', 'buttonText', 'buttonHover','buttonBorder', 'buttonBorderOver', 80, 95, 'hand', 'hand');
var button2 = new ItemStyle(72, 1, '<div class="arrow"><img src="/images/nav_arrow.gif"></div>', -15, 2, '10#00696F', '10#00E0D5', 'buttonText', 'buttonHover','buttonBorder', 'buttonBorderOver', 80, 95, 'hand', 'hand');
var pdfwindowoptions = "toolbar=no,location=no,status=no,menubar=no,scrollbars=yes,resizable=yes";

var pMenuBar = new PopupMenu('pMenuBar');
with (pMenuBar)
{
startMenu('root', false, 10, 'page.elmPos("menubar").y', 36, hBar);

with(addItem('&nbsp; ABOUT US', 'mAbout', 'sm:', null, 65, 5)) onclick='window.location.href="/about_us/"';
addItem('&nbsp; CONTACT US', '/contact_us/', '', null, 78, 5);
with(addItem('&nbsp; SURGICAL PRODUCTS', 'mProducts', 'sm:', null, 124, 5)) onclick='window.location.href="/surgical_products/"';
with(addItem('&nbsp; TECHNOLOGY', 'mTechnology', 'sm:', null, 84, 5)) onclick='window.location.href="/technology/"';
with(addItem('&nbsp; SERVICE', 'mService', 'sm:', null, 58, 5)) onclick='window.location.href="/service/"';
with(addItem('&nbsp; LITERATURE', 'mLiterature', 'sm:', null, 76, 5)) onclick='window.location.href="/literature/"';

//ABOUT US
startMenu('mAbout', true, 0, 36, 160, button);
addItem('Company Overview', '/about_us/', '');
addItem('Company Vision Statement', '/about_us/company_vision_statement.php', '');


//SURGICAL PRODUCTS
startMenu('mProducts', true, 0, 36, 240, button2);
with(addItem('<img src="/images/dlh64.gif" width="64" height="64" align="absmiddle">&nbsp;Surgical Lights', 'mLights', 'sm:')) onclick='window.location.href="/surgical_products/surgical_lights/nuvo_surgical_lights/single_light_head.php"';
addItem('<img src="/images/sm64.gif" width="64" height="64" align="absmiddle">&nbsp;Surgical Monitors', '/surgical_products/surgical_monitors/surgical_monitor.php', '');
addItem('<img src="/images/ems64.gif" width="64" height="64" align="absmiddle">&nbsp;Equipment Management System', '/surgical_products/equipment_management_system/equipment_management_system.php', '');
with(addItem('<img src="/images/v1000t.gif" width="64" height="64" align="absmiddle">&nbsp;Surgical Tables and Accessories', 'mTables', 'sm:')) onclick='window.location.href="/surgical_products/surgical_tables_and_accessories/volante_surgical_tables/volante_v1000t.php"';




//SURGICAL LIGHTS
startMenu('mLights', true, 230, 4, 200, button);
with(addItem('Nuvo Lights', 'mNuvoLights', 'sm:')) onclick='window.location.href="/surgical_products/surgical_lights/nuvo_surgical_lights/single_light_head.php"';
with(addItem('VistOR Minor Surgery Lights', 'mVistOR1', 'sm:')) onclick='window.location.href="/surgical_products/surgical_lights/vistor_minor_surgery_lights/vistor_single_light_head.php"';
with(addItem('VistOR Exam and Procedure Lights', 'mVistOR2', 'sm:')) onclick='window.location.href="/surgical_products/surgical_lights/vistor_exam_and_procedure_lights/vistor_pro_procedural_light.php"';


startMenu('mNuvoLights', true, 190, 4, 200, button);
addItem('Single Light Head', '/surgical_products/surgical_lights/nuvo_surgical_lights/single_light_head.php', '');
addItem('Double Light Head', '/surgical_products/surgical_lights/nuvo_surgical_lights/double_light_head.php', '');
addItem('Triple Light Head', '/surgical_products/surgical_lights/nuvo_surgical_lights/triple_light_head.php', '');
addItem('Single Light Head Monitor Ready', '/surgical_products/surgical_lights/nuvo_surgical_lights/single_light_head_monitor_ready.php', '');
addItem('Double Light Head Monitor Ready', '/surgical_products/surgical_lights/nuvo_surgical_lights/double_light_head_monitor_ready.php', '');

startMenu('mVistOR1', true, 190, 4, 200, button);
addItem('Single Light Head', '/surgical_products/surgical_lights/vistor_minor_surgery_lights/vistor_single_light_head.php', '');
addItem('Dual Light Head', '/surgical_products/surgical_lights/vistor_minor_surgery_lights/vistor_dual_light_head.php', '');
addItem('Dual Light Head with Camera', '/surgical_products/surgical_lights/vistor_minor_surgery_lights/vistor_dual_light_head_plus_camera.php', '');

startMenu('mVistOR2', true, 190, 4, 200, button);
with(addItem('Procedural Lights', 'mProcedural', 'sm:')) onclick='window.location.href="/surgical_products/surgical_lights/vistor_exam_and_procedure_lights/vistor_pro_procedural_light.php"';
with(addItem('Procedural Spot Lights', 'mSpot', 'sm:')) onclick='window.location.href="/surgical_products/surgical_lights/vistor_exam_and_procedure_lights/vistor_sp_spot_light.php"';
with(addItem('Examination and Diagnostic Lights', 'mExam', 'sm:')) onclick='window.location.href="/surgical_products/surgical_lights/vistor_exam_and_procedure_lights/vistor_exl_examination_light.php"';
//addItem('Mounting Options', '/surgical_products/surgical_lights/vistor_exam_and_procedure_lights/mounting_options.php', '');

startMenu('mProcedural', true, 190, 4, 200, button);
addItem('VistOR PRO Procedural Light', '/surgical_products/surgical_lights/vistor_exam_and_procedure_lights/vistor_pro_procedural_light.php', '');
addItem('VistOR PR Procedural Light', '/surgical_products/surgical_lights/vistor_exam_and_procedure_lights/vistor_pr_procedural_light.php', '');
addItem('VistOR PRO Emergency Light', '/surgical_products/surgical_lights/vistor_exam_and_procedure_lights/vistor_pro_emergency_light.php', '');

startMenu('mSpot', true, 190, 4, 200, button);
addItem('VistOR SP Spot Light', '/surgical_products/surgical_lights/vistor_exam_and_procedure_lights/vistor_sp_spot_light.php', '');
addItem('VistOR SPF Spot Light', '/surgical_products/surgical_lights/vistor_exam_and_procedure_lights/vistor_spf_spot_light.php', '');

startMenu('mExam', true, 190, 4, 200, button);
addItem('VistOR EXL Examination Light', '/surgical_products/surgical_lights/vistor_exam_and_procedure_lights/vistor_exl_examination_light.php', '');
addItem('VistOR EX Examination Light', '/surgical_products/surgical_lights/vistor_exam_and_procedure_lights/vistor_ex_examination_light.php', '');
addItem('VistOR OB Emergency Light', '/surgical_products/surgical_lights/vistor_exam_and_procedure_lights/vistor_ob_emergency_light.php', '');

//Surgical Tables and Accessories

startMenu('mTables', true, 230, 4, 200, button);
with(addItem('Volante Surgical Tables', 'mVolante', 'sm:')) onclick='window.location.href="/surgical_products/surgical_tables_and_accessories/volante_surgical_tables/volante_v1000t.php"';
with(addItem('Surgical Table Accessories', 'mAccessories', 'sm:')) onclick='window.location.href="/surgical_products/surgical_tables_and_accessories/surgical_table_accessories/orthopedics.php"';

startMenu('mVolante', true, 190, 4, 200, button);
addItem('Volante V1000T', '/surgical_products/surgical_tables_and_accessories/volante_surgical_tables/volante_v1000t.php', '');
addItem('Volante V1000', '/surgical_products/surgical_tables_and_accessories/volante_surgical_tables/volante_v1000.php', '');
addItem('Volante V750', '/surgical_products/surgical_tables_and_accessories/volante_surgical_tables/volante_v750.php', '');

startMenu('mAccessories', true, 190, 4, 200, button);
addItem('Orthopedics', '/surgical_products/surgical_tables_and_accessories/surgical_table_accessories/orthopedics.php', '');
addItem('General Surgery - OB/GYN - Urology', '/surgical_products/surgical_tables_and_accessories/surgical_table_accessories/general-obgyn-urology.php', '');
addItem('General Surgical Accessories', '/surgical_products/surgical_tables_and_accessories/surgical_table_accessories/general-surgical-accessories.php', '');




//TECHNOLOGY
startMenu('mTechnology', true, 0, 36, 180, button);
addItem('Surgical Lighting Technology', '/technology/', '');
addItem('Nuvo Patents', '/technology/nuvo_patents.php', '');

//SERVICE
startMenu('mService', true, 0, 36, 240, button);
addItem('Field Service', '/service/', '');
addItem('FAQ', '/service/faq.php', '');
addItem('Technical Support', '/service/technical_support.php', '');
addItem('Parts Ordering', '/service/parts_ordering.php', '');
addItem('Ext. Product Warranty / Maintenance Contracts', '/service/product_warranty.php', '');
addItem('Equipment Installations', '/service/equipment_installations.php', '');

//LITERATURE
startMenu('mLiterature', true, 0, 36, 130, button);
addItem('Ads', '/literature/?tab=Ads', '');
addItem('Brochures', '/literature/?tab=Brochures', '');
addItem('Specification Sheets', '/literature/?tab=SpecSheets', '');
addItem('Manuals', '/literature/?tab=Manuals', '');


showDelay = 0;
hideDelay = 10;
}

addDropShadow(pMenuBar, window.button, [50,"#000000",6,6,0,0]);
addDropShadow(pMenuBar, window.button2, [50,"#000000",6,6,0,0]);

if ((navigator.userAgent.indexOf('rv:0.')==-1) &&
    !(isOp&&!document.documentElement) && !(isIE4&&!window.external))
{
 pMenuBar.showMenu = new Function('mN','menuAnim(this, mN, 10)');
 pMenuBar.hideMenu = new Function('mN','menuAnim(this, mN, -15)');
}


// 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}}
 else while(e){x+=e.offsetLeft;y+=e.offsetTop;e=e.offsetParent}
 return{x:x,y:y};
}

function menuAnim(menuObj, menuName, dir)
{
 var mD = menuObj.menu[menuName][0];
 if (!mD.timer) mD.timer = 0;
 if (!mD.counter) mD.counter = 0;

 with (mD)
 {
  clearTimeout(timer);

  if (!lyr || !lyr.ref) return;

  if (!visNow && dir>0) dir = 0-dir;

  if (dir>0) lyr.vis('visible');

  lyr.sty.zIndex = 1001 + dir;
  lyr.clip(0, 0, menuW+2, (menuH+2)*Math.pow(Math.sin(Math.PI*counter/200),0.75) );

  counter += dir;
  if (counter>100) counter = 100;
  else if (counter<0) { counter = 0; lyr.vis('hidden') }
  else timer = setTimeout(menuObj.myName+'.'+(dir>0?'show':'hide')+'Menu("'+menuName+'")', 40);
 }
}

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='<div style="position:absolute; background:';
  if (mR[0].itemSty != iS) continue;
  // Loop through the items in that menu, move them down and to the right a bit.
  for (var mI=1; mI<mR.length; mI++)
  {
   mR[mI].iX += bordW+backW;
   mR[mI].iY += bordW+backW;
  }
  // Extend the total dimensions of menu accordingly.
  mW = mR[0].menuW += 2*(bordW+backW);
  mH = mR[0].menuH += 2*(bordW+backW);

  // Set the menu's extra content string with divs/layers underneath the items.
  if (isNS4) mR[0].extraHTML += '<layer bgcolor="'+bordCol+'" left="0" top="0" width="'+mW+
   '" height="'+mH+'" z-index="980"><layer bgcolor="'+backCol+'" left="'+bordW+'" top="'+
   bordW+'" width="'+(mW-2*bordW)+'" height="'+(mH-2*bordW)+'" z-index="990"></layer></layer>';
  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/100):'')+
   '">'+dS+backCol+'; left:'+bordW+'px; top:'+bordW+'px; width:'+(mW-2*bordW)+'px; height:'+
   (mH-2*bordW)+'px; z-index:990"></div></div>';
 }
}

function addDropShadow(mObj, iS)
{
 // Pretty similar to the one above, just loops through list of extra parameters making
 // dropshadow layers (from arrays) and extending the menu dimensions to suit.
 for (var mN in mObj.menu)
 {
  var a=arguments, mD=mObj.menu[mN][0], addW=addH=0;
  if (mD.itemSty != iS) continue;
  for (var shad=2; shad<a.length; shad++)
  {
   var s = a[shad];
   if (isNS4) mD.extraHTML += '<layer bgcolor="'+s[1]+'" left="'+s[2]+'" top="'+s[3]+'" width="'+
    (mD.menuW+s[4])+'" height="'+(mD.menuH+s[5])+'" z-index="'+(arguments.length-shad)+'"></layer>';
   else mD.extraHTML += '<div style="position:absolute; background:'+s[1]+'; left:'+s[2]+
    'px; top:'+s[3]+'px; width:'+(mD.menuW+s[4])+'px; height:'+(mD.menuH+s[5])+'px; z-index:'+
    (a.length-shad)+'; '+(s[0]!=null?'filter:alpha(opacity='+s[0]+'); -moz-opacity:'+(s[0]/100):'')+
    '"></div>';
   addW=Math.max(addW, s[2]+s[4]);
   addH=Math.max(addH, s[3]+s[5]);
  }
  mD.menuW+=addW; mD.menuH+=addH;
 }
}
