// Fonctions d'affichage/masquage des categories
function showHideTemplateCat(idCat,firstLine,imgPath)
{
	var lastLine = document.getElementById('lastNumLigne'+idCat).value;
	
	if(lastLine < firstLine)
		return;
	
	var bouton = document.getElementById('boutonCat'+idCat);
	var stat = document.getElementById('ligneTemplate'+firstLine).style.display;
	
	if(stat == 'none')
	{
		for(i=firstLine;i<=lastLine;i++)
			document.getElementById('ligneTemplate'+i).style.display = '';
		bouton.src=imgPath + 'reduire.png';
	}
	else 
	{
		for(i=firstLine;i<=lastLine;i++)
			document.getElementById('ligneTemplate'+i).style.display = 'none';
		bouton.src=imgPath + 'restaure.png';
	}
}

function popupComment(url)
{
	window.open(url,"_blank",
		"toolbar=no,scrollbars=yes,resizable=0,menubar=no,location=no,status=no,directories=no,width=700,height=500,left=50,top=50");
}

function showHideTemplateCatDiv(idCat,imgPath)
{
	var bouton = document.getElementById('boutonCat'+idCat);
	var stat = document.getElementById('categorie'+idCat+'Content').style.display;
	
	if(stat == 'none')
	{
		document.getElementById('categorie'+idCat+'Content').style.display = '';
		bouton.src=imgPath + 'reduire.png';
	}
	else 
	{
		document.getElementById('categorie'+idCat+'Content').style.display = 'none';
		bouton.src=imgPath + 'restaure.png';
	}
}
