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"><img src="http://www.rapidpg.com.my/images/weather/evening.jpg" width="100%" height="100%"></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"><img src="http://www.rapidpg.com.my/images/weather/night.jpg" width="100%" height="100%"> </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"><img src="http://www.rapidpg.com.my/images/weather/night.jpg" width="100%" height="100%"> </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"><img src="http://www.rapidpg.com.my/images/weather/day.jpg" width="100%" height="100%"></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 #749bae}"></style><div id="bgImage"><img src="http://www.rapidpg.com.my/images/weather/morning.jpg" width="100%" height="100%"></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 #749bae}"></style><div id="bgImage"><img src="http://www.rapidpg.com.my/images/weather/morning.jpg" width="100%" height="100%"></div>')
}