Background images depending on screen resolution

Purpose: Don't you hate when you've developed a web site and it looks good on your 800 x 600 resolution screen settings but when somebody with 1024 x 768 resolution views it the background looks crappy? Well if you do, you are going to love this script I have created to solve just that annoying problem.

Need to know: The only variables you should change are the image sources. If you want to make a background for every resolution there is, then you can add more else if statements. If you don't have any clue what that means, then just leave this script alone other than changing the image sources.

<script language="JavaScript" type="text/javascript">
   var scrh = screen.Height;
   var scrw = screen.Width;
   if ( scrh == "600" && scrw == "800" )
   {
        document.write("<body background='regbg.jpg'>");
   }
   else
   {
        document.write("<body background='largebg.jpg'>");
   }
</script>

However, the background could be changed using server-side code in web sites such as ASP, ASP.NET, JSP, Cold Fusion, PHP, and others.