function SlideShow(name){
	this.name = name;
	this.slideShowSpeed = 5000;
	this.crossFadeDuration = 2;
	this.j = 0;
	this.p = 0;
	this.preLoad = new Array();
	this.add = function(src,alt,url,target){
		var pos = this.preLoad.length;
		this.preLoad[pos] = new Array();
		this.preLoad[pos][0] = new Image();
		this.preLoad[pos][0].src = src;
		this.preLoad[pos][1] = alt;
		this.preLoad[pos][2] = url;
		this.preLoad[pos][3] = target;
		this.p++;
	}

	this.setCrossFadeDuration = function(crossFadeDuration){
		this.crossFadeDuration = crossFadeDuration;
	}
	this.setSlideShowSpeed = function(slideShowSpeed){
		this.slideShowSpeed = slideShowSpeed;
	}
	this.slide = function(){
		var img = document.getElementById(this.name+'_I');
		var a = document.getElementById(this.name+'_A');
		if (document.all) {
			img.style.filter="blendTrans(duration="+this.crossFadeDuration+")";
			img.filters.blendTrans.Apply();
		}
		img.src = this.preLoad[this.j][0].src;
		img.alt = this.preLoad[this.j][1];
		if (a){
			a.title = this.preLoad[this.j][1];
			a.href = this.preLoad[this.j][2];
			a.target = this.preLoad[this.j][3];
		}
		if (document.all) {
			img.filters.blendTrans.Play();
		}
		this.j++;
		if (this.j > (this.p - 1)) this.j = 0;
		var t = setTimeout(this.name+'.slide()', this.slideShowSpeed);
	}
}
