/* --- geometry and timing of the menu --- */
var MENU_POS = new Array();
var browser = 'unknown';
var width;

	// item sizes for different levels of menu
	MENU_POS['height']     = [35, 26, 26, 26, 26];
	MENU_POS['width']      = [110, 180, 160, 150, 150];

	// 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

	if (browser == 'unknown')								// Browser not set.
	{
	     if (navigator.appName.indexOf('Microsoft') != -1)
			browser = 'IE';									// Set IE
	     else if (navigator.appName.indexOf('Netscape') != -1)
			browser = 'Netscape';								// Set Netscape, i.e. Mozilla
	     else
		 	browser = 'IE';								// Default is IE unfortunatly
	}
	
	if (browser == 'Netscape')								// If Netscape/Mozilla then take into account the scroll bar width
	{
		width = (window.innerWidth - 21);
	}
	else if(browser == 'IE')
	{
		width = (document.body.clientWidth);
	}
	else
	{
		width = (document.body.clientWidth);		
	}
	
	//alert("width is: " + width + " Document: " + document.body.clientWidth + " client: " + window.innerWidth + " / And - window.pagexoffset = " + document.body.scrollLeft);
	//alert(window.innerHeight);
	
	
	var half_width = (width/2);
	if((half_width-440) >= 0)
		var menu_pos = (half_width-440);
	else var menu_pos = 0;
	//8*110=880 (as each box is 110 in width, so total menu width is 880)
	//440 = halfway point of menu
	MENU_POS['block_top']  = [140, 36, 11, 11, 11];
	MENU_POS['block_left'] = [menu_pos, 0, 81, 76, 76];
	
	
	// offsets between items of the same level
	MENU_POS['top']        = [0, 23, 23, 23, 23];
	MENU_POS['left']       = [110, 0, 0, 0, 0];

	// time in milliseconds before menu is hidden after cursor has gone out
	// of any items
	MENU_POS['hide_delay'] = [600, 600, 600, 600, 600];

/* --- 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_STYLES = new Array();

	// default item state when it is visible but doesn't have mouse over
	MENU_STYLES['onmouseout'] = [
		'color', ['#860000', '#860000', '#860000', '#860000', '#860000'],
		'background', ['#399CDD', '#399CDD', '#399CDD', '#399CDD', '#399CDD'],
	];

	// state when item has mouse over it
	MENU_STYLES['onmouseover'] = [
		'color', ['#860000', '#860000', '#860000', '#860000', '#860000'],
		'background', ['#399CDD', '#399CDD', '#399CDD', '#399CDD', '#399CDD'],
	];

	// state when mouse button has been pressed on the item
	MENU_STYLES['onmousedown'] = [
		'color', ['#860000', '#860000', '#860000', '#860000', '##860000'],
		'background', ['#399CDD', '#399CDD', '#399CDD', '#399CDD', '#399CDD'],
	];
