
	function getUsesFilers(){
		var rxIE		= /MSIE (\d+\.\d+)/
		var rxFF		= /Firefox\/(\d+\.\d+)/
		
		var matches		= navigator.userAgent.match(rxIE)
		if(matches){
			var isIE		= matches != null
			var version		= parseFloat(matches[1])
			return isIE && version < 7
			}
		else{
			return false
			}
		}
		
	function pngFix(img){
		
			var ext				= img.src.substr(img.src.length - 3, 3).toLowerCase()
			if(ext != 'png'){
				return
				}
	
			img.style.filter	= "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" +img.src+ "', sizingMethod='scale')"
			img.style.display	= "inline-block"
			
			var w, h
			if(img.className == 'icon'){
				w = 93
				h = 94
				}
			else{
				w = img.width
				h = img.height
				}
			
			img.style.width		= w + "px"
			img.style.height	= h + "px"
			
			var att
			var atts			= ''
			var matches			= /(id|class|mouse|click)/
	
	
			for(i = 0; i < img.attributes.length; i++){
				att = img.attributes[i]
				if(matches.exec(att.nodeName)){
					if((att.nodeValue && att.nodeValue.item) || (att.nodeValue != '' && att.nodeValue != null)){
						atts += ' ' + att.nodeName + '="' +att.nodeValue+ '"'
						}
					}
				}
			var str	= '<span style="'+img.style.cssText+'" '+atts+'>&nbsp;</span>'
			img.outerHTML = str
			}
	
	function pngFixAll() // correctly handle PNG transparency in Win IE 5.5 & 6.
		{
		if(!document.body){
			alert('If the script "pngFix2.js" is to be executed inline (as the document loads) it needs to be placed after any imagesthe opening body tag, and preferably just before the closing body tag.')
			return false
			}
		var version		= parseFloat(navigator.appVersion.split("MSIE")[1])
		if ((version >= 5.5 && version < 7) && document.body.filters) 
			{
			for(var i = document.images.length - 1; i >=0 ; i--)
				{
				pngFix(document.images[i])
				}
			}
		}
		
	var usesFilters	= getUsesFilers()
	if(window.attachEvent){
		window.attachEvent("onload", pngFixAll);
		}
