function currentTime()
{
  var today = new Date();
  var hrs = today.getHours();

  if ((hrs >= 5) && (hrs <= 11))
    document.write("Good Morning");
  else if ((hrs >= 12) && (hrs <= 16))
    document.write("Good Afternoon");
  else if ((hrs >= 17) && (hrs <= 23))
    document.write("Good Evening");
  else if( hrs == 0 )
    document.write("Happy Midnight");
  else
    document.write("Go to BED");

  document.write("!!<br>");
  document.write(today.toLocaleString());
}


