var myNavBar1 = new NavBar(0);
var dhtmlMenu;

//define menu items (first parameter of NavBarMenu specifies main category width, second specifies sub category width in pixels)
//add more menus simply by adding more "blocks" of same code below

dhtmlMenu = new NavBarMenu(45, 0);
dhtmlMenu.addItem(new NavBarMenuItem("Home", "/"));
myNavBar1.addMenu(dhtmlMenu);

dhtmlMenu = new NavBarMenu(95, 230);
dhtmlMenu.addItem(new NavBarMenuItem("Administration", "/administration/index.cfm"));
dhtmlMenu.addItem(new NavBarMenuItem("Board of Directors", "/administration/boardofdirectors.cfm"));
dhtmlMenu.addItem(new NavBarMenuItem("Daubert Tracker Advisory Panel", "/administration/DAU_AdvisoryPanel.cfm"));
dhtmlMenu.addItem(new NavBarMenuItem("Physician Advisory Panel", "/administration/P_AdvisoryPanel.cfm"));
dhtmlMenu.addItem(new NavBarMenuItem("Vocational Expert Advisory Panel", "/administration/VE_AdvisoryPanel.cfm"));
dhtmlMenu.addItem(new NavBarMenuItem("Life Care Planning Advisory Panel", "/administration/LCP_AdvisoryPanel.cfm"));
dhtmlMenu.addItem(new NavBarMenuItem("Legal Nurse Consultant Advisory Panel", "/administration/LNC_AdvisoryPanel.cfm"));
myNavBar1.addMenu(dhtmlMenu);

dhtmlMenu = new NavBarMenu(59, 200);
dhtmlMenu.addItem(new NavBarMenuItem("Services", "/services/index.cfm"));
dhtmlMenu.addItem(new NavBarMenuItem("Daubert Tracker", "/services/dt/dau_index.cfm"));
dhtmlMenu.addItem(new NavBarMenuItem("Medical Record Review", "/services/mrr/index.cfm"));
dhtmlMenu.addItem(new NavBarMenuItem("Litigation Support Services", "/services/lss/index.cfm"));
dhtmlMenu.addItem(new NavBarMenuItem("Economic Damage Assessments", "/services/eda/index.cfm"));
dhtmlMenu.addItem(new NavBarMenuItem("Social Security Consultation", "/services/ssc/index.cfm"));
dhtmlMenu.addItem(new NavBarMenuItem("Web Lecture Series", "http://lectures.mdexonline.com/scripts/4disapi.dll/4DACTION/WEB_FormDisplay/WLS_Index.html"));
myNavBar1.addMenu(dhtmlMenu);

dhtmlMenu = new NavBarMenu(95, 150);
dhtmlMenu.addItem(new NavBarMenuItem("Practice Areas", "/practiceareas/index.cfm"));
dhtmlMenu.addItem(new NavBarMenuItem("Personal Injury", "/practiceareas/pi/index.cfm"));
dhtmlMenu.addItem(new NavBarMenuItem("Medical Malpractice", "/practiceareas/mm/index.cfm"));
dhtmlMenu.addItem(new NavBarMenuItem("Workers' Compensation", "/practiceareas/wc/index.cfm"));
dhtmlMenu.addItem(new NavBarMenuItem("Labor and Employment", "/practiceareas/lae/index.cfm"));
dhtmlMenu.addItem(new NavBarMenuItem("Matrimonial Law", "/practiceareas/ml/index.cfm"));
dhtmlMenu.addItem(new NavBarMenuItem("Social Security Disability", "/practiceareas/ssd/index.cfm"));
myNavBar1.addMenu(dhtmlMenu);

dhtmlMenu = new NavBarMenu(152,152);
dhtmlMenu.addItem(new NavBarMenuItem("Consulting Opportunities", "/consulting/index.cfm"));
dhtmlMenu.addItem(new NavBarMenuItem("Physicians", "http://lectures.mdexonline.com/scripts/4disapi.dll/4DACTION/WEB_FormDisplay/Physician_Form.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Vocational Experts", "http://lectures.mdexonline.com/scripts/4disapi.dll/4DACTION/WEB_FormDisplay/VocationalExpert_Form.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Life Care Planners", "http://lectures.mdexonline.com/scripts/4disapi.dll/4DACTION/WEB_FormDisplay/LifeCarePlanner_Form.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Economists", "http://lectures.mdexonline.com/scripts/4disapi.dll/4DACTION/WEB_FormDisplay/Economist_Form.html"));
dhtmlMenu.addItem(new NavBarMenuItem("Legal Nurse Consultants", "http://lectures.mdexonline.com/scripts/4disapi.dll/4DACTION/WEB_FormDisplay/LegalNurse_Form.html"));
myNavBar1.addMenu(dhtmlMenu);

dhtmlMenu = new NavBarMenu(55, 0);
dhtmlMenu.addItem(new NavBarMenuItem("Contact", "/contact/contact.cfm"));
myNavBar1.addMenu(dhtmlMenu);

dhtmlMenu = new NavBarMenu(60, 0);
dhtmlMenu.addItem(new NavBarMenuItem("Site Map", "/sitemap.cfm"));
myNavBar1.addMenu(dhtmlMenu);

