//function slide(src, link, text, target, attr)
function slide()
{
	// src, link, text, target, attr
	this.src = '';
	this.link = '';
	this.text = '';
	this.text_title = '';
	this.target = '';
	this.attr = '';
	this.timeout = 0; // 3000;
	
	this.image = new Image();
	
	this.loaded = false; // Flag to tell when load() has already been called

	this.load = function() {
		// This method loads the image for the slide
		if (!document.images) { return; }
		if (!this.loaded) {
			this.image.src = this.src;
			this.loaded = true;
		}
	}

	this.hotlink = function()
	{
		var mywindow; // This method jumps to the slide's link. If a window was specified for the slide, then it opens a new window.

		if (!this.link) return; // If this slide does not have a link, do nothing
		
		if (this.target)
		{
			if (this.attr)
			{
				mywindow = window.open(this.link, this.target, this.attr);
			}
			else
			{
				mywindow = window.open(this.link, this.target);
			}

			if (mywindow && mywindow.focus) // Pop the window to the front
				mywindow.focus();
		} else {
			location.href = this.link; // Open the link in the current window
		}
	}
}
