// JavaScript Document

Element.extend({
	fix: function(){
		if(!window.ie6)
			return this;
		var img;
		var baseurl=document.getElement('base').getAttribute('href');		
		if(this.getTag()=='img'){
			img = "'"+baseurl+this.getProperty('src')+"'";
			this.setProperty('src', baseurl + 'null.gif');
		}else{
			var bg = this.getStyle('background-image');
			if(bg && bg!='none')
				img = bg.match(/\(([^)]+)\)/)[1];
		}
		if(img){
			if(this.getStyle('display')=='inline' && !['input', 'textarea', 'button'].contains(this.getTag()))
				this.setStyles({
					'display': 'block',
					'width': this.getStyle('width')
				});
			this.setStyles({
				'background': '',
				'filter': "progid:DXImageTransform.Microsoft.AlphaImageLoader(enabled='true', src="+img+", sizingMethod='scale')"
			});
		}
		return this;
	}
});
 
 
if(window.ie6)
	window.addEvent('domready', function(){
		$$('.png24').fix();
	});
