This script searches the current directory for a folder named "img". If found, it grabs a random image in the img folder and displays it on your page. If not found, it goes down a directory level and searches for the img folder again until it finds one.