/*Fonctions d'affichage d'erreur*/
function ouvrirError(x,largeur, hauteur){
	if(x!=''){
		var rand			= Math.round((Math.random()*10000000000000));
		var theDiv			= document.createElement("div");
		theDiv.setAttribute("id", "popError"+rand);
		theDiv.className	= "popError";
		theDiv.style.height			= (hauteur+50)+"px";
		theDiv.style.marginTop		= "20px";
		theDiv.style.width			= (largeur+50)+"px";
		theDiv.style.marginLeft		= -1*Math.round(largeur/2)+"px";
		document.body.appendChild(theDiv);
		theDiv.innerHTML	= "<a href=\"javascript:fermetureError('"+rand+"');\" class=\"fermer\"><img src=\""+URL_WEB+"img/fermer.gif\" alt=\"fermer la fen&ecirc;tre\"/> FERMER</a>";
		theDiv.innerHTML	+= "<span>"+x+"</span>";
		$('popError'+rand).effect('opacity', {duration:750, transition: Fx.Transitions.Back.easeOut}).start(0,1).chain(function(){
			closer=window.setTimeout("fermetureError('"+rand+"')",8000);
		});
	}
}
function fermetureError(r){
	if($('popError'+r)){
		$('popError'+r).effect('opacity', {duration:400, transition: Fx.Transitions.Back.easeOut}).start(1,0).chain(function(){
			var noeud=document.getElementById("popError"+r);
			document.body.removeChild(noeud);
		});
	}
}