var tMenu = {};tMenu.Utils = {};tMenu.Utils.getAbsolutePos = function(el) {var SL = 0, ST = 0;var is_div = /^div$/i.test(el.tagName);if (is_div && el.scrollLeft)SL = el.scrollLeft;
if (is_div && el.scrollTop)ST = el.scrollTop;
var r = { x: el.offsetLeft - SL, y: el.offsetTop - ST };
if (el.offsetParent) {var tmp = this.getAbsolutePos(el.offsetParent);r.x += tmp.x;r.y += tmp.y;}
return r;};
tMenu.Utils.fixBoxPosition = function(box) {
if (box.x < 0)box.x = 0;if (box.y < 0)box.y = 0;
var cp = tMenu.Utils.createElement("div");var s = cp.style;
s.position = "absolute";s.right = s.bottom = s.width = s.height = "0px";
window.document.body.appendChild(cp);var br = tMenu.Utils.getAbsolutePos(cp);
window.document.body.removeChild(cp);
if (tMenu.is_ie) {br.y += window.document.body.scrollTop;br.x += window.document.body.scrollLeft;
} else {br.y += window.scrollY;br.x += window.scrollX;}
var tmp = box.x + box.width - br.x;
if (tmp > 0) box.x -= tmp;
tmp = box.y + box.height - br.y;
if (tmp > 0) box.y -= tmp;};
tMenu.Utils.isRelated = function (el, evt) {evt || (evt = window.event);
var related = evt.relatedTarget;
if (!related) {var type = evt.type;if (type == "mouseover") {related = evt.fromElement;} else if (type == "mouseout") {related = evt.toElement;}}
try {while (related) {if (related == el) {return true;}
related = related.parentNode;}} catch(e) {};
return false;};tMenu.Utils.removeClass = function(el, className) {if (!(el && el.className)) {return;}
var cls = el.className.split(" ");var ar = [];
for (var i = cls.length; i > 0;) {if (cls[--i] != className) {ar[ar.length] = cls[i];}}
el.className = ar.join(" ");};
tMenu.Utils.addClass = function(el, className) {tMenu.Utils.removeClass(el, className);el.className += " " + className;};tMenu.Utils.getElement = function(ev) {if (tMenu.is_ie) {return window.event.srcElement;} else {return ev.currentTarget;}};tMenu.Utils.getTargetElement = function(ev) {if (tMenu.is_ie) {return window.event.srcElement;} else {return ev.target;}};tMenu.Utils.stopEvent = function(ev) {ev || (ev = window.event);if (tMenu.is_ie) {ev.cancelBubble = true;ev.returnValue = false;} else {ev.preventDefault();ev.stopPropagation();}return false;};tMenu.Utils.addEvent = function(el, evname, func) {if (el.attachEvent) {el.attachEvent("on" + evname, func);} else if (el.addEventListener) {el.addEventListener(evname, func, true);} else {el["on" + evname] = func;}};tMenu.Utils.removeEvent = function(el, evname, func) {if (el.detachEvent) {el.detachEvent("on" + evname, func);} else if (el.removeEventListener) {el.removeEventListener(evname, func, true);} else {el["on" + evname] = null;}};
tMenu.Utils.createElement = function(type, parent) {var el = null;if (window.self.document.createElementNS)el = window.self.document.createElementNS("http://www.w3.org/1999/xhtml", type);
else el = window.self.document.createElement(type);
if (typeof parent != "undefined")parent.appendChild(el);
if (tMenu.is_ie)el.setAttribute("unselectable", true);
if (tMenu.is_gecko)el.style.setProperty("-moz-user-select", "none", "");
return el;};tMenu.Utils.makePref = function(obj) {function stringify(val) {
if (typeof val == "object" && !val)return "null";
else if (typeof val == "number" || typeof val == "boolean")return val;
else if (typeof val == "string")return '"' + val.replace(/\22/, "\\22") + '"';
else return null;};var txt = "", i;
for (i in obj)txt += (txt ? ",'" : "'") + i + "':" + stringify(obj[i]);
return txt;};
tMenu.Utils.loadPref = function(txt) {var obj = null;
try {eval("obj={" + txt + "}");} catch(e) {}
return obj;};tMenu.Utils.mergeObjects = function(dest, src) {
for (var i in src)dest[i] = src[i];};
tMenu.Utils.__wch_id = 0;tMenu.Utils.createWCH = function(element) {var f = null;
element = element || window.self.document.body;
if (tMenu.is_ie && !tMenu.is_ie5) {var filter = 'filter:progid:DXImageTransform.Microsoft.alpha(style=0,opacity=0);';
		var id = "WCH" + (++tMenu.Utils.__wch_id);element.insertAdjacentHTML
			('beforeEnd', '<iframe id="' + id + '" scroll="no" frameborder="0" ' +
			 'style="z-index:0;position:absolute;visibility:hidden;' + filter +
			 'border:10;top:0;left:0;width:0;height:0;" ' +
			 'src="javascript:false;"></iframe>');
f = window.self.document.getElementById(id);}return f;};
tMenu.Utils.setupWCH_el = function(f, el, el2) {if (f) {var pos = tMenu.Utils.getAbsolutePos(el),
X1 = pos.x,Y1 = pos.y,X2 = X1 + el.offsetWidth,Y2 = Y1 + el.offsetHeight;
if (el2) {var p2 = tMenu.Utils.getAbsolutePos(el2),XX1 = p2.x,YY1 = p2.y,XX2 = XX1 + el2.offsetWidth,
YY2 = YY1 + el2.offsetHeight;if (X1 > XX1)X1 = XX1;if (Y1 > YY1)Y1 = YY1;if (X2 < XX2)X2 = XX2;if (Y2 < YY2)Y2 = YY2;}
tMenu.Utils.setupWCH(f, X1, Y1, X2-X1, Y2-Y1);}};tMenu.Utils.setupWCH = function(f, x, y, w, h) {if (f) {
var s = f.style;(typeof x != "undefined") && (s.left = x + "px");(typeof y != "undefined") && (s.top = y + "px");(typeof w != "undefined") && (s.width = w + "px");(typeof h != "undefined") && (s.height = h + "px");s.visibility = "inherit";}};tMenu.Utils.hideWCH = function(f) {if (f)f.style.visibility = "hidden";
};tMenu.Utils.getPageScrollY = function() {return window.pageYOffset || document.documentElement.scrollTop ||(document.body ? document.body.scrollTop : 0) || 0;};
tMenu.ScrollWithWindow = {};tMenu.ScrollWithWindow.list = [];
tMenu.ScrollWithWindow.stickiness = 0.25;
tMenu.ScrollWithWindow.register = function(node) {tMenu.ScrollWithWindow.list[tMenu.ScrollWithWindow.list.length] = {node: node,origTop: parseInt(node.style.top) || 0};};
tMenu.ScrollWithWindow.handler = function(newScrollY) {oldScrollY += ((newScrollY - oldScrollY) * this.stickiness);if (Math.abs(oldScrollY - newScrollY) <= 1) oldScrollY = newScrollY;for (var count = 0; count < tMenu.ScrollWithWindow.list.length; count++) {var elm = tMenu.ScrollWithWindow.list[count];elm.node.style.top = elm.origTop + parseInt(oldScrollY) + 'px';}};
var oldScrollY = tMenu.Utils.getPageScrollY();setInterval(
	'var newScrollY = tMenu.Utils.getPageScrollY(); ' + 'if (newScrollY != oldScrollY) { ' + 'tMenu.ScrollWithWindow.handler(newScrollY); ' +'}', 50);
