	var max_vote = 5;
	var height_img = 40;
	var width_img = 40;

	function actualiser(id)
	{
		var imgsrc = new Array();
		for(i = 0; i < max_vote; i++)
		{
			image = eval( 'document.img'+(i+1) );
			if (i+1 <= id)
			{
				image.src = '/themes/dtp4/img/'+ (i+1) + '.png';
			}else{
				image.src = '/themes/dtp4/img/off.png';
			}
		}
	}
	function draw_vote(ri_id)
	{
		document.write('<div onmouseout="actualiser(0);document.ri_form.ri_value.value=\'\';">');
		for(j = 1; j <= max_vote; j++)
				document.write('<a href="javascript: document.ri_form.submit()"><img name="img'+ j + '" height="'+ height_img +'" width="'+ width_img +'" src="/themes/dtp4/img/off.png" onmouseover="actualiser(' + j + ');document.ri_form.ri_value.value=\''+j+'\';" alt="Donnez une note de : ' + j + '" title="Donnez une note de : ' + j + '" border="0" /></a>');
		document.write('<form action="" method="post" style="visibility: hidden;" name="ri_form"><input type="text" name="ri_value" value="" readonly><input type="hidden" name="ri_id" value="'+ri_id+'"></form>');
		document.write('</div>');
	}
	function draw_result(value,cpt)
	{
		if(cpt>1)
			vote='votes';
		else
			vote='vote';
		for(j = 1; j <= max_vote; j++)
		{
			img_type=j
			if(j>value)
				img_type='off2';
			document.write('<img src="/themes/dtp4/img/'+img_type+'.png" alt="Ce billet a une note de : ' + value + ' / '+cpt+' '+vote+'"  alt="Ce billet a une note de : ' + value + ' / '+cpt+' '+vote+'" />');
		}
		//document.write('('+cpt+' '+vote+')');
	}

function insertsmilie(smilie) {
    smilie = ' ' + smilie + ' ';
    document.forms['comment-form'].c_content.value  += smilie;
  }