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 x = 0 ; x < Burst.Elements.length ; x++) {
			var elements = $$(Burst.Elements[x]);
			for ( var y = 0 ; y < elements.length; y++) {
				var container = elements[y];
				Burst.SetStyle( $(container), x );
			}
		}
	},
	
	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;
	},
	
	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;
	}
}
