Using IF statments may be handy if you have only a few forums, however, why add more code than you really need? Using the $forumid variable and the background CSS attribute, you can do the exact same thing with even less

.
PHP Code:
style="background: #FFFFFF url("./path/to/images/$forumid.gif");
This basically enters the forum id as the name of an image and calls it from a directory of your choosing. You can limit this to simply categories, or have a background for every forum using this, depending on where you place the coding.
Simply create a directory, fill in the path, make sure the images are named accordingly for the forums and insert/save the code to the template.