//=================================================================================================
//	You can delete these three functions if not needed.
//-------------------------------------------------------------------------------------------------
function customBodyLoad( sender )
{
}
//=================================================================================================
function customBodyResize( sender, size )
{
}
//=================================================================================================
function customBodyScroll( sender )
{
}
//=================================================================================================
var supersleight = function()
{
	var
		root             = false,
		applyPositioning = true,
		shim	           = "img/default/pixTrans.gif",
		shim_pattern     = /img\/default\/pixTrans\.gif$/i;
	
	var fnLoadPngs = function()
	{
		if ( !isIE6 )
			return;
		
		if ( root )
			root = document.getElementById( root );
		else
			root = document;
		
		for ( var i = root.all.length - 1, obj = null; (obj = root.all[i]); i-- )
		{
			if ( obj.currentStyle.backgroundImage.match(/\.png/i) !== null )
				bg_fnFixPng( obj );
			
			if ( obj.tagName == "IMG" && obj.src.match(/\.png$/i) !== null )
				el_fnFixPng( obj );
			
			if ( applyPositioning && (obj.tagName == "A" || obj.tagName == "INPUT") && obj.style.position == "")
				obj.style.position = "relative";
		}
	};
	
	var bg_fnFixPng = function( obj )
	{
		var
			mode = "scale",
			bg   = obj.currentStyle.backgroundImage,
			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 retVal = 
	{
		init: function()
		{
			addEvent( window, "load", fnLoadPngs );
		},
		limitTo: function( el )
		{
			root = el;
		},
		run: function()
		{
			fnLoadPngs();
		}
	};
	
	return retVal;
}();
//-------------------------------------------------------------------------------------------------
	supersleight.init();
//=================================================================================================