   var OutColorsByLevel = Array( "#777777", "#777777", "#777777", "#777777", "#777777" );
   var OvrColorsByLevel = Array( "#000000", "#990033", "#990033", "#990033", "#990033" );
   curLMenu = '';

   function LMPreopen() {
       var srow = document.getElementById( curLMenu );
       if ( srow ) {
            srow.cells[1].childNodes[0].style.visibility = 'visible';
           // open upto
           var crow = srow;
           var tbl = srow.parentNode.parentNode;
           while( tbl.id != 'LeftMenuRoot' ) {
              tbl.style.display = 'block';
              crow = tbl.parentNode.parentNode;
              crow = crow.parentNode.rows[crow.rowIndex - 1];
              crow.cells[1].childNodes[0].src = 'imgs/down_arr.png';
              crow.cells[1].childNodes[0].style.visibility = 'visible';
              crow.className = 'lmos';
              crow.cells[0].childNodes[0].style.color = '#000000';
              tbl = crow.parentNode.parentNode;
//              alert( tbl.id );

           }
           // open down
           var crow = srow.parentNode.rows[srow.rowIndex + 1];
           if ( crow && crow.cells[0].colSpan > 1 ) {
               crow.cells[0].childNodes[0].style.display = 'block';
           }
       }
   }

   function LMEvnt( evnt, el, level ) {
       if ( ! evnt ) {
           evnt = event;
       }

       if ( el ) {
           if ( evnt.type == 'mouseout' ) {
               if ( el.className.substr(el.className.length-1,1) != 's' ) {
                   el.style.color = OutColorsByLevel[level];
                   el.cells[1].childNodes[0].style.visibility = 'hidden';
                   el.cells[0].childNodes[0].style.color = el.style.color;
               }
           } else if ( evnt.type == 'mouseover' ) {
               if ( el.className.substr(el.className.length-1,1) != 's' ) {
                   el.style.color = OvrColorsByLevel[level];
                   el.cells[1].childNodes[0].style.visibility = 'visible';
                   el.cells[0].childNodes[0].style.color = el.style.color;
               }
           } else if ( evnt.type == 'click' ) {
               curLMenu = el.id;
               // sublevel
               var nrow = el.parentNode.rows[el.rowIndex + 1];
               if ( nrow && nrow.cells[0].colSpan > 1 ) {
                   if ( nrow.cells[0].childNodes[0].style.display != ''  &&  nrow.cells[0].childNodes[0].style.display != 'none' ) {
                       nrow.cells[0].childNodes[0].style.display = 'none';
                   } else {
                       nrow.cells[0].childNodes[0].style.display = 'block';
                   }
               }
               var ar = curLMenu.split(';');
               if ( ar[0] != ''  &&  ar[1] != '' ) {
                   document.forms[0].cmd.value =  'fromlm;' + curLMenu;
//                   document.forms[0].submit();
//                   alert( el );

               }
           }

       }
   }
