
var ns4=(document.layers)? true:false;
var ns6=(document.getElementById)? true:false;
var ie4=(document.all)? true:false;
var ie5=false;

if(ie4){
if((navigator.userAgent.indexOf('MSIE 5')> 0)||(navigator.userAgent.indexOf('MSIE 6')> 0)){
ie5=true;
}
if(ns6){
ns6=false;
}
}

var x=0; var y=0;

function afficheb(titre,msg)
{

	var contenu = "<table cellpadding='2' width='300' style='background-color: #344883;'><tr bgcolor='#344883' style='color: #FFFF00;'><td align='left' width='95%'>&nbsp;&nbsp;<b>+ " + titre + "</b></td><td align='right' width='5%'><nobr><span style='cursor:hand;cursor:pointer;";

	contenu=contenu+"' onclick='enleveb();'>[fermer X]</span>  </nobr></td></tr><tr bgcolor='#FFE493'><td width='100%' colspan='2' style='color: #344883;'><span>"+msg+"</span></td></tr></table>";

	if (ie4 || ie5) {
		window.explication.innerHTML=contenu;
		window.explication.style.visibility='visible';
		x=event.clientX+document.documentElement.scrollLeft; y=event.clientY+document.documentElement.scrollTop;
		window.explication.style.left=x+5;window.explication.style.top=y-30;
	}
	if (ns4) {
		document.layers["explication"].document.write(contenu);
		document.layers["explication"].document.close();
		document.layers.explication.visibility='show';
		x = (navigator.appName.substring(0,3) == "Net") ? e.pageX : event.x+document.body.scrollLeft;
		y = (navigator.appName.substring(0,3) == "Net") ? e.pageY : event.y+document.body.scrollTop;
		document.layers.explication.left=x+10;
		document.layers.explication.top=y+14;
	}

	if (ns6) {
		document.getElementById("explication").innerHTML=contenu;
		document.getElementById("explication").style.visibility='visible';
		document.getElementById("explication").style.position='absolute';
		x=document.documentElement.scrollLeft; y=+document.documentElement.scrollTop;
		document.getElementById("explication").style.left=(x+(window.innerWidth/2)-150)+"px";
		document.getElementById("explication").style.top=(y+(window.innerHeight/2)-50)+"px";
	}

}

function enleveb() {
	document.getElementById("explication").style.visibility='hidden';
	document.getElementById("explication").innerHTML="";
}
