/* Menu geometry and timing: 
  values are the lists with parameters for different menu levels
  for this menu: [main_level, first_pulldown, second_pulldown]
*/

var MENU_POS1 = {
// Item sizes for different levels of menu
  'height': [24, 20, 20],
  'width': [80, 100, 90],

// Menu block offset from the origin. For root level origin is upper left corner of the page. For other levels origin is upper left corner of parent item.
  'block_top': [96, 24, 5],
  'block_left': [0, 0, 95],

// Offsets between items of the same level
  'top': [0, 21, 21],
  'left': [80, 0, 0],
// Time in milliseconds before menu is hidden after cursor has gone out of any items.
  'hide_delay': [100, 100, 100]
};

// Separate out offset and height to use in other HTML elements.
var mposition = MENU_POS1.height.toString();
var mblocktop = MENU_POS1.block_top.toString();
var mheights = mposition.split(',');
var moffsets = mblocktop.split(',');
var MENU_HEIGHT1 = mheights[0];
var MENU_OFFSET1 = moffsets[0];

/* Dynamic menu styles: 
  Note: You can add as many style properties as you wish but be not all browsers are able to render them correctly. The only relatively safe properties are 'color' and 'background'.
*/
var MENU_STYLES1 = {
// Default item state when it is visible but doesn't have mouse over.
  'onmouseout': [
    'color', ['#FFFFFF', '#000000', '#000000'], 
    'background', ['#4682B4', '#4682B4', '#4682B4'],
    'textDecoration', ['none', 'none', 'none'],
    'fontWeight', ['bold', 'normal', 'normal'],
  ],

// State when item has mouse over it.
  'onmouseover': [
    'color', ['#FFFFFF', '#000000', '#000000'], 
    'background', ['#5AA7E5', '#5AA7E5', '#5AA7E5'],
    'textDecoration', ['underline', 'none', 'none'],
    'fontWeight', ['bold', 'bold', 'normal'],
  ],

// State when mouse button has been pressed on the item.
  'onmousedown': [
    'color', ['#FFFFFF', '#000000', '#000000'], 
    'background', ['#DD9595', '#DD9595', '#DD9595'],
    'textDecoration', ['underline', 'none', 'none'],
    'fontWeight', ['normal', 'bold', 'normal'],
  ]
};

// Separate out background color to use in other HTML elements.
var mstyles = MENU_STYLES1.onmouseout.toString();
var bstyles = mstyles.substring(mstyles.indexOf('background')).split(',');
var MENU_BGCOLOR1 = bstyles[1];

