function OuvrirFenetre(url,nom,details)
{
	abc=window.open(url,nom,details);
	window.abc.focus();
}

function OuvrirParent(url)
{
	window.opener.location=url;
	window.opener.focus();
}

function smiley(balise_debut, balise_fin, id_textarea)
{
var champ = document.getElementById(id_textarea);
var scroll = champ.scrollTop;

if(balise_fin == '')
	balise_debut = ' ' + balise_debut + ' ';

	if (champ.curseur)
	{
		champ.curseur.text = balise_debut + champ.curseur.text + balise_fin;
	}
	else if (champ.selectionStart >= 0 && champ.selectionEnd >= 0)
	{
		var debut = champ.value.substring(0, champ.selectionStart);
		var entre = champ.value.substring(champ.selectionStart, champ.selectionEnd);
		var fin = champ.value.substring(champ.selectionEnd);
		champ.value = debut + balise_debut + entre + balise_fin + fin;
		champ.focus();
		champ.setSelectionRange(debut.length + balise_debut.length, champ.value.length - fin.length - balise_fin.length);
	}
	else
	{
		champ.value  += balise_debut + balise_fin;
		champ.focus();
	}
champ.scrollTop = scroll;
}

function confirmSubmit(phrase)
{
	var agree=confirm(phrase);
	if (agree)
		return true ;
	else
		return false ;
}

function affichage(id)
{
	var mid= 'm'+id;
	if (document.getElementById(id).style.display == 'none')
	{
	document.getElementById(id).style.display = '';
	document.getElementById(mid).style.fontWeight= 'bold';
	}
	else
	{
	document.getElementById(id).style.display = 'none';
	document.getElementById(mid).style.fontWeight= '';
	}
}	