<!--
//permet de voir si nous voulons ajouter une image
var changeImage = false;
function PopupImage(img) 
{ 
	titre="Agrandissement"; 
	w=open("",'image','width=400,height=400,toolbar=no,scrollbars=no,resizable=no'); 
	w.document.write("<HTML><HEAD><TITLE>"+titre+"</TITLE></HEAD>"); 
	w.document.write("<SCRIPT language=javascript>function checksize() { if (document.images[0].complete) { window.resizeTo(document.images[0].width+30,document.images[0].height+150); window.focus();} else { setTimeout('checksize()',250) } }</"+"SCRIPT>"); 
	w.document.write("<BODY onload='checksize()' onblur='window.close()' onclick='window.close()' leftMargin=0 topMargin=0 marginwidth=0 marginheight=0>");
	w.document.write("<TABLE width='100%' border='0' cellspacing='0' cellpadding='0' height='100%'><TR>");
	w.document.write("<TD valign='middle' align='center'><IMG src='"+img+"' border=0 alt='Mon image'>"); 
	w.document.write("</TD></TR></TABLE>");
	w.document.write("</BODY></HTML>"); 
	w.document.close(); 
}
function bigImage(img) 
{
	document.getElementById('indic').src = img;
	new Effect.toggle('fnt_big_oeuvre','slide');
}
 function addSmiley(codesmiley)
{
  var msg = document.Formulaire.message; // Remplace formulaire par le nom de ton formulaire
                                          // et zonetext par le nom de la textbox ou textarrea
   
   // Compatible IE
   if(document.selection)
   {
   msg.focus();
   sel = document.selection.createRange();
   sel.text = codesmiley;
   document.step2.focus();
   }
  else if(msg.selectionStart || msg.selectionStart == "0")
   {
   var startPos = msg.selectionStart;
   var endPos = msg.selectionEnd;
   var chaine = msg.value;
   
   msg.value = chaine.substring(0, startPos) + codesmiley + chaine.substring(endPos, chaine.length);
   msg.selectionStart = startPos + codesmiley.length;
   mdg.selectionEnd = endPos + codesmiley.length;
   msg.focus();
   }
  else
   {
   msg.value += codesmiley;
   msg.focus();
   }
}

function Validation_global_com()
{
	if(document.Formulaire.code.value != document.Formulaire.code_valid.value)
	{
		alert('code de validation faux');
	}
	
	else
	{
		document.Formulaire.action = "ajouter_commentaire.php";
		document.Formulaire.target = "";
		document.Formulaire.submit();
	}
}

