var gIDhelp;

function showHelp(e,id){

	if(gIDhelp == id && xTooltip != null && xTooltip.style.visibility == 'visible')
			hideTooltip();
	else{

		gIDhelp = id;
		showTooltip(e, 30 , "");
		
		xTooltip.innerHTML = '<span class=red>Chargement...</span>';
		loadXMLDoc("/xml/xmlhelp.php?action=help&id=" + id, 'xmlhelp');

	}
	xTooltip.style.zIndex		= 105;
}

function hideHelp(){
	hideTooltip();

}

function xmlhelp(text){

	xTooltip.innerHTML = '';



	str = "<table id='xHelpContainer' class='tableList'>";
	
	str += "<tr class='head2'><td width=100% >Rubrique d'aide</td><td><a href=javascript:hideHelp();>x</a></td></tr>";
	str += "<tr><td><p>" + text + "</p></td></tr>";
	str += "<tr><td colspan='2' align='right'><a href=javascript:hideHelp();>Fermer</a></td></tr>";

	str += "</table>";


	xTooltip.innerHTML = str;

	if(mx > screen.width/2){
		gById("xHelpContainer").width = (getOffsetLeft(xTooltip, true) - 200) + 'px';
	}


	repoTooltip();


	if( (getOffsetLeft(xTooltip,true) + xTooltip.offsetWidth) > (screen.width-50))
			gById("xHelpContainer").style.width = xTooltip.offsetWidth - 150 + 'px';

}