// *********************************************************************
// * initmenu.js
// *
// * This javascript code is a (slightly) modified version of the code
// * provided freely by James Austin (jamesdoz at hotmail.com) at
// * http://www.tutorialized.com/tutorial/Drop-Down-Menu-Tutorial/1361
// *
// * He has also provided an excellent tutorial there, describing
// * every part of the code in detail.  
// *
// * Thank you, James!
// *
// * - Ben Vander Valk
// *********************************************************************

sniffBrowsers();

docroot = "http://debracharlesworth.ca/"

// Menu labels are given 0 width, so that the containing TDs size to the actual text.
navmenu = new menuBar('navmenu', 686, 'horizontal', null, null);
navmenu.addLabel(null, 'Mission', 1, 0, '#AF97CA', '#684ABF', docroot + 'index.php', 'center');

// Setting targetType to 'none' makes the menu header a non-clickable link.  
navmenu.targetType = 'none';
navmenu.addLabel(null, 'ADHD', 2, 0, '#AF97CA', '#684ABF', docroot + 'index.php', 'center');
navmenu.targetType = 'self';

navmenu.addLabel(null, 'Biography', 3, 0, '#AF97CA', '#684ABF', docroot + 'biography.php', 'center');

// Setting targetType to 'none' makes the menu header a non-clickable link.  
navmenu.targetType = 'none';
navmenu.addLabel(null, 'Testimonials', 4, 0, '#AF97CA', '#684ABF', '', 'center');
navmenu.targetType = 'self';

navmenu.addLabel(null, 'Letter To Parents', 5, 0, '#AF97CA', '#684ABF', docroot + 'letterparents.php', 'center');
navmenu.addLabel(null, 'Events', 6, 0, '#AF97CA', '#684ABF', docroot + 'events.php', 'center');
navmenu.addLabel(null, 'Contact Us', 7, 0, '#AF97CA', '#684ABF', docroot + 'contact.php', 'center');


menus[1] = new menu(135, 'vertical', null, null);
menus[1].writeMenu();

menus[2] = new menu(200, 'vertical', null, null);
menus[2].addItem(null, 'Children', null, 200, '#AF97CA', '#684ABF', docroot + 'childrenadhd.php', 'left');
menus[2].addItem(null, 'Adult and Adolescent', null, 200, '#AF97CA', '#684ABF',  docroot + 'adultadhd.php', 'left');
menus[2].writeMenu();

menus[3] = new menu(135, 'vertical', null, null);
menus[3].writeMenu();

menus[4] = new menu(250, 'vertical', null, null);
menus[4].addItem(null, 'Autism Testimonials', null, 250, '#AF97CA', '#684ABF', docroot + 'autism_testimonials.php', 'left');
menus[4].addItem(null, 'Mother of ADHD Son', null, 250, '#AF97CA', '#684ABF', docroot + 'motheradhd_testimonials.php', 'left');
menus[4].addItem(null, 'Mother of Asperger Daughter', null, 250, '#AF97CA', '#684ABF', docroot + 'motherasperger_testimonials.php', 'left');
menus[4].writeMenu();

menus[4] = new menu(135, 'vertical', null, null);
menus[4].writeMenu();

menus[5] = new menu(135, 'vertical', null, null);
menus[5].writeMenu();

menus[6] = new menu(135, 'vertical', null, null);
menus[6].writeMenu();

menus[1].align='left';
menus[2].align='left';
menus[3].align='left';
menus[4].align='left';
menus[5].align='left';
menus[6].align='left';

