randomly changing a css header image

If I’ve got a background image defined in my style sheet for a header div, what’s the easiest way to randomise it?

Obviously I can’t pass a var to the css file so I’m guessing I need to point the bg image path to a randomiser php script or similar? anyone done this before?