// check if the browser is Navigator 3 or higher:
agent = navigator.userAgent;
browserVer = 0;
var bType = 0;
if( agent.substring(0, 7) == "Mozilla" )
{
  bType = 2;
  if( agent.indexOf("MSIE") > 0 )
  {
    bType = 1;
  }
  browserVer = parseInt(agent.substring(8, 9));
}

function greeting()
{
  var now = new Date()
  var t = now.getHours()

  if( t > 17 )
  {
    return "Good Evening!"
  }
  if( t > 11 )
  {
    return "Good Afternoon!"
  }
  if( t < 6 )
  {
    return "It is too early to be up!"
  }
  return "Good Morning!";
}

function email( user )
{
  document.write('<a href="mailto:' + user + '@' + 'avatar42.us">');
  document.write('<IMG SRC="/img/emailed.gif" ALIGN="middle" BORDER="0" alt="email">');
  document.write('</a>');
}

function popJmenu()
{
  if( browserVer > 3 )
  {
    // auto pop menu
    open('/jmenu.html', 'menu_win', 'height=400,width=150,screenX=0,screenY=0,resizable=yes,scrollbars=yes,status=yes');
    // this part only works with js 1.2
    // if all works this should this target for menu
    window.name = "menu_target";
  }
}

function popWin( url, height, width )
{
  if( height == 0 )
    height = 400;
  if( width == 0 )
    width = 400;
  if( browserVer > 3 )
  {
    // auto pop menu
    open(url, 'menu_win', 'height=' + height + ',width=' + width +
                          ',screenX=0,screenY=0,resizable=yes,scrollbars=yes,status=yes');
    // this part only works with js 1.2
    // if all works this should this target for menu
    window.name = "menu_target";
  }
}



