//fix png transparence
var arVersion = navigator.appVersion.split("MSIE")
var version = parseFloat(arVersion[1])

function fixPNG(myImage) 
{
    if ((version >= 5.5) && (version < 7) && (document.body.filters)) 
    {
       var imgID = (myImage.id) ? "id='" + myImage.id + "' " : ""
	   var imgClass = (myImage.className) ? "class='" + myImage.className + "' " : ""
	   var imgTitle = (myImage.title) ? 
		             "title='" + myImage.title  + "' " : "title='" + myImage.alt + "' "
	   var imgStyle = "display:inline-block;" + myImage.style.cssText
	   var strNewHTML = "<span " + imgID + imgClass + imgTitle
                  + " style=\"" + "width:" + myImage.width 
                  + "px; height:" + myImage.height 
                  + "px;" + imgStyle + ";"
                  + "filter:progid:DXImageTransform.Microsoft.AlphaImageLoader"
                  + "(src=\'" + myImage.src + "\', sizingMethod='scale');\"></span>"
	   myImage.outerHTML = strNewHTML	  
    }
}



// fonction qui defini la fonction javascript em qui permet d'interpreter un mail crypté
// h :        chaine cryptee correspondant a une adresse email a interpreter
// subject :  sujet du mail 
// id :       id de la balise <a> ciblee dont le href doit recevoir le mailto
function em(h, subject, id) {
	  var result = "";
	  var string = "";
	  var key = "miam";
	  for (var i= (h.substr(0, 2)=="0x")?2:0; i<h.length; i+=2) {string += String.fromCharCode (parseInt (h.substr (i, 2), 16));}
	  for(i=1; i<=string.length; i++)
	  {
		 c = string.substr(i-1,1);
		 keychar = key.substr((i % key.length)-1,1);
		 c = String.fromCharCode(c.charCodeAt(0)-keychar.charCodeAt(0));
		 result=result+c;
	   }
	   if ( subject=="" ) {document.getElementById(id).href="mailto:"+result;}
	   else {document.getElementById(id).href="mailto:"+result+"?subject="+subject;}
	   return result;
}