function DisplayBanner(canvasId, speed, image, text, direction, callback)
{
	this.canvasId = canvasId;
	this.canvasElement = document.getElementById(this.canvasId);
	if (image != null)
	{
		this.image = new Image();
		this.image.src = image;
	}
	else
	{
		this.image = null;
	}
	this.callback = null;
	this.text = text;
	this.animationSpeed = speed;
	this.currentPosition = 0;
	this.viewX = parseInt($('#' + canvasId).css('width').replace('px', ''));
	this.viewY = parseInt($('#' + canvasId).css('height').replace('px', ''));
	this.direction = direction; // can be up/down (0), left/right (1)
	
	this.startAnimation = function ()
	{
		var context = this.canvasElement.getContext('2d');
		var thisObj = this;
	//	var centerX = Math.floor(this.viewX / 2);
		var centerY = Math.floor(this.viewY / 2);
		
		this.canvasElement.width = this.viewX;
		this.canvasElement.height = this.viewY;
	    context.clearRect(0, 0, this.viewX, this.viewY);
	    if (this.image != null)
	    {
	    	context.drawImage(this.image, 0, 0, this.viewX, this.viewY);
	    }
    	context.textBaseLine = 'bottom';
    	context.font = "bold italic 24px sans-serif";
    	context.fillText(this.text, this.currentPosition, centerY);
    	
		setTimeout(function() { thisObj.animate();}, thisObj.animationSpeed);
	};
	
	this.animate = function ()
	{
		var context = this.canvasElement.getContext('2d');
		var centerY = Math.floor(this.viewY / 2);

		this.currentPosition += Math.floor(this.viewX / 20);
	    context.clearRect(0, 0, this.viewX, this.viewY);
	    if (this.image != null)
	    {
	    	context.drawImage(this.image, 0, 0, this.viewX, this.viewY);
	    }
    	context.font = "bold italic 36px sans-serif";
    	
    	// DWM - it would be good to be able to spiral the text across the screen i.e. rifle it.  If not then have it trend along
    	// a sine or cosine wave path.
    	context.fillText(this.text, currentPosition, centerY);
    	
    	if (this.currentPosition < this.viewX - 255)
    	{
    		var thisObj = this;
    		setTimeout(function() { thisObj.animate();}, thisObj.animationSpeed);
    	}
    	else
    	{
    		// Done issue callback
    		if (this.callback != null)
    		{
    			this.callback();
    		}
    	}
	};
	
	return this;
}
