var Burst = {
	__TextParameter: 't',
	__SizeParameter: 's',
	ApplicationPath: null,
	HttpHandler: null,
	Elements: [],
	OffsetTop: 0,
	OffsetLeft: 0,
	Size: 12,
	Initialise: function() {
		Event.observe(window, 'load', this.Replace);
	},

	Replace: function() {
		for ( var a = 0; a < Burst.Elements.length ; a++ ) {
			var elements = $$(Burst.Elements[a]);
			for ( var y = 0 ; y < elements.length; y++) {
				var container = elements[y];
				Burst.SetStyle( $(container),  a);
			}
		}
	},



	SetStyle: function(container, index) {
		/*var url = 'url(' + this.ApplicationPath + this.HttpHandler[index] + this.CreateQueryString(this.__TextParameter, escape(container.innerHTML), this.__SizeParameter, this.Size) + ')';
		container.style.backgroundRepeat = 'no-repeat';

		container.style.backgroundPosition = this.OffsetLeft + 'px ' + this.OffsetTop + 'px';

		container.style.backgroundImage = url;
		*/
		var date = new Date();
		
	            
		var img = new Image();//document.createElement('img');
		img.src = this.ApplicationPath + this.HttpHandler[index] + this.CreateQueryString(this.__TextParameter, escape(container.innerHTML), this.__SizeParameter, this.Size);
		img.alt = container.innerHTML;
		
		container.update('');
		container.appendChild(img);
	},



	CreateQueryString: function() {
		var query = "?";
		var args = this.CreateQueryString.arguments;
		for ( var x = 0; x < args.length; x+=2) {
				query += args[x] + '=' + args[x+1] + '&'; 
		}                      

		return query;
	}
}
