function slide(id, speed, width, height) {
	this.id = id;
	this.speed = speed ? speed : 1000;
	this.index = 0;
	this.width = width ? width : "";
	this.height = height ? height : "";
	this.style = "";
	this.message = "click here to find out more!";
	this.messages = new Array();
	this.urls = new Array();
	this.imgs = new Array();
	this.add = slide_add;
	this.show = slide_show;
}
function slide_add(url, img, msg) {
	var oImg = new Image();
	var l = this.urls.length;
	oImg.src = img;
	this.urls[l] = url;
	this.imgs[l] = oImg;
	if(msg) {
		this.messages[l] = msg;
	} else {
		this.message[l] = "";
	}
}
function slide_show() {
	var oImg = document.getElementById(this.id);
	if(!oImg) {
		this.index = Math.round(Math.random() * (this.imgs.length - 1));
		document.write('<img id="' + this.id
			+ '" title="' + this.message
			+ '" width="' + this.width + '" height="' + this.height
			+ '" style="width:' + this.width + '; height:' + this.height + ';'
			+ this.style + '">');

		oImg = document.getElementById(this.id);
		if(navigator.userAgent.indexOf("MSIE") > 0) {
			oImg.style.filter = "progid:DXImageTransform.Microsoft.Fade(duration=0.5)";
		}
	} else {
		this.index ++;
		if(this.index >= this.imgs.length) this.index = 0;
	}
	try {
		var smsg = this.imgs[this.index].src;
	} catch(e) {
		window.setTimeout(this.id + ".show()", 100);
		return;
	}

	if(navigator.userAgent.indexOf("MSIE") > 0) {
		oImg.filters.item(0).apply();
		oImg.src = this.imgs[this.index].src;
		oImg.filters.item(0).play();
	} else {
		oImg.src = this.imgs[this.index].src;
	}
	if(this.urls[this.index] != "") {
		oImg.onclick = function() {
			var obj = eval(this.id);
			window.open(obj.urls[obj.index]);
		}
		oImg.style.cursor = "pointer";
	} else {
		oImg.style.cursor = "default";
		oImg.onclick = null;
	}
	if(this.messages[this.index] && this.messages[this.index] != "") {
		oImg.title = this.messages[this.index];
	}

	window.setTimeout(this.id + ".show()", this.speed);
}