var listMenu = new webMenu('listMenu', true, 'display', 'block', 'none');

// ****************Optional Settings*********************************

// showDelay is the time (in milliseconds) to display a new child menu.
//listMenu.showDelay = 0;

//  switchDelay is the time to switch from one child menu to another child menu.
//  Set this higher and point at 2 neighbouring items to see what it does.
//listMenu.switchDelay = 125;

// hideDelay is the time it takes for a menu to hide after mouseout.
// Set this to a negative number to disable hiding entirely.
//listMenu.hideDelay = 500;

//  cssLitClass is the CSS classname applied to parent items of active menus.
//listMenu.cssLitClass = 'highlighted';

//  showOnClick will, suprisingly, set the menus to show on click. Pick one of 3 values:
//  0 = all mouseover, 1 = first level click, sublevels mouseover, 2 = all click.
//listMenu.showOnClick = 0;

//  hideOnClick hides all visible menus when one is clicked (defaults to true).
listMenu.hideOnClick = false;

//  animInSpeed and animOutSpeed set the animation speed. Set to a number
//  between 0 and 1 where higher = faster. Setting both to 1 disables animation.
//listMenu.animInSpeed = 0.3;
//listMenu.animOutSpeed = 0.3;

//******************************************************************

// ****************Animation Settings*********************************

// These apply the animation to the webMenu object
listMenu.animations[listMenu.animations.length] = webMenu.animFade;
listMenu.animations[listMenu.animations.length] = webMenu.animSwipeDown;

// You have to activate the menu by calling its 'activateMenu()' method.
// You pass the activateMenu() function two parameters:
//  (1) The ID of the outermost <ul> list tag containing your menu data.
//  (2) A node containing your submenu popout arrow indicator.

// This is where you define you arrow which will appear next to the items that have submenus.
// I set this up so you can use an image or a character.
var arrow = null;
if (document.createElement && document.documentElement)
{
	arrow = document.createElement('span');
	arrow.appendChild(document.createTextNode(''));
	// Feel free to replace the above two lines with these for a small arrow image...
	//arrow = document.createElement('img');
	//arrow.src = 'arrow.gif';
	//arrow.style.borderWidth = '0';
	//arrow.className = 'subind';
}

addEvent(window, 'load', new Function('listMenu.activateMenu("listMenuRoot", arrow)'));
