// === SLEIGHT.JS CODE (Copyright© YoungPup) WITH MODIFIED CSS-INLINE IMAGE SUPPORT ========================
if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
//document.writeln('<style type="text/css">img { visibility:hidden; } </style>');
window.attachEvent("onload", fnLoadPngs);
//Event.observe(window, 'load', fnLoadPngs);
}

function fnLoadPngs() {
var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
var itsAllGood = (rslt != null && Number(rslt[1])>= 5.5);

  for (var i = document.images.length - 1, img = null; (img = document.images[i]); i--) {
    if (itsAllGood && img.src.match(/\.png$/i) != null) {
      var src = img.src;
      img.style.width = img.width + "px";
      img.style.height = img.height + "px";
      img.style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='" + src + "', sizingMethod='image')"
      img.src = "images/spacer.gif"; // change this to your own gif
    }
    img.style.visibility = "visible";
  }
}


if (navigator.platform == "Win32" && navigator.appName == "Microsoft Internet Explorer" && window.attachEvent) {
window.attachEvent("onload", alphaBackgrounds);
//Event.observe(window, 'load', alphaBackgrounds);
}

function alphaBackgrounds(){
  
var rslt = navigator.appVersion.match(/MSIE (\d+\.\d+)/, '');
var itsAllGood = (rslt != null && Number(rslt[1])>= 5.5);
  for (i=0; i<document.all.length; i++){
    var bg = document.all[i].currentStyle.backgroundImage;
    if (itsAllGood && bg){
      if (bg.match(/\.png/i) != null){
      var mypng = bg.substring(5,bg.length-2);
      document.all[i].style.filter = "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+mypng+"', sizingMethod='image')";
      document.all[i].style.backgroundImage = "url('images/spacer.gif')"; // change this to your own gif
      }
    }
  }
}

//IE6 Hack for flashing images
//This must go after the PNGs have been fixed(IE6 only)
var version=0
if (navigator.appVersion.indexOf("MSIE")!=-1){
temp=navigator.appVersion.split("MSIE");
version=parseFloat(temp[1]);
document.execCommand("BackgroundImageCache",false,true);
}


