var   stay = false;
var   timeout = 200;
var   menu_id = '';
var   old_menu_id = '';

function showlyr(id) {
                document.getElementById(id).style['position'] = 'absolute';
                document.getElementById(id).style['display'] = 'block';
}

function hidelyr(id) {
                document.getElementById(id).style['display'] = 'none';
                document.getElementById(id).style['position'] = 'relative';
}


function watchit() {

   if (menu_id != '') {

      if (stay)
         showlyr(menu_id);
      else
         hidelyr(menu_id);

      if (old_menu_id != menu_id && old_menu_id != '')
         hidelyr(old_menu_id);

      old_menu_id = menu_id;
   }

   setTimeout('watchit()', 200);
}


function init() {
        if (document.getElementsByTagName ) {
                var allCells = document.getElementsByTagName('td');
                for (var i = 0; i < allCells.length; i++) {
                if (allCells.item(i).id == "mm" && allCells.item(i).name) {
                                allCells.item(i).onmouseover = function() {
                                   menu_id = this.name;
                                   stay = true;
                                }
                                allCells.item(i).onmouseout = function() { menu_id = this.name; stay = false; }
                               // alert(allCells.item(i).name);
                                document.getElementById(allCells.item(i).name).onmouseover = function () {stay = true;}
                                document.getElementById(allCells.item(i).name).onmouseout = function () {stay = false;}
                     }

                }
        } else { alert('b'); }

   setTimeout('watchit()', 1000);
}
