function IExploreIDclassHack(id,classname)
{
    setTimeout("document.getElementById('" + id + "').className='" + classname + "';", 10);
	return true;
}

/**
* Ez a kattintgatós, maga alá nyílós menühöz kell, ha minden menünél becsukunk mindent.
*/
function tmt_showParentsHiermenu(menuobj,hideall) {
	if (!menuobj || !menuobj.parentNode){return false;}
	if (menuobj.parentNode.id==hideall){return true;}
	if (menuobj.parentNode.nodeName.toLowerCase() == "ul"){
		menuobj.parentNode.style.display = "block";
		if (getBrowserType('ie'))IExploreIDclassHack(menuobj.parentNode.id, menuobj.parentNode.className);
	}
	tmt_showParentsHiermenu(menuobj.parentNode,hideall);
}
var tmt_hideChildrenHiermenu_id=0;
function tmt_hideChildrenHiermenu(menuobj,dontallowhide,ahref) {
	if (!menuobj || !menuobj.childNodes || typeof menuobj.id=='undefined')return false;
	//kinyitni ahol vagyunk, ha minden szinten php oldalletöltésre megyünk
	if (typeof ahref!='undefined' && menuobj.nodeName.toLowerCase() == "a" && menuobj.href==ahref){
		tmt_showParentsHiermenu(menuobj,'tmtHierbar');
		tmt_showHiermenu3(menuobj);
		if (menuobj.parentNode)tmt_showHiermenuShowAllChild(menuobj.parentNode);
	}
 	if (!menuobj.id) {
        menuobj.id='tmt_hideChildrenHiermenu_id_'+tmt_hideChildrenHiermenu_id;
        tmt_hideChildrenHiermenu_id++;
    }
	if(menuobj.nodeName.toLowerCase() == "ul"){
		if (dontallowhide!=1)menuobj.style.display = "none";
	}
	for (var i=0;i<menuobj.childNodes.length;i++) {
		tmt_hideChildrenHiermenu(menuobj.childNodes[i],dontallowhide,ahref);
	}
}
function tmt_showHiermenuHideOther(menuobj,hideall) {//starts from outer obj!! forEx: div, not the UL itself
	if (hideall && document.getElementById(hideall)) var divobj=document.getElementById(hideall);
	tmt_hideChildrenHiermenu(divobj);
	//get parents and show
	tmt_showParentsHiermenu(menuobj,hideall);
	//get childs and
	tmt_showHiermenu3(menuobj);
}
function tmt_showHiermenu3(menuobj){
	if (menuobj && menuobj.parentNode) {
		var childMenus = menuobj.parentNode.childNodes;
		for(var i=0; i<childMenus.length; i++){
			var obj = childMenus[i];
			if(obj.nodeName.toLowerCase() == "ul"){
				obj.style.display = "block";
			}
		}
	}
}
function tmt_showHiermenuShowAllChild(menuobj){
	if (menuobj && menuobj.childNodes) {
		var childMenus = menuobj.childNodes;
		for(var i=0; i<childMenus.length; i++){
			var obj = childMenus[i];
			if(obj.nodeName.toLowerCase() == "ul" || obj.nodeName.toLowerCase() == "li"){
				obj.style.display = "block";
				tmt_showHiermenuShowAllChild(obj);
			}
		}
	}
}

/**/


function getBrowserType(isbrowser)
{
    var browser;
	if (document.all)browser="ie";
//	if (document.layers)return "ff";
	else browser="ff";
	if (typeof isbrowser=='undefined')return browser;
	else return (isbrowser===browser?true:false);
}

