var chapchaLoader = new Class({
 
	options: {
		output: 'insert_captcha',
	},
 
	// initialize: function(url)
	initialize: function()
	{
		this.results = [];
		// this.search = new Ajax(url, {onComplete:
		// this.loadResults.bind(this)})
	},
 
	loadResults: function(response)
	{
		this.results = Json.evaluate(response);
	},
 
	loadImage: function()
	{
		var self = this;
		new Asset.image(Constants.pathDomain+"/captcha/index/"+Math.random(), 
			{ 
				// id:"insert_captcha",
				onload: function()
				{
					// alert("loaded");
					// $(self.options.output).replaceWith(this);
				$(self.options.output).empty();
					$(self.options.output).adopt(this);
					// (function() { self.loadImage(); }).delay(10);
				}
			}
		);
	}, 
	refresh : function(){
		this.loadImage();
	}

 
});
 
// myLoader = new ImagesLoader('results.php');
// myLoader.search.request();
