Random question

I would like a backgroundpic to fade in and out. To make it mysterious I would like this to occour in random time. How do I do this the best way?

thx