
var months = new Array( "jan","feb","mar","apr","may","jun",
						"jul","aug","sep","oct","nov","dec" )
var today = new Date();

function gotoCurrentMonth()
{
  var currentMonth  = today.getMonth();
	var l = months[currentMonth] + ".html";
	
	location = l;
}

function gotoMonth( desiredMonth )
{
 	var l = months[desiredMonth] + ".html";
	
	location = l;
}

var oldMenu;
var popTimer;

function menu_action(src, showMenu)
{
  if (showMenu == true)
  {
    // Clear our timer
    window.clearTimeout(popTimer);

    // Check for menu waiting to be hidden
    if ((oldMenu != null))
    {
      close_menu();
    }

    src.origColor=src.style.backgroundColor;
    src.style.backgroundColor="#669999";

    // Pop up the new menu
    // Our hierarchy is <TD>
    //                   <text>
    //                   <div>
    var menu = src.firstChild.nextSibling;
    menu.style.visibility = "visible";
    menu.style.left = src.offsetLeft;
    menu.style.top = (src.offsetTop + src.offsetHeight + 2);
    }
    else
    {
      // Set up our timer for closing this menu
      oldMenu = src;
      popTimer = window.setTimeout('close_menu()', 400);
    }
}

function highlight_menu(e, highlight)
{
  var src = get_src(e);
  e.cancelBubble = true;

  if ((src.tagName == "TD") || (src.nodeName == "#text"))
  {
    if (highlight == true)
    {
      window.clearTimeout(popTimer);
      src.origColor=src.style.backgroundColor;
      src.style.backgroundColor="#333366";
    }
    else
    {
      popTimer = window.setTimeout('close_menu()', 400);
      src.style.backgroundColor=src.origColor;
    }
  }
}

function close_menu()
{
  oldMenu.style.backgroundColor= oldMenu.origColor;
  oldMenu.firstChild.nextSibling.style.visibility = "hidden";
  oldMenu = null;
}

function get_src(event_obj)
{
  var src;
  // Fork for Netscape event handling
  if (navigator.appName == "Netscape")
    src = event_obj.target;
  else
    src = event_obj.srcElement;
  return src;
}