/*
  Author: Daniel Sliwa
  email: daniel@pro.ie
  Created: 2008 05 16
  
  This script helps to cooperate both scripts for transparent png's and for onmouseover changing
  
  add:
  onload="KD_IEPngFix();" to the body tag (ot at least "KD_IEPngFix();" to the onload)
*/

function KD_IEPngFix(){
 if (document.all && /MSIE (5\.5|6)/.test(navigator.userAgent) &&
  document.styleSheets && document.styleSheets[0] && document.styleSheets[0].addRule)
 {
  // save all sources for onmouseover changing
  var i;
  for(i=0;i<(document.images.length);i++){
    // for each images check it its png
    if ((/\.png([^\.]+|$)/i).test(document.images[i].src)){
      document.images[i].oSrc = document.images[i].src;
    }
  }
  //document.styleSheets[0].addRule('*', 'behavior: url(iepngfix.htc)');
  // Feel free to add rules for specific elements only, as above.
  // You have to call this once for each selector, like so:
  document.styleSheets[0].addRule('img', 'behavior: url(css/iepngfix.htc)');
  document.styleSheets[0].addRule('div', 'behavior: url(css/iepngfix.htc)');
 }
}
