var fixpng = function($img)
    {
        var $html =
            '<span ' +
                (($img.id)?        "id='"    + $img.id + "' "        : '') +
                (($img.className)? "class='" + $img.className + "' " : '') +
                (($img.title)?     "title='" + $img.title + "' "     : '') +
                'style="' +
                    'display: inline-block;' +
                    'width: ' + $img.width + 'px;' +
                    'height: ' + $img.height + 'px;' +
                    "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(" +
                    "src='" + $img.src + "', sizingMethod='scale'); " +
                $img.style.cssText + '" ';

        if ($img.getAttribute('mouseoversrc'))
        {
            $html += "mouseoversrc='" + $img.getAttribute('mouseoversrc') + "' ";
        }

        if ($img.getAttribute('mouseoutsrc'))
        {
            $html += "mouseoutsrc='" + $img.getAttribute('mouseoutsrc') + "' ";
        }

        $html += '></span>';

        $img.outerHTML = $html;
    }
