I’d extend the snippet and instead have it set two placeholders... with some fancy naming conventions and a second location for the body part, you could set a background image on the upper-right of the content section as well. Make sense? (Someone with better coding skills than I will need to extend it to setting the multiple placeholder bits. You could also exclude images in the array that include "-bottom" in them on this line, maybe by changing the code:
if ( $file != '.' && $file != '..' && $is_image && strpos($file, '.') !== 0 )
The goal would be to exclude the rand1-bottom.jpg/png from the mix where rand1.jpg/png would be the top half. Then just move the snippet to the top and have it set a placeholder that is the image name with the file extension stripped off. The placeholder in your CSS for the top image would be:
url([+random+].png)
And for the main content part:
url([+random+]-bottom.png)