
function tm_over(id)
{
  if (!cur_id || cur_id != id)
  {
    if (cur_id) 
    {
      document.getElementById('tm'+cur_id).className='';
      if (el = document.getElementById('dropmenu'+cur_id))
      {
        el.style.display = 'none';
        //document.getElementById('dropmenu').style.display = 'none';
      }
    }
    document.getElementById('tm'+id).className='here';
    if (el = document.getElementById('dropmenu'+id))
    {
      el.style.display = '';
      //document.getElementById('dropmenu').style.display = '';
    }
    cur_id = id;
  }
  if (window.tm1) clearTimeout(window.tm1);
  //window.tm1 = setTimeout('tm_default()', 500);
}
function tm_out(id)
{
  if (window.tm1) clearTimeout(window.tm1);
  window.tm1 = setTimeout('tm_default()', 2000);
}
function tm_default()
{
  if (cur_id && def_id && cur_id == def_id) return;
  if (cur_id)
  {
    document.getElementById('tm'+cur_id).className='';
    if (el = document.getElementById('dropmenu'+cur_id))
    {
      el.style.display = 'none';
      //document.getElementById('dropmenu').style.display = 'none';
    }
    cur_id = 0;
  }
  if (def_id)
  {
    document.getElementById('tm'+def_id).className='here';
    if (el = document.getElementById('dropmenu'+def_id))
    {
      el.style.display = '';
      //document.getElementById('dropmenu').style.display = '';
    }
    cur_id = def_id;
  }
}


