Greeting Based On Time Of Day



Put this code where ever you want it in your page.


<!--This Script was found at John's World.-->

<!--To find this script and many more just go to-->

<!--http://www.johnsworld.com/javascript-->



<script language="JavaScript">

<!-- Hide the script from old browsers --

  today = new Date()

    if(today.getMinutes() < 10){ 

        pad = "0"}

    else  

    pad = "";

  document.write    ;if((today.getHours() <=6) && (today.getHours() >=9)){

document.write("Good Morning")

}

   if((today.getHours() >=10) && (today.getHours() <=11)){

document.write("Good Morning! ")

}

    if((today.getHours() >=12) && (today.getHours() <=16)){

document.write("Good Afternoon")

}    

    if((today.getHours() >=17) && (today.getHours() <=23)){

document.write("Good Evening!")

}

    if((today.getHours() >=0) && (today.getHours() <=4)){

document.write("You're up late night crawler!")

}

    if((today.getHours() >=4) && (today.getHours() <=6)){

document.write("Wow! You're up early!!")

}

// -- End Hiding Here -->

</script>