/*
  --- menu level scope settins structure --- 
  note that this structure has changed its format since previous version.
  Now this structure has the same layout as Tigra Menu GOLD.
  Format description can be found in product documentation.
*/
function getMenuPosition(obj,itemCount)
{
	var curleft = curtop = 0;
	var width = obj.offsetWidth;
	var height= obj.offsetHeight;
	if (obj.offsetParent) {
		curleft = obj.offsetLeft;
		curtop = obj.offsetTop;
		while (obj = obj.offsetParent) {
			curleft += obj.offsetLeft;
			curtop += obj.offsetTop;
		}
	};
	
	var menubarPosition = [curleft,curtop,width,height];
	
	//alert("menubar pos: "+menubarPosition);
	var menuWidth = (menubarPosition[2]-itemCount)/itemCount;
	var menuHeight = menubarPosition[3]-2;
	
	var MENU_POS = [{
		// item sizes
		'height': menuHeight,
		'width': menuWidth,
		// 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': menubarPosition[1]+1,
		'block_left': menubarPosition[0],
		// offsets between items of the same level
		'top': 0,
		'left': menuWidth + 1,
		// time in milliseconds before menu is hidden after cursor has gone out
		// of any items
		'hide_delay': 200,
		'expd_delay': 200,
		'css' : {
			'outer' : ['m0l0oout', 'm0l0oover'],
			'inner' : ['m0l0iout', 'm0l0iover']
		}
	},{
		'height': 24,
		'width': menuWidth,
		'block_top': menuHeight,
		'block_left': 0,
		'top': 23,
		'left': 0,
		'css' : {
			'outer' : ['m0l1oout', 'm0l1oover'],
			'inner' : ['m0l1iout', 'm0l1iover']
		}
	},{
		'block_top': 5,
		'block_left': menuWidth-10
	}
	];
	return MENU_POS;
}