function SimpleSlideshow()
{
	// Simple slideshow (no fade, slide or other transitions).
	
	this.initialize = function(imageDir, filenames, interval, random_display) {
		this.imageDir = (imageDir == null) ? "/files/images/slideshow" : imageDir;
	
		this.imageArray = new Array();
		for (i = 0; i < filenames.length; i++) {
			this.imageArray[i] = new ss.imageItem(imageDir + "/" + filenames[i]);
		}
		this.totalImages = this.imageArray.length;
		this.interval = (interval == null) ? 1800 : interval;
		this.random_display = (random_display == null) ? 0 : 1;
		this.imageNum = 0;
		this.timerID = 0;
	}
	
	
	this.imageItem = function(image_location) {
		this.image_item = new Image();
		this.image_item.src = image_location;
	}
	
	
	this.get_ImageItemLocation = function(imageObj) {
		return(imageObj.image_item.src)
	}
	
	
	this.randNum = function(x, y) {
		var range = y - x + 1;
		return Math.floor(Math.random() * range) + x;
	}
	
	
	this.getNextImage = function() {
		if (this.random_display) {
			this.imageNum = this.randNum(0, this.totalImages-1);
		} else {
			this.imageNum = (this.imageNum+1) % this.totalImages;
		}
		var new_image = this.get_ImageItemLocation(this.imageArray[this.imageNum]);
		return(new_image);
	}
	
	
	this.getPrevImage = function() {
		this.imageNum = (this.imageNum-1) % this.totalImages;
		var new_image = this.get_ImageItemLocation(imageArray[this.imageNum]);
		return(new_image);
	}
	
	
	this.prevImage = function(place) {
		var new_image = this.getPrevImage();
		document[place].src = new_image;
	}
	
	
	this.switchImage = function(place, objName) {
		var new_image = this.getNextImage();
		document[place].src = new_image;
		var recursStr = objName+'.switchImage("'+place+'","'+objName+'")';
		this.timerID = setTimeout(recursStr, this.interval);
	}
}