Specifications
Chapter 19238
 // Now determine which photo to show based on whether it’s a workday or a 
 // weekend; what time it is; and, if it’s a time and day when Kent is 
 // working, what platform the user is on.
 //If it’s not Sunday
 if (day != 0){
 //And it’s between 10am and noon, inclusive
 if (SFhour >= 10 && SFhour <= 12){
 imageRef = "images/kent_tiredAndIrritated.jpg";
 //Or else it’s between 1pm and 3pm, inclusive
 }else if (SFhour >= 13 && SFhour <= 15){
 imageRef = "images/kent_hungry.jpg";
 //Or else it’s between 4pm and 5pm, inclusive
 }else if (SFhour >= 16 && SFhour <= 17){
 //If user is on Mac, show Kent working on Mac
 if (platform == "MacPPC"){ 
 imageRef = "images/kent_gettingStartedOnMac.jpg";
 //If user is on Win, show Kent working on Win
 }else{
 imageRef = "images/kent_gettingStartedOnWin.jpg";
 }
 //Or else it’s after 6pm but before the stroke of midnight
 }else if (SFhour >= 18){
 //If it’s Saturday
 if (day == 6){
 imageRef = "images/kent_dancing.jpg";
 //If it’s not Saturday, check the user’s platform
 }else if (platform == "MacPPC"){ 
 imageRef = "images/kent_hardAtWorkOnMac.jpg";
 }else{
 imageRef = "images/kent_hardAtWorkOnWin.jpg";
 }
 }else{
 imageRef = "images/kent_sleeping.jpg";
 }
 //If it’s after midnight and before 10am, or anytime on Sunday
 }else{
 imageRef = "images/kent_sleeping.jpg";
 }
 return imageRef;
}
</script>
</head>
<body>
</body>
</html>










