// Main JavaScript Source Code File
<!--

function correctPNG() 
{
  for(var i=0; i<document.images.length; i++)
  {
    var strNewHTML;
    var img = document.images[i];
    var imgName = img.src.toUpperCase();
    var imgStyle = img.style.cssText;
    var imgTitle = img.title;

    if (imgName.substring(imgName.length-3, imgName.length) == "PNG")
    {
      var imgID = (img.id) ? "id = \""+img.id+"\" " : "";
      var imgClass = (img.className) ? "class = \""+img.className+"\" " : "";
      
      if (imgTitle)
      {
        imgTitle = "title = \""+img.title+"\" ";
      }
      else
      {
        imgTitle = "title=\""+img.alt+"\"";
      }

      strNewHTML = "<span "+imgID+imgClass+imgTitle+" style=\"";

      imgStyle =  "width:"+img.width+"px; ";
      imgStyle += "height:"+img.height+"px; ";

      if (img.parentElement.href) 
      {
        imgStyle = "cursor:hand;" + imgStyle;
      }

      imgStyle += "display:inline-block;";

      if (img.align == "left") 
      {
        imgStyle += "float:left;";
      }

      if (img.align == "right") 
      {
        imgStyle += "float:right;";
      }
       
      imgStyle += "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
      imgStyle += "(src=\'"+img.src+"\', sizingMethod='scale');";
 
      strNewHTML += imgStyle+"\"></span>";

      img.outerHTML = strNewHTML;
      i = i-1;
    }
  }
}


window.attachEvent("onload", correctPNG);

//-->
