function PNG_Patch(PNG_Image)
{
   var PNG_Patched = false;
   if(!PNG_Image)
      PNG_Image = event.srcElement;
   if(PNG_Image.src.search(/\.png$/i) > -1 && PNG_Image.className.search(/(?=^|\b)noalpha(?=\b|$)/i) == -1)
   {
      var Span = document.createElement("span");
     Span.setAttribute("title", PNG_Image.title || PNG_Image.alt);
      if(PNG_Image.border)
         Span.style.borderWidth = PNG_Image.border + "px";
      Span.style.display = "inline-block";
      Span.style.height = PNG_Image.height + "px";
    Span.style.width = PNG_Image.width + "px";
    Span.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + PNG_Image.src + "')";
     PNG_Image.replaceNode(Span);
      PNG_Patched = true;
  }
   return PNG_Patched;
}

function PNG_Attach( )
{
   if(typeof document.images != "undefined" && typeof document.body.style.filter != "undefined")
      for(var i=0; i<document.images.length; i++)
         if(PNG_Patch(document.images[i]))
            i=0;
}

if(navigator.userAgent.indexOf("MSIE 6.0") > -1)
   document.attachEvent("onreadystatechange", PNG_Attach);