tMenu.Utils.destroy = function(el) {if (el && el.parentNode)el.parentNode.removeChild(el);};
tMenu.Utils.newCenteredWindow = function(url, windowName, width, height, scrollbars){var leftPosition = 0;var topPosition = 0;if (screen.width)leftPosition = (screen.width -  width)/2;
if (screen.height)topPosition = (screen.height -  height)/2;
var winArgs = 'height=' + height + ',width=' + width + ',top=' + topPosition +',left=' + leftPosition +',scrollbars=' + scrollbars +',resizable';var win = window.open(url,windowName,winArgs);return win;};
tMenu.Utils.selectOption = function(sel, val, call_default) {
var a = sel.options, i, o;for (i = a.length; --i >= 0;) {o = a[i];o.selected = (o.val == val);
}sel.value = val;if (call_default) {if (typeof sel.onchange == "function")sel.onchange();
else if (typeof sel.onchange == "string")eval(sel.onchange);}};
tMenu.Utils.getNextSibling = function(el, tag) {el = el.nextSibling;
if (!tag)return el;tag = tag.toLowerCase();
while (el && (el.nodeType != 1 || el.tagName.toLowerCase() != tag))el = el.nextSibling;
return el;};tMenu.Utils.getFirstChild = function(el, tag) {el = el.firstChild;
if (!tag)return el;tag = tag.toLowerCase();if (el.nodeType == 1 && el.tagName.toLowerCase() == tag)return el;return tMenu.Utils.getNextSibling(el, tag);};tMenu.Utils._ids = {};tMenu.Utils.generateID = function(code, id) {if (typeof id == "undefined") {if (typeof this._ids[code] == "undefined")this._ids[code] = 0;id = ++this._ids[code];}return "tM-" + code + "-" + id;};
tMenu.Utils.addTooltip = function(target, tooltip) {return new tMenu.Tooltip(target, tooltip);};
tMenu.is_opera = /opera/i.test(navigator.userAgent);
tMenu.is_ie = ( /msie/i.test(navigator.userAgent) && !tMenu.is_opera );
tMenu.is_ie5 = ( tMenu.is_ie && /msie 5\.0/i.test(navigator.userAgent) );
tMenu.is_mac_ie = ( /msie.*mac/i.test(navigator.userAgent) && !tMenu.is_opera );
tMenu.is_khtml = /Konqueror|Safari|KHTML/i.test(navigator.userAgent);
tMenu.is_konqueror = /Konqueror/i.test(navigator.userAgent);
tMenu.is_gecko = /Gecko/i.test(navigator.userAgent);
////////////////////////////
tMenu.Tree = function(el, config, noInit) {if (typeof config == "undefined")config = {};
this._el = el;this._config = config;if (!noInit) this.initTree();}
tMenu.Tree.prototype.initTree = function() {var el = this._el;var config = this._config;
function param_default(name, value) {if (typeof config[name] == "undefined") config[name] = value;};
param_default('d_profile', false);param_default('hiliteSelectedNode', true);param_default('compact', false);param_default('dynamic', false);param_default('initLevel', false);
if (config.dynamic)config.initLevel = 0;
this.config = config;if (this.config.d_profile) {var T1 = new Date().getTime();profile = {items : 0,trees : 0,icons : 0};}if (typeof el == "string")el = document.getElementById(el);this.list = el;
this.items = {};this.trees = {};this.selectedItem = null; this.id=null;
if (el)this.id = el.id || tMenu.Utils.generateID("tree");
else alert("Ошибка идентификатора  id=\"" + this._el + "\"");
var top = this.top_parent = tMenu.Utils.createElement("div");
top.className = "tM tM-top";
if (this.config.vertical) tMenu.Utils.addClass(top, "tM-vertical-mode");
else tMenu.Utils.addClass(top, "tM-horizontal-mode");
this.createTree(el, top, 0);
if (el) {el.parentNode.insertBefore(top, el);el.parentNode.removeChild(el);}
tMenu.Tree.all[this.id] = this;
if (this.selectedItem)this.sync(this.selectedItem.__ip_item);
};
tMenu.Tree.all = {};
tMenu.Tree.prototype.createTree = function(list, parent, level) {
if (this.config.d_profile) ++profile.trees; 
var id;var intItem=1, bFirst=true;
if (list) id=list.id; 
if (!id)  id=tMenu.Utils.generateID("tree.sub");var self = this;
function _makeIt() {self.creating_now = true;
var last_li = null,  next_li, i = (list ? list.firstChild : null), items = parent.__ip_items = [];
self.trees[id] = parent; parent.__ip_level = level; parent.__ip_treeid = id;
while (i) {if (last_li) last_li.className += " tM-lines-c";
if (i.nodeType != 1) i = i.nextSibling;
else { next_li = tMenu.Utils.getNextSibling(i, 'li');
if (i.tagName.toLowerCase() == 'li') { last_li = self.createItem(i, parent, next_li, level, intItem++);
if (last_li) { if (bFirst){bFirst=false;tMenu.Utils.addClass(last_li, "tM-item-first");}
items[items.length] = last_li.__ip_item;}}i = next_li;}}
if (last_li) tMenu.Utils.addClass(last_li, "tM-item-last");
i = parent.firstChild;
if (i && !level) {i.className = i.className.replace(/ tM-lines-./g, "");i.className += (i === last_li) ? " tM-lines-s" : " tM-lines-t";}if (last_li && (level || last_li !=  i)) {last_li.className = last_li.className.replace(/ tM-lines-./g, "");last_li.className += " tM-lines-b";
} self.creating_now = false;};
if (this.config.dynamic && level > 0)this.trees[id] = _makeIt;
else _makeIt();
return id;};tMenu.Tree.prototype.createItem = function(li, parent, next_li, level, intItem) {
if (this.config.d_profile) ++profile.items; 
if (!li.firstChild) return;
var id = li.id || tMenu.Utils.generateID("tree.item"), item = this.items[id] = tMenu.Utils.createElement("div", parent), t = tMenu.Utils.createElement("table", item), tb = tMenu.Utils.createElement("tbody", t), tr = tMenu.Utils.createElement("tr", tb),td = tMenu.Utils.createElement("td", tr),is_list,tmp,i = li.firstChild,has_icon = false;
t.className = "tM-table";t.cellSpacing = 0;t.cellPadding = 0;td.className = "tM-label"
if (li.getAttribute('title')) {td.setAttribute('title', li.getAttribute('title'));}
item.className = "tM-item" + (li.className ? ' ' + li.className : '');
if (level == 0 && !this.config.vertical) {tMenu.Utils.addClass(item, "tMVertical");}
tMenu.Utils.addClass(item, "tM-level-" + (level+1));	item.__ip_item = id; item.__ip_tree = this.id;
item.__ip_parent = parent.__ip_treeid;item.onmouseover = tMenu.Menu.onItemMouseOver;
item.onmouseout = tMenu.Menu.onItemMouseOut;tMenu.Utils.addClass(item, "tM-item-" + (intItem % 2==1 ? "odd" : "even"));
while (i) {is_list = i.nodeType == 1 && /^[ou]l$/i.test(i.tagName);	if (i.nodeType != 1 || !is_list) {			if (i.nodeType == 3) {tmp = i.data.replace(/^\s+/, '');	tmp = tmp.replace(/\s+$/, '');				li.removeChild(i);if (tmp) {i = tMenu.Utils.createElement("span");i.innerHTML = tmp;					td.appendChild(i);}	} else if (i.tagName.toLowerCase() == 'img') {this.item_addIcon(item, i);				has_icon = true;} else {if ((this._menuMode) && (i.tagName.toLowerCase() == 'hr')) {					tMenu.Utils.addClass(item, "tM-item-hr");}	td.appendChild(i);}	i = li.firstChild;continue;	}
if (is_list) {this.item_addIcon(item, null);var np = tMenu.Utils.createElement("div", item.parentNode);	np.__ip_item = id;	np.className = "tM" + (i.className ? ' ' + i.className : '');			np.onmouseover = tMenu.Menu.onItemMouseOver;np.onmouseout = tMenu.Menu.onItemMouseOut;if (next_li)				np.className += " tM-lined";item.__ip_subtree = this.createTree(i, np, level+1);if ((this.config.initLevel !=  false && this.config.initLevel <= level) ||	(this.config.compact && !/(^|\s)expanded(\s|$)/i.test(li.className)) || /(^|\s)collapsed(\s|$)/i.test(li.className)) {				item.className += " tM-item-collapsed";	this.toggleItem(id);} else	item.className += " tM-item-expanded";if (/(^|\s)selected(\s|$)/i.test(li.className))this.selectedItem = item;			break;}}if (!has_icon && !/tM-item-hr/i.test(item.className))	if (this.config.defaultIcons)			this.item_addDefaultIcon(item, this.config.defaultIcons);else	this.item_addDefaultIcon(item, "tM-noicon");return item;};
tMenu.Tree.prototype.item_addDefaultIcon = function(item, className) {
if (!className)return;
var last_td = item.firstChild.firstChild.firstChild.lastChild, td;
var td = tMenu.Utils.createElement("td");td.className = "tgb icon " + className;
last_td.parentNode.insertBefore(td, last_td);};
tMenu.Tree.prototype.item_addIcon = function(item, img) {if (this.config.d_profile) 		++profile.icons; var last_td = item.firstChild.firstChild.firstChild, td;last_td = img ? last_td.lastChild : last_td.firstChild;	if (!img || !item.__ip_icon) {	td = tMenu.Utils.createElement("td");		td.className = "tgb " + (img ? "icon" : "minus");		last_td.parentNode.insertBefore(td, last_td);} else {td = item.__ip_icon;img.style.display = "none";	}	if (!img) {		td.innerHTML = "&nbsp;";item.className += " tM-item-more";		item.__ip_state = true; 		item.__ip_expand = td;	} else {		td.appendChild(img);item.__ip_icon = td;	}};tMenu.Tree.prototype.itemClicked = function(item_id) {this.selectedItem = this.toggleItem(item_id);	if (this.config.hiliteSelectedNode && this.selectedItem)tMenu.Utils.addClass(this.selectedItem, "tM-item-selected");this.onItemSelect(item_id);};
tMenu.Tree.prototype.toggleItem = function(item_id, state) {if (item_id) {	if (this.config.hiliteSelectedNode && this.selectedItem)tMenu.Utils.removeClass(this.selectedItem, "tM-item-selected");var item = this.items[item_id];	if (typeof state == "undefined")state = !item.__ip_state;if (state != item.__ip_state) {	var subtree = this._getTree(item.__ip_subtree, this.creating_now);	if (subtree) {this.treeSetDisplay(subtree, state);				tMenu.Utils.removeClass(item, "tM-item-expanded");tMenu.Utils.removeClass(item, "tM-item-collapsed");				tMenu.Utils.addClass(item, state ? "tM-item-expanded" : "tM-item-collapsed");}var img = item.__ip_expand;			if (img)img.className = "tgb " + (state ? "minus" : "plus");item.__ip_state = state;img = item.__ip_icon;			if (img) {img.firstChild.style.display = "none";img.appendChild(img.firstChild);			img.firstChild.style.display = "block";	}if (this.config.compact && state) {var hideItems = this._getTree(item.__ip_parent).__ip_items;	for (var i = hideItems.length; --i >= 0;) {					if (hideItems[i] != item_id && hideItems[i].__ip_state) {this.toggleItem(hideItems[i], false);						if (hideItems[i].__ip_subtree) {var subtree = this._getTree(hideItems[i].__ip_subtree);							this.toggleItem(subtree.firstChild, false);	}}}}}return item;}return null;};
tMenu.Tree.prototype.destroy = function() {var p = this.top_parent;p.parentNode.removeChild(p);};
tMenu.Tree.prototype._getTree = function(tree_id, dont_call) {var tree = this.trees[tree_id];	if (typeof tree == "function") {if (dont_call)	tree = null;else {tree();tree = this.trees[tree_id];}}	return tree;};
tMenu.Tree.prototype.onItemSelect = function() {};
tMenu.Tree.onItemToggle = function() {var item = this;var body = document.body;
while (item && item !=  body && !/tM-item/.test(item.className))item = item.parentNode;
tMenu.Tree.all[item.__ip_tree].itemClicked(item.__ip_item);
};tMenu.Menu = function(el, config_user) {
this._el = el;
this._config={};
this.setOption(this._config, 'showDelay', 0);
this.setOption(this._config, 'hideDelay', 500);
this.setOption(this._config, 'vertical', false);
this.setOption(this._config, 'glide', false);
this.setOption(this._config, 'animSpeed', 25); // percentage animation per frame.
this.setOption(this._config, 'compact', true); 
this.setOption(this._config, 'initLevel', 0); 
if (typeof config_user != "undefined")for (var i in config_user) {if (typeof this._config[i] == "undefined") {alert("Ошибка:Меню " + this._el + " с не корректным параметром --" + i + ":" + config_user[i]);} else {this.setOption(this._config, i, config_user[i]);}}
this.animations = [];this._menuMode = true;this.initTree();this.openMenus = [];this.clickDone = false;
if (this._config.glide)this.addAnimation('glide');};
tMenu.Menu.prototype = new tMenu.Tree('', null, true);tMenu.Menu.MOUSEOUT = 0;tMenu.Menu.MOUSEOVER = 1;
tMenu.Menu.CLICK = 2;tMenu.Menu.prototype.setOption = function(config, name, val) {config[name] = val;};
tMenu.Menu.animations = {};
tMenu.Menu.animations.glide = function(ref, counter) {	var cP = Math.pow(Math.sin(Math.PI*counter/200),0.75);var noClip = ((window.opera || navigator.userAgent.indexOf('KHTML') > -1) ?'' : 'rect(auto, auto, auto, auto)');ref.style.clip = (counter==100) ? noClip :'rect(0, ' + ref.offsetWidth + 'px, ' + (ref.offsetHeight*cP) + 'px, 0)';};tMenu.Menu.prototype.addAnimation = function(animation) { this.animations[this.animations.length] = tMenu.Menu.animations[animation];};
tMenu.Menu.prototype.treeSetDisplay = function(menu, show) {if (!menu.__ip_initialised) {		menu.style.visibility = 'hidden';menu.__ip_initialised = true;return;}menu.__ip_anim_timer |= 0;	menu.__ip_anim_counter |= 0;var tree, t_id = menu.__ip_tree || menu.firstChild.__ip_tree;	if (t_id) tree = tMenu.Tree.all[t_id];	if (!tree) return;	clearTimeout(menu.__ip_anim_timer);	if (show && !menu.__ip_anim_counter) menu.style.visibility = 'inherit';	var speed = !tree.animations.length ? 100 : tree.config.animSpeed;	if (speed < 100) {		for (var a = 0; a < tree.animations.length; a++) {			tree.animations[a](menu, menu.__ip_anim_counter);}}	menu.__ip_anim_counter += speed * (show ? 1 : -1);	if (menu.__ip_anim_counter > 100) {		menu.__ip_anim_counter = 100;}	else if (menu.__ip_anim_counter <= 0) {		menu.__ip_anim_counter = 0;	menu.style.visibility = 'hidden';	}	else {		menu.__ip_anim_timer = setTimeout(function() {tree.treeSetDisplay(menu, show);}, 50);}};
tMenu.Menu.onItemMouseOver = function() {var item = this,tree = null,body = document.body;	while (item && item !=  body) {var t_id = item.__ip_tree || item.firstChild.__ip_tree;	if (t_id) tree = tMenu.Tree.all[t_id];	if (/tM-item/.test(item.className) && !/tM-item-hr/.test(item.className)) {			tree.itemMouseHandler(item.__ip_item, tMenu.Menu.MOUSEOVER);}	item = tree && item.__ip_treeid ?			tree.items[item.__ip_item] : item.parentNode;}};
tMenu.Menu.onItemMouseOut = function() {	var item = this,		tree = null,		body = document.body;	while (item && item !=  body) {		var t_id = item.__ip_tree || item.firstChild.__ip_tree;		if (t_id) tree = tMenu.Tree.all[t_id];	if (/tM-item/.test(item.className) && !/tM-item-hr/.test(item.className)) {			tree.itemMouseHandler(item.__ip_item, tMenu.Menu.MOUSEOUT);	}	item = tree && item.__ip_treeid ?			tree.items[item.__ip_item] : item.parentNode;	}};
tMenu.Menu.prototype.itemMouseHandler = function(item_id, type) {var item = this.items[item_id];var menu = this._getTree(item.__ip_parent);if (menu && menu.__ip_activeitem != item_id) {if (menu.__ip_activeitem) {var lastItem = this.items[menu.__ip_activeitem];tMenu.Utils.removeClass(lastItem, "tM-item-selected");if (lastItem.__ip_state) this.toggleItem(lastItem.__ip_item, false);}	menu.__ip_activeitem = item_id;	tMenu.Utils.addClass(item, "tM-item-selected");	}	clearTimeout(item.__ip_dimtimer);	if (type == tMenu.Menu.MOUSEOUT) {item.__ip_dimtimer = setTimeout(function() {tMenu.Utils.removeClass(item, "tM-item-selected");if (menu.__ip_activeitem == item_id) menu.__ip_activeitem = '';}, this.config.hideDelay);}	clearTimeout(item.__ip_mousetimer);	if (!item.__ip_state && type)	{item.__ip_mousetimer = setTimeout('tMenu.Tree.all["' +	item.__ip_tree + '"].itemShow("' + item.__ip_item + '")',(this.config.showDelay || 1));}	else if (item.__ip_state && !type)	{item.__ip_mousetimer = setTimeout('tMenu.Tree.all["' +	item.__ip_tree + '"].itemHide("' + item.__ip_item + '")',(this.config.hideDelay || 1));}};
tMenu.Menu.prototype.itemShow = function(item_id) {	var item = this.items[item_id];	var subMenu = this._getTree(item.__ip_subtree);	var parMenu = this._getTree(item.__ip_parent);	if (subMenu) {		if (tMenu.is_ie && !tMenu.is_ie5) {	if (!subMenu.offsetHeight) {subMenu.style.left = '-9999px';				subMenu.style.visibility = 'visible';}	if (!subMenu.__ip_wch) {subMenu.__ip_wch = tMenu.Utils.createWCH(subMenu);	}subMenu.__ip_wch.style.zIndex = -1;			tMenu.Utils.setupWCH(subMenu.__ip_wch, -1, 0,subMenu.offsetWidth + 2, subMenu.offsetHeight);} var newLeft = 0, newTop = 0;if ((/tM-top/.test(item.parentNode.className))	&& (!(this.config.vertical))) {			newLeft = item.offsetLeft;newTop = item.offsetHeight;	}	else {			
// Vertical menus.			
newLeft = item.offsetWidth;	newTop = item.offsetTop;var scrollX = window.pageXOffset || document.body.scrollLeft ||	document.documentElement.scrollLeft || 0;var scrollY = window.pageYOffset || document.body.scrollTop ||	document.documentElement.scrollTop || 0;var winW = window.innerWidth || document.body.clientWidth ||document.documentElement.clientWidth || 0;var winH = window.innerHeight || document.body.clientHeight || document.documentElement.clientHeight || 0;var menuPos = tMenu.Utils.getAbsolutePos(parMenu);if (menuPos.x + newLeft + subMenu.offsetWidth > scrollX + winW) {				newLeft = (0 - subMenu.offsetWidth);}if (menuPos.y + newTop + subMenu.offsetHeight > scrollY + winH) {				newTop -= subMenu.offsetHeight;	}if (menuPos.x + newLeft < 0) {	newLeft = 0 - menuPos.x;}if (menuPos.y + newTop < 0) {newTop = 0 - menuPos.y;}}	subMenu.style.left = newLeft + 'px';subMenu.style.top = newTop + 'px';this.toggleItem(item_id, true);	}}
tMenu.Menu.prototype.itemHide = function(item_id) {	var item = this.items[item_id];	var subMenu = this._getTree(item.__ip_subtree);	var parMenu = this._getTree(item.__ip_parent);	if (subMenu) {		this.toggleItem(item_id, false);		parMenu.__ip_activeitem = '';		subMenu.__ip_activeitem = '';		for (var i in this.items) {			if (this.items[i].__ip_state) return;		}		this.clickDone = false;	}};
