var supersleight	= function() {
	
	var root = false;
	var applyPositioning = true;
	
	// Path to a transparent GIF image
	var shim			= 'img/x.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(/\logo.png/i) !== null) {
				bg_fnFixPng(obj);
			}
			// image elements
			if (obj.tagName=='IMG' && obj.src.match(/\logo.png$/i) !== null){
				el_fnFixPng(obj);
			}
			// apply position to 'active' elements
			if (applyPositioning && (obj.tagName=='A' || obj.tagName=='INPUT') && obj.style.position === ''){
				obj.style.position = 'relative';
			}
		}
	};

	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 + "', sizingMethod='" + mode + "')";
		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 {
		init: function() { 
			addLoadEvent(fnLoadPngs);
		},
		
		limitTo: function(el) {
			root = el;
		},
		
		run: function() {
			fnLoadPngs();
		}
	};
}();


function bw_check()
  {
  is_major      = parseInt(navigator.appVersion);
  this.nver     = is_major;
  this.ver      = navigator.appVersion;
  this.agent    = navigator.userAgent;
  this.dom      = document.getElementById ? 1 : 0;
  this.opera    = window.opera ? 1 : 0;

  this.ie5      = (this.ver.indexOf("MSIE 5")>-1 && this.dom && !this.opera) ? 1 : 0;
  this.ie6      = (this.ver.indexOf("MSIE 6")>-1 && this.dom && !this.opera) ? 1 : 0;
  this.ie4      = (document.all && !this.dom && !this.opera) ? 1 : 0;
  this.ie       = this.ie4 || this.ie5 || this.ie6;
  this.ie3      = (this.ver.indexOf("MSIE") && (is_major<4));
  this.hotjava  = (this.agent.toLowerCase().indexOf('hotjava')!=-1) ? 1 : 0;
  this.bw       = (this.ie6 || this.ie5 || this.ie4);
  this.ver3     = (this.hotjava || this.ie3);
  return this;
  }

function testit()
  {
  var bw = new bw_check();
  if (bw.ie3)
    {
		supersleight.init();
	}
  if (bw.ie4)
    {
		supersleight.init();
    }
  if (bw.ie5)
    {
		supersleight.init();
    }
  if (bw.ie6)
    {
		supersleight.init();
    }
  }
 
 testit();
