var now=new Date();
var hour = now.getHours();
if (hour < 12) 
  {document.write("Good Morning!");}
if (hour >=12 && hour < 18 )
  {document.write("Good Afternoon!");}
if (hour >=12 && hour >= 18 )
  {document.write("Good Evening!");}