var  timerId=0 ;



function clearTimer() {
  if (timerId!=0) {
    clearTimeout(timerId); timerId=0; }}



function startTimer() {
  clearTimer(); timerId=setTimeout('timerId=0;hideMenus()',200); }



function showMenu(menuNum) {
  clearTimer(); hideMenus();
  document.getElementById('menu_'+menuNum).style.display=""; }



function hideMenus() {

  var  i=1 ;

  while (document.getElementById('menu_'+i)) {
    document     .getElementById('menu_'+i).style.display="none";
    i++; }}



function hiLite(theOption) {
  clearTimer();
  document.getElementById('opt_'+theOption).style.background='#D4DABC'; }



function unLite(theOption) {
  startTimer();
  document.getElementById('opt_'+theOption).style.background='#ECF1D1'; }



function optClick(theOption) {
  unLite(theOption); clearTimer(); hideMenus();
  alert('You clicked option '+theOption.toUpperCase()+'.  '+
  'This code should actually do something in response to that.'); }