//Fonction pour cocher et décocher tout à la fois
function checkAll(obj,itemId)
{
  var inputs = document.getElementsByTagName('input');
  
    for(var i=0;i<inputs.length; i++)
    {
    	 if( (inputs[i].type == 'checkbox') && (inputs[i].id.indexOf(itemId, 0) != -1) ) 
    	 {
    	 	inputs[i].checked = obj ? obj.checked : false;
    	 }
    }
 }