Time script help

i wrote this for a GTA site sticking with the day and night cycle they use in the game.

<script language="JavaScript" type="text/javascript">

day=new Date()
x=day.getHours()
if(x>=0 && x<12) {document.write('<body bgcolor="111111">')}else
if(x>=12 && x<20) {document.write('<body bgcolor="222222">')}else
if(x>=20 && x<0) {document.write('<body bgcolor="333333">')}

</script>

you can edit it pretty much how you like but i need to add this,


<style type="text/css">
<!--
table.topnav {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; border-top:1 solid #FFFFFF; border-bottom:1 solid #FFFFFF; line-height:10pt;}
table.nav {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; line-height:10pt;}
td {font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 8pt; line-height:10pt;}
a:link {color:#630707; font-weight:none; text-decoration:none; line-height:10pt;}
a:visited {color:#630707; font-weight:none; text-decoration:none; line-height:10pt;}
a:active {color:#630707; font-weight:none; text-decoration:none; line-height:10pt;}
a:hover {color:#630707; font-weight:none; text-decoration:underline; line-height:10pt;}
body {font-family:Verdana, Arial, Helvetica, sans-serif; font-size:8pt; line-height:10pt;}
-->
</style>

that is my control script i have made, it controls links scroll bars etc etc

but how do i add that into this part of my day/night script

{document.write('<!!!IN HERE!!!">')}

thanks for any help!:nerd:

1.add the “body bgcolor” into the css (3 of 'em)
2.call a different linked css file for each condition

thanks alot:crazy: