// function aff_alerte()

// aff_alerte(txt, c_f , c_b , e_b , c_e , cl , logo , w_t , h_t , nb_bout , bout , titre , id , lang , idlang)
// txt = message d'alerte
// c_f = couleur de fond du tableau
// c_b = couleur de bordure du tableau
// e_b = epaisseur de la bordure de tableau
// c_e = couleur ecriture
// cl = class de l'ecriture
// logo = image du pop up
// w_t = largeur du pop up
// h_t = heuteur du pop up
// nb_bout = nombre de bouton ( 0 pour aucun bouton )
// bout = type du 1er bouton ( 0 = OK , 1 = ANNULER , 2 = OUI , 3 = NON , 4 correspond a un nouveau bouton , ... , vide = aucun bouton)
// titre = nom du popup
// id = identifiant du show ( pour les parties administrables
// lang = Nom de la langue ( ex : fr , uk , de , ... ) pour les parties administrables multi langues
// idlang = identifiant de la langue , pour les parties administrables multi langues.




// valeur par defaut modifiable lors de l'appel de la function

var graphs = "graphs\/"
var barre_popup = "barre_popup.gif";


var bout0 = "OK|Ok|calshowHideSelect(1);erreur.innerHTML=\'\';|100";
var bout1 = "ANNULER|Annuler|erreur.innerHTML=\'\';|100";
var bout2 = "OUI|Oui||100";
var bout3 = "NON|Non||100";
var bout4 = "FERMER|Fermer|erreur.innerHTML=\'\';|120";



function aff_alerte(txt,c_f,c_b,e_b,c_e,cl,logo,w_t,h_t,nb_bout,bout,titre,id,lang,idlang) {
calshowHideSelect(0);
// Penser a modifier les valeurs par defaut pour que le pop up soit au même graphique que votre site

if ((typeof c_f == 'undefined') || (c_f=='')) { c_f = "#a6cdf1"; }
if ((typeof c_b == 'undefined') || (c_b=='')) { c_b = "#3158af"; }
if ((typeof e_b == 'undefined') || (e_b=='')) { e_b = "2"; }
if ((typeof c_e == 'undefined') || (c_e=='')) { c_e = "#000000"; }
if ((typeof cl  == 'undefined') || (cl==''))  { cl = "courant"; }
if ((typeof logo == 'undefined') || (logo=='')) { logo = "danger3.gif"; }
if ((typeof w_t == 'undefined') || (w_t=='')) { w_t = "400"; }
if ((typeof h_t == 'undefined') || (h_t=='')) { h_t = "100"; }
var txt = txt;


var table;

table = "<table id=tableau border=0 cellpadding=0 class="+cl+" cellspacing=0 width="+w_t+" height="+h_t+" bgcolor=\""+c_f+"\" style='border:"+e_b+"px solid "+c_b+";filter:progid:DXImageTransform.Microsoft.dropShadow(Color=#999999,offX=5,offY=5,positive=true);width:'>";
table = table +"<tr><td style='border-bottom:1px solid #3158af;' height=20  style='background:url("+graphs+barre_popup+");BACKGROUND-REPEAT:repeat-y;background-color:#A6CDF1;' >&nbsp;&nbsp;<b>"+titre+"</b></td></tr>";
table = table +"<tr><td colspan=2 ><table border=0 class="+cl+" cellspacing=5><tr><td rowspan=3><img src=\""+graphs+logo+"\"></td><td><div id=\"Layer5\" style=\"position:absolute; left:"+parseInt(w_t-20)+"px; top:6px; z-index:10\">"
table = table +"<a href=\"#\" onclick=\"calshowHideSelect(1);erreur.innerHTML='';\"><img src=\"graphs/croix_rouge.gif\" border=0></a></div><font color="+c_e+">"
table = table + txt
if (nb_bout == 1) {
	table = table + "</td></tr></table></td></tr><tr><td align=center valign=bottom><input type=button name=\""+eval('bout'+bout).split('|')[0]+"\" value=\""+eval('bout'+bout).split('|')[1]+"\"  class=bouton style='width:"+eval('bout'+bout).split('|')[3]+"px;' onclick=\""+eval('bout'+bout).split('|')[2]+"\">"
}

if (nb_bout == 2) {
	table = table + "</td></tr></table></td></tr><tr><td align=center valign=bottom>";
	table = table + "<input type=button name=\""+eval('bout'+bout.split('|')[0]).split('|')[0]+"\" value=\""+eval('bout'+bout.split('|')[0]).split('|')[1]+"\" class=bouton style='width:"+eval('bout'+bout.split('|')[0]).split('|')[3]+";' onclick=\""+eval('bout'+bout.split('|')[0]).split('|')[2]+"\">&nbsp;&nbsp;&nbsp;";
	table = table + "<input type=button name=\""+eval('bout'+bout.split('|')[1]).split('|')[0]+"\" value=\""+eval('bout'+bout.split('|')[1]).split('|')[1]+"\" class=bouton style='width:"+eval('bout'+bout.split('|')[1]).split('|')[3]+";' onclick=\""+eval('bout'+bout.split('|')[1]).split('|')[2]+"\">";
}

if (nb_bout == 3) {
	table = table + "</td></tr></table></td></tr><tr><td align=center valign=bottom>";
	table = table + "<input type=button name=\""+eval('bout'+bout.split('|')[0]).split('|')[0]+"\" value=\""+eval('bout'+bout.split('|')[0]).split('|')[1]+"\" class=bouton style='width:"+eval('bout'+bout.split('|')[0]).split('|')[3]+";' onclick=\""+eval('bout'+bout.split('|')[0]).split('|')[2]+"\">&nbsp;&nbsp;&nbsp;";
	table = table + "<input type=button name=\""+eval('bout'+bout.split('|')[1]).split('|')[0]+"\" value=\""+eval('bout'+bout.split('|')[1]).split('|')[1]+"\" class=bouton style='width:"+eval('bout'+bout.split('|')[1]).split('|')[3]+";' onclick=\""+eval('bout'+bout.split('|')[1]).split('|')[2]+"\">&nbsp;&nbsp;&nbsp;";
	table = table + "<input type=button name=\""+eval('bout'+bout.split('|')[2]).split('|')[0]+"\" value=\""+eval('bout'+bout.split('|')[2]).split('|')[1]+"\" class=bouton style='width:"+eval('bout'+bout.split('|')[2]).split('|')[3]+";' onclick=\""+eval('bout'+bout.split('|')[2]).split('|')[2]+"\">"
}
table = table + "</font></td></tr><tr><td align=center valign=bottom colspan=2>&nbsp;</td></tr></table>";
erreur.innerHTML = table;

// partie pour les sites multilangue

if ((id!='') && (lang!='') && (idlang!=''))
{
	if (eval('di'+id).style.display=='none') {show(id);}
	selectLang(lang,id,idlang);
	return false;
}

// pour les sites monolangue

if ((id!='') && (lang=='') && (idlang==''))
	{
	if (eval('di'+id).style.display=='none') {show(id);}
	return false;
	}

}



