var blnSubMenuClicked = false;
var strMenuDivId = '';
var intMillisecondsToDelay = 500;
var intTimerID = null;

//////////////////////////////////////
function MenuNavbarMouseOver(strMenuId)
{
  if (intTimerID != null)
  {
    clearTimeout(intTimerID);
    MenuNavbarMouseOutTasks();
  }
  var objTD = document.getElementById('td' + strMenuId);
  var objAnc = document.getElementById('anc' + strMenuId);
  var objDiv = document.getElementById('div' + strMenuId);

  objTD.style.backgroundColor = '#000000';
  objTD.style.color = '#ffffff';
  objTD.style.cursor = 'pointer';
  objAnc.style.color = '#ffffff';
  objDiv.style.visibility = 'visible';
}

/////////////////////////////////////
function MenuNavbarMouseOut(strMenuId)
{
  strMenuDivId = strMenuId;
  intTimerID = setTimeout('MenuNavbarMouseOutTasks()', intMillisecondsToDelay);
}

/////////////////////////////////
function MenuNavbarMouseOutTasks()
{
  var strMenuId = strMenuDivId;
  var objTD = document.getElementById('td' + strMenuId);
  var objAnc = document.getElementById('anc' + strMenuId);
  var objDiv = document.getElementById('div' + strMenuId);

  objTD.style.backgroundColor = '#FFBE82';
  objTD.style.color = '#000000';
  objTD.style.cursor = 'auto';
  objAnc.style.color = '#000000';
  objDiv.style.visibility = 'hidden';
}

/////////////////////////////////////////
function MenuNavbarSubMouseOver(strMenuId)
{
  var objTD = document.getElementById('td' + strMenuId);
  var objAnc = document.getElementById('anc' + strMenuId);

  objTD.style.backgroundColor = '#000000';
  objTD.style.color = '#ffffff';
  objTD.style.cursor = 'pointer';
  objAnc.style.color = '#ffffff';
}

/////////////////////////////////////////
function MenuNavbarSubMouseOut(strMenuId)
{
  var objTD = document.getElementById('td' + strMenuId);
  var objAnc = document.getElementById('anc' + strMenuId);

  objTD.style.backgroundColor = '#FFFF99';
  objTD.style.color = '#000000';
  objTD.style.cursor = 'auto';
  objAnc.style.color = '#000000';
}
