function tDrobDownMenu() {
	this.start = function (idDom, stylAktivni, stylHover, indexSoubor) {
		i = 0;
		iLastNalez = -1;
		pocetVUl = 0;
		hledanaURL = location.pathname;
		urlAdresare = hledanaURL.split("/");
		if (urlAdresare[urlAdresare.length-1]=="") hledanaURL += indexSoubor;
		while (document.getElementsByTagName("li")[i]) {
			aCko = document.getElementsByTagName("li")[i].getElementsByTagName("a")[0];
			if (aCko) {				
				objLi = document.getElementsByTagName("li")[i];				
				if (objLi.getElementsByTagName("ul")[0]) {
					// Funguje i bez řádků objUlStyle, težko říct, jestli to má někdy (určitý prohlížeč) smysl
					objUlStyle = objLi.getElementsByTagName("ul")[0].style;
					objUlStyle.display = "none";
					objUlStyle.position = "absolute";
					objUlStyle.color = "rgb(255, 255, 255)";	
					
					pocetVUl = 0;
					while (objLi.getElementsByTagName("ul")[0].getElementsByTagName("li")[pocetVUl]) pocetVUl++;
				}
				else pocetVUl--;				 
			
				noId = aCko.href.indexOf("#noid")!=-1;
				if (pocetVUl<0 || noId ) { // První úroveň
						objLi.onmouseover = function () {
						new tDrobDownMenu().show(this,stylHover);
					}				
					objLi.onmouseout = function () {
						new tDrobDownMenu().hide(this,"");
					}
					iLastNalez = i;
				}

				if (!noId) 
					if ( aCko.href.indexOf(hledanaURL)!=-1) {
						if (iLastNalez>-1) {
							objLi = document.getElementsByTagName("li")[iLastNalez];
							
							objLi.setAttribute("class",stylAktivni);
							objLi.setAttribute("className",stylAktivni);
							
							objLi.onmouseout = function () {
								new tDrobDownMenu().hide(this,stylAktivni);
							}						
							
						}
					}
			}
			i++;	
		}
	}
	
	this.show = function (obj,stylHover) {
		if (obj.getElementsByTagName("ul")[0]) {
			objUlStyle = obj.getElementsByTagName("ul")[0].style;
			objUlStyle.display = "block";
			objUlStyle.position = "absolute";
			objUlStyle.color = "#FFF";
		}
		obj.setAttribute("class",stylHover);
		obj.setAttribute("className",stylHover);
	}

	this.hide = function (obj,stylNormal) {
		if (obj.getElementsByTagName("ul")[0]) {
			objUlStyle = obj.getElementsByTagName("ul")[0].style;
			objUlStyle.display = "none";
		}
		obj.setAttribute("class",stylNormal);
		obj.setAttribute("className",stylNormal);
	}
}

