var PreloadThumbImage = Ext.extend( Ext.util.Observable, {
	image: null,
	id: 0,
	name: '',
	
	constructor: function( config )
	{
		this.id = config.id;
		this.name = config.name;
		this.addEvents( 'load' );
		
		Ext.DomHelper.append( 'item-' + this.id, {
			tag: 'img',
			id: 'image-' + this.id,
			style: 'background:url(/wca/js/resources/images/default/shared/large-loading.gif) 32px no-repeat #fff',
			src: '/s.gif',
			alt: this.name,
			title: this.name
		});
		
		Ext.get( 'image-' + this.id ).on( 'load', this.onload, this );
	
		PreloadThumbImage.superclass.constructor.apply( this, arguments );
	},
	
	onload: function()
	{
	},
	
	loadImage: function( filepath )
	{
		Ext.get( 'image-' + this.id ).dom.src = filepath;
	}
});