var supersleight	= function() {
	
	var root = false;
	var applyPositioning = true;
	
	// Path to a transparent GIF image
	var shim			= 'pixel.gif';
	
	// RegExp to match above GIF image name
	var shim_pattern	= /x\.gif$/i;
	
	
	
	var fnLoadPngs = function() { 
		if (root) {
			root = document.getElementById(root);
		}else{
			root = document;
		}
        
		for (var i = root.all.length - 1, obj = null; (obj = root.all[i]); i--) {

			// background pngs
			 if ((obj.currentStyle.backgroundImage.match(/\.gif\"\)$/i) == null) && (obj.currentStyle.backgroundImage.match(/\.jpg\"\)$/i) == null) && (obj.currentStyle.backgroundImage.match(/\.jpeg\"\)$/i) == null) && (obj.currentStyle.backgroundImage != "none")) {
				bg_fnFixPng(obj);
			}	
			
			
			// image elements
			if ((obj.tagName=='IMG' && obj.src.match(/\.gif$/i) == null) && (obj.tagName=='IMG' && obj.src.match(/\.jpg$/i) == null) && (obj.tagName=='IMG' && obj.src.match(/\.jpeg$/i) == null)){
			    			
    
			       el_fnFixPng(obj);
			    
			}
			// apply position to 'active' elements
			
			
			
		


			
		}

	};

	var bg_fnFixPng = function(obj) {
		var mode = 'scale';
		var bg	= obj.currentStyle.backgroundImage;
		
		var src = bg.substring(5,bg.length-2);
		if (obj.currentStyle.backgroundRepeat == 'no-repeat') {
			mode = 'crop';
		}
		
		


		obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', enabled='true', sizingMethod='" + mode + "')";
		
		//obj.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', enabled='true', sizingMethod='fit')";
		
		
		obj.style.backgroundImage = 'url('+shim+')';
		
	};

	var el_fnFixPng = function(img) {
	    
		var src = img.src;
		img.style.width = img.width + "px";
		img.style.height = img.height + "px";
		img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='scale')";
		img.src = shim;
	};
	
	var addLoadEvent = function(func) {
		var oldonload = window.onload;
		if (typeof window.onload != 'function') {
			window.onload = func;
		} else {
			window.onload = function() {
				if (oldonload) {
					oldonload();
				}
				func();
			};
		}
	};
	
	return {
	    Filtrar: function (objeto)
	    {
	        el_fnFixPng(objeto);
	    },
		init: function() { 
		    
			addLoadEvent(fnLoadPngs);
		},
		
		limitTo: function(el) {
			root = el;
		},
		
		run: function() {
			fnLoadPngs();
		}
	};
}();




