// <![CDATA[
	function $(id) { return document.getElementById(id); }
	var ninjaShow = {
		slides : [],
		image_id : "image",
		current_slide : -1,
		directory_prefix : "",
		addSlides : function(theSlides) {
			if ( theSlides.length > 0 ) {
				var tmp;
				for ( var i = 0; i < theSlides.length; i++) {
					this.slides.push(theSlides[i]);
					tmp = new Image(0,0);
					tmp.src = this.directory_prefix + theSlides[i];
				}
			}
		},
		prev : function() {
			if ( this.current_slide <= 0 ) {
				this.current_slide = this.slides.length - 1;
			} else {
				this.current_slide -= 1;
			}
			$(this.image_id).src = this.directory_prefix + this.slides[this.current_slide];
		},
		next : function() {
			if ( this.current_slide >= this.slides.length - 1 ) {
				this.current_slide = 0;
			} else {
				this.current_slide += 1;
			}
			$(this.image_id).src = this.directory_prefix + this.slides[this.current_slide];
		},
		current : function() {
			return this.slides[current_slide];
		},
		show : function(img) {
			$(this.image_id).src = (this.directory_prefix ? this.directory_prefix : '') + img;
		},
		handleKeyPress : function(e) {
			var code;
			if (!e) var e = window.event;
			if (e.keyCode) code = e.keyCode;
			else if (e.which) code = e.which;
			if ( code == 37 || code == 40 ) {
				this.prev();
			} else {
				if ( code == 39 || code == 38 ) this.next();
			}
		}
	}
	window.onload = function() {
		document.body.onload = ninjaShow.next();
	}
// ]]>
