﻿if(navigator.platform=="Win32"&&navigator.appName=="Microsoft Internet Explorer"&&window.attachEvent){window.attachEvent("onload",enableAlphaImages);};function getPathToGIF(src){var matches=src.match(/^(.+\/images\/)(.+)$/,src);if(matches){pathToGIF=matches[1]+'spacer.gif';return(pathToGIF);}
else{alert('Cannot locate spacer.gif!');return(false);};};function enableAlphaImages(){var rslt=navigator.appVersion.match(/MSIE (\d+\.\d+)/,'');var itsAllGood=(rslt!=null&&Number(rslt[1])>=5.5&&Number(rslt[1])<7);if(itsAllGood){for(var i=0;i<document.all.length;i++){var obj=document.all[i];var bg=obj.currentStyle.backgroundImage;var bgPositionX=obj.currentStyle.backgroundPositionX;var bgPositionY=obj.currentStyle.backgroundPositionY;var bgRepeat=obj.currentStyle.backgroundRepeat;var img=document.images[i];if(bg&&bg.match(/\.png/i)!=null){var src=bg.substring(5,bg.length-2);var pathToGIF=getPathToGIF(src);if(((bgPositionX=='0%')||(bgPositionX=='left'))&&((bgPositionY=='0%')||(bgPositionY=='top'))&&(bgRepeat=='no-repeat')){obj.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='crop')";obj.style.backgroundImage="url("+pathToGIF+")";}
else{src=src.replace(/\.png$/i,'.gif');obj.style.backgroundImage="url("+src+")";obj.style.backgroundPositionX=bgPositionX;obj.style.backgroundPositionY=bgPositionY;obj.style.backgroundRepeat=bgRepeat;};}
else if(img&&img.src.match(/\.png$/i)!=null){var src=img.src;var pathToGIF=getPathToGIF(src);img.style.width=img.width+"px";img.style.height=img.height+"px";img.style.filter="progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+src+"', sizingMethod='crop')";img.src=pathToGIF;};};};};
