/* PNG FiX für IE6 */

function png_fix(ImgId, ImgSource1, ImgSource2, ImgEvent)
{
  var arVersion = navigator.appVersion.split("MSIE")
  var version = parseFloat(arVersion[1])

  if ((version >= 5.5 && version < 7) && (document.body.filters)) 
  {
    //Erster aufruf
    if (ImgEvent==0) {
      var img = document.getElementById(ImgId);
      var imgID = (img.id) ? "id='" + img.id + "' " : "";
      var imgClass = (img.className) ? "class='" + img.className + "' " : "";
      var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' ";
      var imgStyle = "display:inline-block;" + img.style.cssText;
      if (img.align == "left") imgStyle = "float:left;" + imgStyle;
      if (img.align == "right") imgStyle = "float:right;" + imgStyle;
      if (img.href) imgStyle = "cursor:pointer;" + imgStyle;
                            
      var strNewHTML = "<span " + imgID + imgClass + imgTitle + " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader" + "(src='" + img.src + "', sizingMethod='scale');\" onmouseover=\"png_fix('"+img.id+"','"+ImgSource1+"','"+ImgSource2+"',2);\" onmouseout=\"png_fix('"+img.id+"','"+ImgSource1+"','"+ImgSource2+"',1);\"></span>";
      //alert("==> "+strNewHTML);
      img.outerHTML = strNewHTML;
    }
  
    //onmouseover
    if (ImgEvent==2) {
      var span = document.getElementById(ImgId);
      var zw = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + ImgSource2 + "', sizingMethod='scale')";
      span.style.setAttribute("filter", zw);
    }
  
    //onmouseout
    if (ImgEvent==1) {
      var span = document.getElementById(ImgId);
      var zw = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + ImgSource1 + "', sizingMethod='scale')";
      span.style.setAttribute("filter", zw);
    }
  }
}
