/* ############## Configuration ############## */

// Gestion des exceptions
var Exceptions = new Array();
Exceptions[0] = "rolloverproduct.png";
Exceptions[1] = "halo.png";

/*Exceptions[2] = "";
etc...
*/

/* ############## Fin de Configuration ############## */

// Execution au chargement de la page
window.onload = function() {
	PngFixImg();
} 

// Mise en transparence des <img /> PNG
function PngFixImg() {
	if (PngFixImgIsBrowser() == false) return;
	
	for (var i=0; i<document.images.length; i++)
	{
		if (PngFixImgOne(document.images[i],false) == true) i = i-1;
	}
}

function PngFixImgIsBrowser() {
	var arVersion = navigator.appVersion.split("MSIE")
	var version = parseFloat(arVersion[1])
	
	return ((version >= 5.5 && version < 7) && (document.body.filters));
}

function PngFixImgOne(img) {
	if (PngFixImgIsBrowser() == false) return;
	
	var imgName = img.src.toUpperCase()
	if (imgName.substring(imgName.length-3, imgName.length) != "PNG") return false;
	
	var imgID = (img.id) ? "id='" + img.id + "' " : ""
	var imgClass = (img.className) ? "class='" + img.className + "' " : ""
	var imgTitle = (img.title) ? "title='" + img.title + "' " : "title='" + img.alt + "' "
	var imgStyle = "display:inline-block;" + img.style.cssText 
	if (img.align == "left") imgStyle = "float:left;" + imgStyle
	if (img.align == "right") imgStyle = "float:right;" + imgStyle
	if (img.parentElement.href) imgStyle = "cursor:hand;" + imgStyle
	var strNewHTML = "<span " + imgID + imgClass + imgTitle
	+ " style=\"" + "width:" + img.width + "px; height:" + img.height + "px;" + imgStyle + ";"
	+ "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
	+ "(src=\'" + img.src + "\', sizingMethod='crop');\"></span>" 
	img.outerHTML = strNewHTML
	return true;
}