﻿// JScript File


/* 
	preconditions:
		must have a 1px by 1px spacer gif in: [apppath]/images/spacer.gif
		strAppPath var is defined, to the application path.
 */

var arVersion = navigator.appVersion.split("MSIE");
var IEversion = parseFloat(arVersion[1]);

//call this and pass it an html doc IMG (of type png) and if the browser is IE 5.5 or 6, it
//will process the PNG using the AlphaImageLoader.
//Created:  John Pequeno	July 2, 2006.
function fixIEPNG(myImage) 
{
  if ((IEversion >= 5.5) && (IEversion < 7) && (document.body.filters) && myImage.src.match(/\.png/i)) 
  {
		 myImage.style.cssText += ";filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
									+ "(enabled=true, src='" + myImage.src + "', sizingMethod='scale');";      
		 myImage.src = strAppPath + "TemplateImages/spacer.gif";  
	}
}