if (clic==1) {

<!--




// VARIABLE À UTILISER POUR AJOUTER UN ÉLÉMENT
var dragDrop = new DragDrop();

// CLASSE PERMETTANT DE GÉRER LE DRAG & DROP
function DragDrop()
{
	// Tableau contenant les id des éléments
	this.elements = new Array;

	// Variable contenant l'instance sur l'élément étant en train d'être déplacé
	this.elementActif = null;

	// Empèche les selections sur la page
	document.onselectstart = NoSelect;
	document.ondragstart = NoSelect;

	// Méthode de la classe
	this.Add = DragDrop_Add;
}

// MÉTHODE PERMETTANT D'AJOUTER UN ÉLÉMENT DEVANT ÊTRE DÉPLACABLE
function DragDrop_Add( idElement )
{
	// Recherche le prochain emplacement libre
	var indice = 0;
	while( this.elements[ indice ] != null )
		indice ++;

	// Ajoute l'élément
	this.elements[ indice ] = idElement;

	// Modifie le style de positionnement de l'élément
	GetElement( idElement ).style.position = "absolute";

	// Modifie les fonctions à appeler lors d'un évènement sur l'élément
	GetElement( idElement ).onmousedown = DragDrop_Start;
	GetElement( idElement ).onmouseup = DragDrop_Stop;
}

// FONCTION PERMETTANT DE COMMENCER LE DÉPLACEMENT
function DragDrop_Start()
{
	if( dragDrop.elementActif == null )
	{
		// Parcourt les éléments et les enlèves du premier plan
		var indice = 0;
		while( dragDrop.elements[ indice ] != null )
		{
			if( GetElement( dragDrop.elements[ indice ] ).style.zIndex > 1 )
				GetElement( dragDrop.elements[ indice ] ).style.zIndex = GetElement( dragDrop.elements[ indice ] ).style.zIndex - 1;

			indice ++;
		}

		// Met l'élément au premier plan
		this.style.zIndex = 5000;

		// Met l'élément actif à jour
		dragDrop.elementActif = this;

		// Modifie la fonction appelée lorsque le curseur bouge au-dessus de la fenêtre
		document.onmousemove = DragDrop_Move;
	}
}

// FONCTION PERMETTANT D'ARRETER LE DÉPLACEMENT
function DragDrop_Stop()
{
	if( dragDrop.elementActif != null )
	{
		// Met l'élément actif à jour
		dragDrop.elementActif = null;


		// Modifie la fonction appelée lorsque le curseur bouge au-dessus de la fenêtre
		document.onmousemove = null;
	}
}

// FONCTION PERMETTANT DE DÉPLACER L'ÉLÉMENT ACTIF
function DragDrop_Move( evenementSouris )
{
	// Récupère les coordonnées de la souris d'après le navigateur
	var souris;
	if( document.all )
		souris = event;
	else
		souris = evenementSouris;

	// Positionne l'élément de manière à ce qu'il soit centré par rapport au curseur
	dragDrop.elementActif.style.left = souris.clientX + document.body.scrollLeft - dragDrop.elementActif.offsetWidth / 2;
	dragDrop.elementActif.style.top = souris.clientY + document.body.scrollTop - dragDrop.elementActif.offsetHeight / 2;
}

// FONCTION PERMETTANT D'ARRÊTER UNE SELECTION DANS LA PAGE
function NoSelect()
{
	return false;
}

// FONCTION PERMETTANT DE RÉCUPÉRER L'INSTANCE D'UN DES ÉLÉMENTS DE LA PAGE
function GetElement( idElement )
{
	if( document.all )
		return document.all( idElement );

	return document.getElementById( idElement );
}
dragDrop.Add( "Layer4" );
}



function calshowHideSelect(show) {
	var showhide='';if(show==0) showhide='hidden';var n;
	for (n = 0; n < document.forms.length; n++) {
		var f = document.forms[n]
	  for (var elt = 0; elt <document.forms[n].elements.length;elt++)
			if (f[elt] != null){if (typeof f[elt] != 'undefined')if (f[elt].type.toString().indexOf("select")!= "-1")
				if((f[elt].name!='calmonth')&&(f[elt].name!='calyear'))	f[elt].style.visibility = showhide;}
	}
}