/**
 * This javascript is meant to be used by Internet explorer to display either a PNG or a gif through use of the
 * expression() css rule, for instance:
 * my-div-with-transparent-png-or-gif {
 * 		background-image: expression(getBgImgString("bg-basename")); 
 * 		filter: expression(getPngFilterString("bg-basename"));
 * };
 * where bg-basename is the full path to the image, without the .png or .gif extension
 *
 * WARNING
 *	This method will not work over a https connection!
 */
function getVersion()
{
	return parseFloat(
		navigator.appVersion.substring(
			navigator.appVersion.indexOf("MSIE ")+5,
			navigator.appVersion.indexOf(" ", navigator.appVersion.indexOf("MSIE ") + 5)));
}

function getPngFilterString(basename)
{
	return getVersion() > 5.49 ? "progid:DXImageTransform.Microsoft.AlphaImageLoader(src='"+basename+".png', sizingMethod='crop')" : "none"; 
}

function getBgImgString(basename)
{
	return getVersion() > 5.49 ? "none" :  "url("+basename+".gif)"; 
}

