var objItem;
//----------------------------x = nazev prvku
function objGet(x) {
	if (Boolean(document.all)) return eval('document.all.'+x);
	else if (Boolean(document.getElementById)) return document.getElementById(x);
	else if (Boolean(document.ids)) return eval('document.ids.'+x);
	else return null;
}
//sbalovaci text------------------------------------------
function ListRoll(elem){
 	var obj = document.getElementById(elem).lastChild;
 	if(obj.style.display == ''){obj.style.display = "none"}
	obj.style.display = (obj.style.display == "none" ? "block" : "none");
 }

var IdTime;
function allHiddenMenu(objId){
     window.clearTimeout(IdTime);
      IdTime=null;
	  var obj;
      for (id=1; id<=11; id++){
		obj = document.getElementById("ch"+id);
        if (obj != null){
        if (id != objId) obj.style.visibility = "hidden";
        }
      }		
}
function chHiddenMenu(chID,pID){
     window.clearTimeout(IdTime);
      IdTime=null;
	  var obj;
      for (id=1; id<=11; id++){
		obj = document.getElementById("ch"+id)
        if (obj!= null){
          if(id > pID && id != chID){obj.style.visibility = "hidden";}
        }
      }
}
function outObj(){
     IdTime = window.setTimeout("allHiddenMenu(82)",300);
}
function onRoot(hID,ID){
      var objElem = document.getElementById(ID);
     
      var x = 0;
      while (typeof objElem == 'object' && objElem.tagName != 'BODY'){ 
          x += objElem.offsetLeft;
          objElem = objElem.offsetParent;
      }
      allHiddenMenu(hID);		
	  var obj = document.getElementById('ch'+hID);
      if(obj!= null ){
           obj.style.left = x-8;
           obj.style.top = 80;
           obj.style.visibility = "visible";
      }
}
function onChildren(chID,ID,pID,nTop){
      var objElem = document.getElementById(ID);
      var x = 0;
      var y = 0;
      x += parseFloat(objElem.offsetWidth);
      while (typeof objElem == 'object' && objElem.tagName != 'BODY'){ 
          x += objElem.offsetLeft;
          y += objElem.offsetTop;
          objElem = objElem.offsetParent;
      };
      chHiddenMenu(chID,pID);
	  var obj = document.getElementById('ch'+chID);
      if(obj!= null ){
           obj.style.left = x;
           obj.style.top = y + nTop;
           obj.style.visibility = "visible";
      }
}
function ClearTime(){
     window.clearTimeout(IdTime);
}

function OpenWnd(strURL){
         var objWnd = window.open(strURL,"InfoDetail","scrollbars=no,resizable=yes,height=400,width=700");
		 //,left=10,top=10
         objWnd.focus();
}

