var IE_fixes = Class.create();
IE_fixes.prototype =
{
	is_ie: false,
	initialize: function (rootNode, elements)
	{
		this.is_ie = (document.all&&document.getElementById);
		if (this.is_ie)
		{
			this.apply_ie_png_fix ();
			this.rootNode = rootNode;
			this.elements = elements;
			if (rootNode && elements) this.apply_ie_hover_fix (rootNode, elements);
		}
	},
	
	reapply: function ()
	{
		if (this.is_ie)
		{
			this.apply_ie_png_fix ();
			this.apply_ie_hover_fix (this.rootNode, this.elements);
		}
	},
	
	apply_ie_png_fix: function ()
	{
		var imgs = document.getElementsByTagName ("img");
		for (var i=0; i<imgs.length; i++)
		{
			var img = imgs[i];
			if (img.src.match(/\.png$/i) != null)
			{
				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 = "lib/img/spacer.gif";
			}
		}
	},
	
	apply_ie_hover_fix: function (rootNode, element)
	{
		/*navRoot = $(rootNode);
		for (i=0; i<navRoot.childNodes.length; i++)
		{
			node = navRoot.childNodes[i];
			if (node.nodeName==element)
			{
				node.onmouseover=function()
				{
					if (document.selectedproject!=this) this.className+="_over";
				}
				node.onmouseout=function()
				{
					if (document.selectedproject!=this) this.className=this.className.replace("_over", "");
				}
			}
		}*/
	}
}