var now = new Date();
var hours = now.getHours();
var psj=0;

//18-19 night
if (hours > 17 && hours < 20){
document.write('<style type="text/css">body{background:url(http://www.rapidpg.com.my/images/bg.jpg) repeat-x top #68ccff}"></style><div id="bgImage-content"><img src="http://www.rapidpg.com.my/images/weather/evening-small.jpg" width="100%" height="150px"></div>')
}

//20-21 night
if (hours > 19 && hours < 22){
document.write('<style type="text/css">body{background:url(http://www.rapidpg.com.my/images/bg-night.jpg) repeat-x top #749aad}"></style><div id="bgImage-content"><img src="http://www.rapidpg.com.my/images/weather/night-small.jpg" width="100%" height="150px"></div>')
}

//22-4 night
if (hours > 21 || hours < 5){
document.write('<style type="text/css">body{background:url(http://www.rapidpg.com.my/images/bg-night.jpg) repeat-x top #749aad}"></style><div id="bgImage-content"><img src="http://www.rapidpg.com.my/images/weather/night-small.jpg" width="100%" height="150px"></div>')
}

//9-17 day
if (hours > 8 && hours < 18){
document.write('<style type="text/css">body{background:url(http://www.rapidpg.com.my/images/bg.jpg) repeat-x top #68ccff}"></style><div id="bgImage-content"><img src="http://www.rapidpg.com.my/images/weather/day-small.jpg" width="100%" height="150px"></div>')
}

//7-8 day
if (hours > 6 && hours < 9){
document.write('<style type="text/css">body{background:url(http://www.rapidpg.com.my/images/bg-morning.jpg) repeat-x top #a3defe}"></style><div id="bgImage-content"><img src="http://www.rapidpg.com.my/images/weather/morning-small.jpg" width="100%" height="150px"></div>')
}

//5-6 day
if (hours > 4 && hours < 7){
document.write('<style type="text/css">body{background:url(http://www.rapidpg.com.my/images/bg-morning.jpg) repeat-x top #a3defe}"></style><div id="bgImage-content"><img src="http://www.rapidpg.com.my/images/weather/morning-small.jpg" width="100%" height="150px"></div>')
}