/*
 Begin a checklist of abilities the browser is capible of performing in
   JavaScript.
*/
sniffBrowsers();

/*
 Create the main labels. Asign a menu to About Us and to Galleries.
*/
hMenu = new menuBar('navigation-menu', 'horizontal');
hMenu.addLabel('About Us', 1, '/about_us', 'left');
hMenu.addLabel('Galleries', 2, '/galleries', 'left');
hMenu.height = 16;

/*
 Create a menu. This menu applies to the About Us label.
*/
menus[1] = new menu('vertical');
menus[1].height = 16;
menus[1].addItem('Overview', null, '/about_us/overview', 'left');
menus[1].addItem('License', null, '/about_us/license', 'left');
menus[1].writeMenu();

/*
 Create a second menu. Asign a menu to Residential and to Commercial. This menu
   applies to the Galleries label.
*/
menus[2] = new menu('vertical');
menus[2].height = 16;
menus[2].addItem('Residential', null, '/galleries/residential', 'left');
menus[2].addItem('Commercial', null, '/galleries/commercial', 'left');
menus[2].writeMenu();

/*
 Create a third menu. This menu applies to the Residential label under the
   Galleries menu.
*/
menus[3] = new menu('vertical');
menus[3].height = 16;
menus[3].addItem('Patios', null, '/galleries/residential/patios', 'left');
menus[3].addItem('Sidewalks', null, '/galleries/residential/sidewalks', 'left');
menus[3].addItem('Rooms', null, '/galleries/residential/rooms', 'left');
menus[3].addItem('Driveways', null, '/galleries/residential/driveways', 'left');
menus[3].addItem('Architectural', null, '/galleries/residential/architectural',
    'left');
menus[3].addItem('Other', null, '/galleries/residential/other', 'left');
menus[3].writeMenu();

/*
 Create a fourth menu. This menu applies to the Commercial label under the
   Galleries label.
*/
menus[4] = new menu('vertical');
menus[4].height = 16;
menus[4].addItem('Floors', null, '/galleries/commercial/floors', 'left');
menus[4].addItem('Loading Docks', null,'/galleries/commercial/docks', 'left');
menus[4].addItem('Sidewalks', null, '/galleries/commercial/sidewalks', 'left');
menus[4].addItem('<abbr title="Tenant Improvement">TI</abbr>', null,
    '/galleries/commercial/ti', 'left');
menus[4].addItem('Other', null, '/galleries/commercial/other', 'left');
menus[4].writeMenu();

/*
 Assign the final alignment to each menu.
*/
menus[1].align='left';
menus[2].align='left';
menus[3].align='right';
menus[4].align='right';
