Using RegEx to look for images in a particular URL location...
The following code sets the variable "url" to be initialized to a single image file location relative to where this script runs and from there, simply fires off a function if it exists or doesn't:
var url = 'images/slideshow/fall1.png';
alert('No image found.');