/* ECMA-262 (aka JavaScript, aka JScript) scripts - www.rdmo.com
 * Date: 20020228
 * Author: Julien Plissonneau Duquene
 * Copyright (c) 2003 RD Machines Outils S.A. - France
 * All rights reserved */


/*
 * Ugly hack needed to work around MSIE incapacity to display truecolor
 * PNGs with an alpha channel.
 * Should be modified NOT to match MSIE anymore once PNG support is
 * corrected by Microsoft.
 * Matches: MSIE 5.5, MSIE 6.x.
 * Previous versions of MSIE had poor or no PNG support.
 */
function MSIE_alpha_PNG(idimg, w, h)
{
  try {
    appver = navigator.appVersion;
    if ((appver.indexOf("MSIE 5.")!=-1)||(appver.indexOf("MSIE 6.")!=-1)) {
      e = document.getElementById(idimg);
      url = e.src; /* does not work: h = e.height; w = e.width; */
      //this is recommanded by Microsoft, but it used to crash some clients
      //document.getElementById(idimg).style.display = "none";
      //document.write("<div id=\""+idimg+"_msie\" style=\"position:relative; height:"+h+"px; width:"+w+"px; filter:progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+url+"', sizingMethod='scale');\"></div>");
      e.src=url.substr(0,url.length-4)+'_msie.png';
      
    }
  } catch (e) { /* nothing to do */ }
}

