home *** CD-ROM | disk | FTP | other *** search
/ Chip 2001 October / Chip_2001-10_cd1.bin / internet / ukazky / 26_soubory / vyber_soubory / MenuHandlerIE.js < prev    next >
Text File  |  2001-08-19  |  721b  |  30 lines

  1. var lastObj;
  2.  
  3. function FClick() {
  4.   var obj=window.event.srcElement;
  5.   var objChildren;
  6.   
  7.   if (obj.className=='menu-kategorie')
  8.     { objChildren=getChildbyClass(obj.children);
  9.       if (lastObj!=objChildren)
  10.         { if (lastObj)
  11.             lastObj.style.display='none';
  12.           lastObj=objChildren;
  13.         }
  14.         if ( (objChildren.style.display=='none') || (objChildren.style.display=='') )
  15.           {
  16.             objChildren.style.display='block';
  17.             }
  18.         else
  19.             objChildren.style.display='none';
  20.     }
  21. }
  22.  
  23. function getChildbyClass(aChildren)  {
  24.   var i;
  25.   for (i=0;i<aChildren.length;i++)
  26.     { if (aChildren(i).className=='menu-podkategorie')
  27.             return (aChildren(i));
  28.     }
  29. }
  30.