// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function select_champ(nomform,nomzone)
{
	var champs = "document."+ nomform + "." + nomzone;
	var test = eval("document."+ nomform + ".champ_select");
	test.value = champs;
	return;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function format(nomform,parm)
{
	var str = document.selection.createRange().text;
	var str2 = eval("document."+ nomform + ".champ_select");
	var champ = str2.value;
	eval(champ +".focus()");
	var sel = document.selection.createRange();
	var debut = "<" + parm + ">";
	var fin = "</" + parm + ">";

	if ((str.substring(0,3) == debut) & (str.substring(str.length-4,str.length) == fin))
	{
  		sel.text = str.substring(3,str.length-4);
	}
	else
	{
		sel.text = "<" + parm + ">" + str + "</" + parm + ">";
	}
	return;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function zone(nomform,parm)
{
	var str = document.selection.createRange().text;
	var str2 = eval("document."+ nomform + ".champ_select");
	var champ = str2.value;
	eval(champ +".focus()");
	var sel = document.selection.createRange();
	var debut = "_" + parm + "_";

	if ((str.substring(0,3) == debut))
	{
  		sel.text = str.substring(3,str.length-4);
	}
	else
	{
		sel.text = "_" + parm + "_" + str ;
	}
	return;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function color(nomform,parm)
{
	var str = document.selection.createRange().text;
	var str2 = eval("document."+ nomform + ".champ_select");
	var champ = str2.value;
	eval(champ +".focus()");
	var sel = document.selection.createRange();
	var debut = "<font color='" + parm + "'>";
	var fin = "</font>";

	if ((str.substring(0,22) == debut) & (str.substring(str.length-7,str.length) == fin))
	{
  		sel.text = str.substring(22,str.length-7);
	}
	else
	{
		sel.text = debut + str + fin;
	}
	return;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function saut(nomform,parm)
{
	var str = document.selection.createRange().text;
	var str2 = eval("document."+ nomform + ".champ_select");
	var champ = str2.value;
	eval(champ +".focus()");
	var sel = document.selection.createRange();
	var debut = "<" + parm + ">";

	if (str.substring(0,4) == debut)
	{
		sel.text = str.substring(4,str.length);
	}
	else
		if (str.substring(str.length-4,str.length) == debut)
		{
			sel.text = str.substring(0,str.length-4);
		}
		else
			sel.text = str + "<" + parm + ">";

	return;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function puce(nomform)
{
	var sel = document.selection.createRange();
	var str = document.selection.createRange().text;
	var str2 = eval("document."+ nomform + ".champ_select");
	var champ = str2.value;
	eval(champ +".focus()");
	var sel = document.selection.createRange();
	debut = "<ul>"

	if (str.substring(0,4) == debut)
	{
		sel.text = str.substring(8,str.length-5);
	}
	else
	{
		sel.text = "<ul><li>" + str + "</ul>";
	}
	return;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function lien(nomform)
{
	var str = document.selection.createRange().text;
	var str2 = eval("document."+ nomform + ".champ_select");
	var champ = str2.value;
	eval(champ +".focus()");
	var sel = document.selection.createRange();

	if (str.substring(str.length-4,str.length) == "</a>")
	{
		sel.text = str.substring(str.indexOf(">",0)+1,str.indexOf("</a>",0));
	}
	else
	{
		var lien = prompt("URL:","http://");
		if (lien != null)
		{
			sel.text = "<a href=\"" + lien + "\" target=\"_blank\">" + str + "</a>";
		}
	}
	return;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function toto(nomform)
{
	var str = document.selection.createRange().text;
	var str2 = eval("document."+ nomform + ".champ_select");
	var champ = str2.value;
	eval(champ +".focus()");
	var sel = document.selection.createRange();
	if (str.substring(str.length-4,str.length) == "</a>")
	{
		sel.text = str.substring(str.indexOf(">",0)+1,str.indexOf("</a>",0));
	}
	else
	{
		var lien = prompt("URL:","http://");
		if (lien != null)
		{
			sel.text = "<a href=\"" + lien + "\" target=\"_blank\">" + str + "</a>";
		}
	}
	return;
}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function displayHTML(nomform)
{
	var titre = eval("document."+ nomform + ".titre");
	var corps = eval("document."+ nomform + ".corp");
	win = window.open('', 'popup', 'toolbar = no, status = no, location=no, menubar=no, scrollbars=yes,resizable=no, height=200,width=500,left=80,top=80');
	win.document.write("<html>");
	win.document.write("<head>");
	win.document.write("<title>Aperçu rapide</title>");
	win.document.write("<meta http-equiv='Content-Type' content='text/html' charset='iso-8859-1'>");
	win.document.write("<link rel='stylesheet' href='../feuille_style.css' type='text/css'>");
	win.document.write("</head>");
	win.document.write("<body>");
	win.document.write("<p class=\"titrePage\">" + titre.value + "</p>");
  win.document.write("<table width=\"100%\" border=\"0\" cellspacing=\"15\" cellpadding=\"0\">");
  win.document.write("<tr>");
  win.document.write("<td valign=\"top\" class=\"texte11Noir\">");
  win.document.write("" + corps.value + "");
  win.document.write("</td>");
  win.document.write("</tr>");
  win.document.write("</table>");
	win.document.write("<br><center><input type='button' value='Fermer' onclick='window.close()' class='bouton'></center>");
	win.document.write("</body>");
	win.document.write("</html>");
	win.document.close();
	win.focus();
}


// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function displayHTML2(nomform)
{
	var titre = eval("document."+ nomform + ".titre");
	var lieu = eval("document."+ nomform + ".lieu");
	var contact = eval("document."+ nomform + ".contact");
	var organisateur = eval("document."+ nomform + ".organisateur");
	var commentaire = eval("document."+ nomform + ".commentaire");

	win = window.open('', 'popup', 'toolbar = no, status = no, location=no, menubar=no, scrollbars=yes,resizable=no, height=200,width=500,left=80,top=80');
	win.document.write("<html>");
	win.document.write("<head>");
	win.document.write("<title>Aperçu rapide</title>");
	win.document.write("<meta http-equiv='Content-Type' content='text/html' charset='iso-8859-1'>");
	win.document.write("<link rel='stylesheet' href='../feuille_style.css' type='text/css'>");
	win.document.write("</head>");
	win.document.write("<body>");

	win.document.write("<p class=\"titreParagraphe\"><img src=\"../images/flecheRouge.gif\" width=\"13\" height=\"13\" align=\"absbottom\">");
	win.document.write("<strong>"+ titre.value + "</strong>");
	win.document.write("</p>");
	if (organisateur.value != "" || lieu.value != "" || contact.value != "" || commentaire.value != "") {
		win.document.write("<table width=\"100%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" bgcolor=\"041D74\">");
		win.document.write("<tr>");
		win.document.write("<td>");
		win.document.write("<table width=\"100%\" border=\"0\" cellspacing=\"1\" cellpadding=\"3\">");
		if (organisateur.value != "") {
			win.document.write("<tr bgcolor=\"#FFFFFF\" class=\"texte11noir\">");
			win.document.write("<td width=\"90\" bgcolor=\"#E2E8FA\" class=\"texte11MenuGras\">Organisateur</td>");
			win.document.write("<td>"+ organisateur.value + "</td>");
			win.document.write("</tr>");
		}
		if (lieu.value != "") {
			win.document.write("<tr bgcolor=\"#FFFFFF\" class=\"texte11noir\">");
			win.document.write("<td bgcolor=\"#E2E8FA\" class=\"texte11MenuGras\">Lieu/Horaire</td>");
			win.document.write("<td>"+ lieu.value + "</td>");
			win.document.write("</tr>");
		}
		if (contact.value != "") {
			win.document.write("<tr bgcolor=\"#FFFFFF\" class=\"texte11noir\">");
			win.document.write("<td bgcolor=\"#E2E8FA\" class=\"texte11MenuGras\">Contact</td>");
			win.document.write("<td>"+ contact.value + "</td>");
			win.document.write("</tr>");
		}
		if (commentaire.value != "") {
			win.document.write("<tr bgcolor=\"#FFFFFF\" class=\"texte11noir\">");
			win.document.write("<td bgcolor=\"#E2E8FA\" class=\"texte11MenuGras\">Commentaire</td>");
			win.document.write("<td>"+ commentaire.value + "</td>");
			win.document.write("</tr>");
		}
	}

	win.document.write("<tr bgcolor=\"#FFFFFF\" class=\"texte11noir\">");
	win.document.write("<td><img src=\"../images/ico_acrobat.gif\" width=\"16\" height=\"16\"></td>");
	win.document.write("<td class=\"texte11Gris\">Document PDF</td>");
	win.document.write("</tr>");
	win.document.write("</table>");
	win.document.write("</td>");
	win.document.write("</tr>");
	win.document.write("</table>");

	win.document.write("<br><center><input type='button' value='Fermer' onclick='window.close()' class='bouton'></center>");
	win.document.write("</body>");
	win.document.write("</html>");
	win.document.close();
	win.focus();

}
// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function displayHTML3(nomform)
{
	var corps = eval("document."+ nomform + ".corp");

	win = window.open('', 'popup', 'toolbar = no, status = no, location=no, menubar=no, scrollbars=yes,resizable=no, height=200,width=500,left=80,top=80');
	win.document.write("<html>");
	win.document.write("<head>");
	win.document.write("<title>Aperçu rapide</title>");
	win.document.write("<meta http-equiv='Content-Type' content='text/html' charset='iso-8859-1'>");
	win.document.write("<link rel='stylesheet' href='../feuille_style.css' type='text/css'>");
	win.document.write("</head>");
	win.document.write("<body>");
  win.document.write("<table width=\"100%\" border=\"0\" cellspacing=\"15\" cellpadding=\"0\">");
  win.document.write("<tr>");
  win.document.write("<td valign=\"top\" class=\"texte11Noir\">");
  win.document.write("" + corps.value + "");
  win.document.write("</td>");
  win.document.write("</tr>");
  win.document.write("</table>");
	win.document.write("<br><center><input type='button' value='Fermer' onclick='window.close()' class='bouton'></center>");
	win.document.write("</body>");
	win.document.write("</html>");
	win.document.close();
	win.focus();
}// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
function displayHTML4(nomform)
{
	var corps = eval("document."+ nomform + ".popup");

	win = window.open('', 'popup', 'toolbar = no, status = no, location=no, menubar=no, scrollbars=yes,resizable=no, height=200,width=500,left=80,top=80');
	win.document.write("<html>");
	win.document.write("<head>");
	win.document.write("<title>Aperçu rapide</title>");
	win.document.write("<meta http-equiv='Content-Type' content='text/html' charset='iso-8859-1'>");
	win.document.write("<link rel='stylesheet' href='../feuille_style.css' type='text/css'>");
	win.document.write("</head>");
	win.document.write("<body>");
  win.document.write("" + corps.value + "");
	win.document.write("<br><br><center><input type='button' value='Fermer' onclick='window.close()' class='bouton'></center>");
	win.document.write("</body>");
	win.document.write("</html>");
	win.document.close();
	win.focus();
}