myNavBar1.moveTo(0,81);
myNavBar1.setAlign("right");
myNavBar1.setSizes(0,4,1);
if (document.layers) {
myNavBar1.setFonts("Verdana","normal","bold","8pt","Verdana","normal","bold","8pt");
}
if (document.all) {
myNavBar1.setFonts("Verdana","normal","bold","+10","Verdana","normal","normal","+10");
}

//set menu colors
//h_dividers, menu_title_up, menu_bkg_up, menu_title_dn, menu_bkg_dn,items_up,item_bkg_up, items_dn, item_bkg_dn
//myNavBar1.setColors("#ffcc00","#ffffff","#000063","#000063","#ffcc00","#000063","#ffcc00","#ffcc00","#000063")
myNavBar1.setColors("#ffcc00","#ffffff","#000063","#000063","#ffcc00","#000063","#ffcc00","#ffcc00","#000063")

var fullWidth;

function init() {

  // Get width of window, need to account for scrollbar width in Netscape.
  fullWidth = getWindowWidth() 
    - (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0)-135;

  //myNavBar1.resize(fullWidth);
  var align=fullWidth;
  for(i=0;i<myNavBar1.menus.length;i++)
	align-=myNavBar1.menus[i].hdrWidth;
  if ( align < 0 )
	  align=0;
	  
  myNavBar1.create();
  myNavBar1.resize( 622 );
  myNavBar1.setzIndex(1);
}

function OnLoad()
{
  if ( navigator.userAgent.indexOf( "Gecko" ) != -1 )
    SetBarLocation();
  else
  {
    init();
    OnResize();
  }
}

function OnResize()
{
  if ( navigator.userAgent.indexOf( "Gecko" ) != -1 )
    SetBarLocation();
  else
  {
    // Get width of window, need to account for scrollbar width in Netscape.
    fullWidth = getWindowWidth() 
      - (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0) - 135;

	  // TODO: calculate menu bar width.
	  //var cxMenuBar = 570;
	  /*
	  for ( i = 0; i < myNavBar1.menus.length; i++ )
	    cxMenuBar += myNavBar1.menus[i].hdrWidth;
    */
  	var xLeft = ( getWindowWidth() - (isMinNS4 && getWindowHeight() < getPageHeight() ? 16 : 0) - 722 ) / 2 + 100;
//  	xLeft = 258;
  	yTop = 81;
  
    myNavBar1.moveTo( xLeft, yTop );
  }
}

function initNN6()
{
	if ( navigator.userAgent.indexOf( "Gecko" ) != -1 )
	{
		str="";
		str+="<DIV ID='idMenuBar'><TABLE BORDER='0' CELLPADDING='0' CELLSPACING='0' WIDTH='622' ALIGN='right'><TR><TD NOWRAP>\n" ;
		str+="<DIV CLASS='clsMenuItem' ID='idMenuItem0'><TABLE BORDER='0' CELLPADDING='0' CELLSPACING='0' WIDTH='61'><TR><TD VALIGN='middle'><A CLASS='clsMenuItem' ID='idMenuLink0' HREF=''></A>&nbsp;</TD></TR></TABLE></DIV>\n" ;
		for(i=0;i<myNavBar1.menus.length;i++)
		{
			id = i+1;
			str+="<DIV CLASS='clsMenuItem' ID='idMenuItem"+id+"' ONMOUSEOVER='OnItemOver("+id+")' ONMOUSEOUT='OnItemOut("+id+")'><TABLE BORDER='0' CELLPADDING='0' CELLSPACING='0' WIDTH='"+myNavBar1.menus[i].hdrWidth+"' HEIGHT='100%'><TR><TD VALIGN='middle'><A CLASS='clsMenuItem' ID='idMenuLink"+id+"' HREF='"+myNavBar1.menus[i].items[0].link+"'>"+myNavBar1.menus[i].items[0].text+"</A></TD></TR></TABLE></DIV>\n" ;
			if (myNavBar1.menus[i].items.length>1)
			{			
				str+="<DIV CLASS='clsSubMenu' ID='idSubMenu"+id+"' ONMOUSEOVER='OnSubMenuOver("+id+")' ONMOUSEOUT='OnOut("+id+")'>\n" ;
				str+="<TABLE BORDER='0' CELLPADDING='1' CELLSPACING='0' WIDTH='"+myNavBar1.menus[i].width+"' HEIGHT='100%'>\n" ;
				for (j=1; j<myNavBar1.menus[i].items.length; j++)
					str+="<TR ONMOUSEOVER='OnRowOver(this)' ONMOUSEOUT='OnRowOut(this)'><TD VALIGN='middle'>&nbsp;<A CLASS='clsSubMenuItem' HREF='"+myNavBar1.menus[i].items[j].link+"'>"+myNavBar1.menus[i].items[j].text+"</A></TD></TR>\n" ;				
				str+="</TABLE>\n" ;
				str+="</DIV>\n" ;
			}
		}
		str+="</TD></TR></TABLE></DIV>\n" ;
		document.writeln(str);
	}
}