
/*
var windowWidth = window.innerWidth;
var windowWidth = window.screenX;
var windowWidth = document.body.clientWidth; // all other browsers needs 'window.innerWidth' firefox needs 'window.screenX'

// level scope settins structure
var MENU_TPL = [
// root level configuration (level 0)
{
	// item sizes
	'height': 26,
	'width': 90,
	// absolute position of the menu on the page (in pixels)
	// with centered content use Tigra Menu PRO or Tigra Menu GOLD
	'block_top':  80,
'block_left': (windowWidth-984)/2,
	// offsets between items of the same level (in pixels)
	'top': 0,
	'left': 92,
	// time delay before menu is hidden after cursor left the menu (in milliseconds)
	'hide_delay': 200,
	// submenu expand delay after the rollover of the parent 
	'expd_delay': 200,
	// names of the CSS classes for the menu elements in different states
	// tag: [normal, hover, mousedown]
	'css' : {
		'outer' : ['m0l0oout', 'm0l0oover'],
		'inner' : ['m0l0iout', 'm0l0iover']
	}
},
// sub-menus configuration (level 1)
// any omitted parameters are inherited from parent level
{
	'height': 26,
	'width': 170,
	// position of the submenu relative to top left corner of the parent item
	'block_top': 27,
	'block_left': 0,
	'top': 23,
	'left': 0,
	'css' : {
		'outer' : ['m0l1oout', 'm0l1oover'],
		'inner' : ['m0l1iout', 'm0l1iover']
	}
},
// sub-sub-menus configuration (level 2)
{
	'block_top': 5,
	'block_left': 172
}
// the depth of the menu is not limited
// make sure there is no comma after the last element
];


*/

function f_filterResults(n_win, n_docel, n_body) {
	var n_result = n_win ? n_win : 0;
	if (n_docel && (!n_result || (n_result > n_docel)))
		n_result = n_docel;
	return n_body && (!n_result || (n_result > n_body)) ? n_body : n_result;
}
function f_clientWidth() {
	return f_filterResults (
		window.innerWidth ? window.innerWidth : 0,
		document.documentElement ? document.documentElement.clientWidth : 0,
		document.body ? document.body.clientWidth : 0
	);
}
MENU_LEFT = (f_clientWidth()-1000)/2 ;
if (MENU_LEFT < 10 )  MENU_LEFT = 10;
var MENU_TPL = [
// root level configuration (level 0)
{
	// item sizes
	'height': 26,
	'width': 90,
	// absolute position of the menu on the page (in pixels)
	// with centered content use Tigra Menu PRO or Tigra Menu GOLD
	'block_top':  80,
	'block_left': MENU_LEFT,
	// offsets between items of the same level (in pixels)
	'top': 0,
	'left': 92,
	// time delay before menu is hidden after cursor left the menu (in milliseconds)
	'hide_delay': 200,
	// submenu expand delay after the rollover of the parent 
	'expd_delay': 200,
	// names of the CSS classes for the menu elements in different states
	// tag: [normal, hover, mousedown]
	'css' : {
		'outer' : ['m0l0oout', 'm0l0oover'],
		'inner' : ['m0l0iout', 'm0l0iover']
	}
},
// sub-menus configuration (level 1)
// any omitted parameters are inherited from parent level
{
	'height': 26,
	'width': 170,
	// position of the submenu relative to top left corner of the parent item
	'block_top': 27,
	'block_left': 0,
	'top': 23,
	'left': 0,
	'css' : {
		'outer' : ['m0l1oout', 'm0l1oover'],
		'inner' : ['m0l1iout', 'm0l1iover']
	}
},
// sub-sub-menus configuration (level 2)
{
	'block_top': 5,
	'block_left': 172
}
// the depth of the menu is not limited
// make sure there is no comma after the last element
];
